Picture This
Humans are a visual species, we look for patterns in life and we are great at finding them when they are visual. We can tell two people apart just by looking at their faces. Sometime’s we’re too good at seeing patterns and we see faces in a piece of burnt toast. If we’re presented with raw data we often can’t figure anything out, but if we change that data into a visualization, new concepts and connections often leap forward. Today we’re going to look at a way that we can solve some nonlinear systems without making any simplifying assumptions using a great tool called the phase portrait.
Note: If you want a more traditional treatment of phase portraits, I recommend exploring Nonlinear Dynamics and Chaos by Strogatz
What is a Phase Portrait?
Above, we have an animated phase portrait, but what is it? A phase portrait, in it’s simplest terms, is when we plot one state of the system against another state of the system. In the phase portrait above we are plotting the angular position state against the angular velocity state. Each line shows a trajectory and every arrow shows the direction of flow from that point. If we were in a second order system, we could pick a point on the phase plane and its evolution will always stay along that trajectory.
Pendulums
One classic system we love to analyze in a first differential equations course is the humble pendulum
The traditional way of solving this system is to write out the equation of motion
and then appeal to the small angle approximation
Which gives us a nice linear differential equation to solve.
which we can then solve through a number of different methods to get a nice analytic solution
To get that solution we had to use the small angle approximation. Approximations are good as they allow us to find solutions to hard problems, but they come with limitations. The small angle approximation comes with the limitation that it begins to break down when the angles are larger than 15 degrees. Pendulums can swing much higher than just 15 degrees, so how can we tell what happens when we go to 30 degrees, 60 degrees, or even 120 degrees? We can use a phase portrait.
Nonlinear Pendulum
Let’s begin by defining our x-axis as the angular position
and our y as our angular velocity
We can then draw an arrow with the direction indicating the rate of change, and the length indicating the speed. The instantaneous rate of change along the x-axis is
and the instantaneous rate of change along the y-axis is
We can plot a bunch of these points in a plane to get a vector field.
The arrows now begin to show how a point will flow across the plane. But how does this compare to a full numerically integrated trajectory? In the Gif below, two points are propagated forwards in time.
It matches up almost perfectly! We could begin at any point on the X-Y plane and figure out how it will evolve into the future! This portrait shows all the possible solutions to the full nonlinear pendulum and without us doing any integration! Now, there’s actually a full analytical solution to the nonlinear pendulum
where
but as you can see it’s really complicated. That sn term denotes the elliptic sine function, one of jacobis elliptic functions! The phase portrait also tells us something that the analytical solutions don’t; the qualitatively different behavior in different regions.
Qualitatively Different Behavior
In the image below I’ve highlighted two regions. The red area is where the velocity doesn’t change direction, while the blue area is where it’s periodic.
The region where the velocity doesn’t change direction corresponds to where the pendulum is going fast enough to swing itself over its pivot. These two regions have quantitative different behavior, yet if we just look at the full analytic solution they aren’t apparent. This is one of the strengths of the phase portrait method. Unfortunately, they do come with downsides. Mainly, what do we do if our system is 3rd or higher order? We can no longer represent all of the information on a phase portrait.
Want More Gereshes
If this post sparked an interest in exploring other nonlinear systems I highly recommend some of these posts
- Fireflies in sync
- How to pump a swing using math
- Stability of the Lagrange Points – Three Body Problem
Or take a look at Nonlinear Dynamics and Chaos by Strogatz
If you want to receive the weekly Gereshes blog post directly to your email every Monday morning, you can sign up for the newsletter here! Don’t want another email? That’s ok, Gereshes also has a twitter account and subreddit!