A Complete Solution To The Non-Linear Pendulum

Nick Schot
PhysicsFromScratch
Published in
7 min readNov 16, 2021

By: PhysicsFromScratch.org

This article is related to the study guide for: Introduction to Non-Linear Dynamics

In this article we will derive an expression for the angular displacement of the simple pendulum as a function of time: φ(t)

We will not use any approximations such as the small angle approximation but instead derive an exact solution. It must be noted however that this solution cannot be expressed in terms of elementary functions.

But we can write down a truly exact solution by making use of the so-called Jacobi Ellliptic Functions.

Note that I still call it the “simple pendulum” because we’re still dealing with an idealized model: We’re neglecting air resistance, assuming the pivot is frictionless, and neglecting the mass of the rod.

Some Basic Mechanics
This is the easiest part of the derivation.

Above you see a free body diagram of the pendulum where the force of gravity has been split up in a component tangent to displacement and a component perpendicular to it.

I have defined the angle φ to be positve in the counter-clockwise direction and negative in the clock-wise direction. As is convention.

Now our first goal should be to derive an equation of motion. We can do this by using the rotational analogue of Newton’s Second Law of Motion (time derivatives denoted with dot notation):

Where l⃗ is the ‎p‎‎‎osition vector pointing from the mass to the pivot (with magnitude l which is the length of the cord).

Note that only the force of gravity contributes to the torque (to rotation) because the force of tension is perpendicular to displacement.

Also note that the gravitational torque is negative because it rotates the mass in the direction opposite to displacement (opposite to angular displacement φ).

The moment of intertia I for a point mass rotating around a pivot (radius l) is ml², yielding our equation of motion:

This is a second-order, non-linear differential equation. Solving this DE will yield the equation we seek: φ(t).

So the rest is just (a lot of) maths.

“Just Maths”
As I said before, the solution to this DE cannot be written in terms of elementary functions.

But there does exist an exact, analytical solution which can be written in terms of Jacobi Elliptic Functions.

Jacobi Elliptic Functions
A simplified way of thinking about these functions is to see them as some kind of “generalized trigonometric functions.”

The trigonometric functions (sin, cos, tan, etc.) are defined relative to the unit circle. The Jacobi Elliptic Functions are defined relative to a more general conic section: The unit ellipse.

The bold curve represents (part of) the ellipse

The figure above geometrically defines the Jacobi Elliptic Functions relative to the unit ellipse:

This is still quite abstract, but we can define these elliptic functions as inverses of the incomplete elliptic integral of the first kind (and so arrive at a more useful expression).

An “Elliptic Integral” is defined in the following way:

https://en.wikipedia.org/wiki/Elliptic_integral

Where R is any rational function and P a polynomial with degree 3 or 4 with no repeated roots. c is a constant.

Historically, these integrals were used to solve problems related to ellipses (such as finding the arc length of an ellipse).

The specific Elliptic Integral of our interest is the special case known as the “Incomplete Elliptic Integral of the First Kind.”

But let us first write down the definition for the “Complete Elliptic Integral of the First Kind”, which will also prove useful in our derivation:

The integral is considered “complete” because the amplide φ is equal to π/2 (t = 1). And here k is the so-called “Elliptic Modulus.” We will use the definition where 0 ≤ k² ≤ 1.

Note: In some definitions the parameter m will be used instead where m=k²

Now let’s write down the definition for the “Incomplete Elliptic Integral of the First Kind”:

This integral is considered “incomplete” because the amplitude φ is not fixed at π/2 but variable (note that it differs from the complete integral only in the integration limit but as a result has two arguments).

In our derivation it will be useful to write our incomplete elliptic integral as an indefinite integral. We can do this by making use of the following identity that arises from the Fundamental Theorem of Calculus:

Yielding,

Defining the Jacobi Elliptic Functions
Now let’s go back to the Jacobi Elliptic Functions. Because we still need to define them properly.

One of the most important ones is the Jacobi Amplitude am, which is defined in terms of the Incomplete Elliptic Integral in the following way:

Other Jacobi Elliptic Functions that will be relevant for us and their definition:

And an important addition identity:

Deriving that final elliptic function as the ratio of two others and the addition identity would be an entire article in itself requiring to explain Jacobi Theta Function.

Instead I’ll cite a source:

And I challenge you to derive these two facts for yourself :)

Solving the Equation of Motion
Now we finally have all the tools to start solving the equation of motion we derived:

Let’s start by re-writing the DE into a form that’s easier to solve.

First we will re-write our DE to this:

Using the following two identities will help us re-write it again. They can be derived by applying the chain rule:

Using above two identities we can re-write our eq. of motion to get:

Now we can bring everything into the time-derivative:

The above equation implies that the expression being differentiated with time is constant (because its rate of change is zero). So we can write:

We can find an expression for our constant C by considering the initial conditions of our problem: At the initial angle φ(t=0)=φ₀, the speed of the mass is zero, and thus the angular speed must also be zero. Yielding:

So we are assuming that the system starts in rest.

Now we can write:

Let’s re-write it again to find an expression for the angular speed:

You might be able to see now that the goal is to re-write our equation of motion such that we can express it in terms of Jacobi Elliptic Functions. The next step is to re-write it again by making use of the following trig identity:

Substitution of this identity yields:

Now let us define a few constants to simplify our expression:

Where ω₀ is known as the “natural frequency.” It’s acually the frequency of the pendulum’s motion in the small angle approximation where you can speak of simple harmonic motion.

Let’s also definine our Elliptic Modulus:

It is thus defined by and dependent on our initial angle. Also note that it obeys the rule that 0 ≤ k² ≤1.

Using all of these constants we can re-write our eq. of motion again:

The equation is still quite complex. How do we get an expression for φ?

We can do this through integration. But in order to do that defining yet another variable for substitution will be useful:

Note that:

So we can write:

Now we can use this substitution to make the integration easier.

Let’s begin by re-writing our eq. of motion into:

And let’s intergrate the entire expression with respect to time:

We can also write:

And by making use of our definition of θ (I’m not going through all the steps), we get:

Now we managed to get an expression we can write in terms of Jacobi Elliptic Functions. Remember the definition of the Incomplete Elliptic Integral of The First Kind? We can use it to write:

Or, in terms of φ,

Now let’s find our constant C.

At t=0 we have φ=φ₀,

Turns out our constant is the negative of the Complete Elliptic Integral of the First Kind!

Now we can finally write our solution in terms of Jacobi Elliptic Functions:

And using the definition of the Jacobi Amplitude Function am, we get,

And then using the definition for the Jacobi Ellipitic Function sn=sin(am):

That’s already some kind of solution. But we can make it more compact.

By using the identity introduced above, sn(u+K(k), k) = cd(u, k), we finally arrive at:

That’s an expression of φ(t) in terms of Jacobi Elliptic Functions.

Before we analyze this function, is this solution truly exact?

The answer is yes, of course!

The solution is just not expressed in terms of “elementary functions.” But just like trignometric functions, Jacobi Elliptic Functions can be computed and are therefore useful. See:

Analyzing The Solution
Small Angle Approximation
Let’s compare the solution to the Small Angle Approximation, which we can derive from our solution as well:

(cd(x, k=0)=cos x, won’t derive it here ;) )

Which is the solution if the Small Angle Approximation is applied.

Comparison

Let’s compare the exact solution against the small angle approximation. For the following graphs the following initial conditions were used: g=9.81 m/s², l=0.1 m.

As you can see in the figure below, if the initial angle is sufficiently small (like π/16 rad), and the time interval too, the small angle approximation is almost indistinguishable from the exact solution:

φ₀=π/16 rad

If we make the initial angle a bit larger (like π/3 rad), you can see that the small angle approximation begins to deviate from the exact solution as time passes (see figure below).

φ₀=π/3 rad

--

--