In the end I didn't use this approach exactly, since I've simply added the normalized derivative
to the x-component, which yields equivalent results. I've also added a bit of a fudge factor multiplying all
occurrences of u_0 by 10, which tends to result in less glitches. You can observe this in the function
below by using the slider for the variable c.