Phase portrait on the sphere

I have that $(x,y)\in S^1$, i.e. on the sphere, and in Mathematica, the ODE system

f = x^3 - x y^2 + y^3 ;
xdot = x (-x + f);
ydot = y (x - y + f);

vector = {xdot, ydot};

How can I plot the phase portrait on $S^1$?

I do not know how to plot this in Mathematica.

Of course there is the StreamPlot function and I can do

StreamPlot[{ x (-x + f), y (x - y + f)},{x,-Pi,Pi},{y,-Pi,Pi}]

which gives

enter image description here

But I am only interested in the dynamics which happens directly on $S^1$.

How can I filter that out to get something like sketched here:

enter image description here

Answers 1

  • So, one way to do this is to project your vector field (pointwise) onto the vector field that goes around the origin, and then only plot the streams that go through points on the circle—we'll take a few via CirclePoints to be sure we get the whole of the unit circle.

    StreamPlot[
     Projection[{x (-x + f), y (x - y + f)}, {-y, x}], {x,-Pi,Pi}, {y,-Pi,Pi},
     StreamPoints -> CirclePoints[10]]
    

    The output of the code above: a circle made of arrows. (For some reason, choosing a different number of CirclePoints (e.g. 11) can cause streams to go through points not on the circle. I'm not sure why this happens, and it might be a bug.)

    Let me know if you'd like me to explain why this works or what it's doing any further! :)

    By the way, here's what I get by completing the specification to StreamPoints -> {CirclePoints[20], Automatic, [email protected] Pi}:

    the same plot, but now some arrows are yellow, orange, and red

    I'm not sure if this is meaningful or better, but thought I'd add it!


Related Questions