Skip to main content

Method 1: From Energies

In the previous section, we derived the differential equation that describes the motion of a mass-spring system. This differential equation is a second-order ordinary differential equation (ODE) that can be written as:

In this section, we will explore the first method to solve this differential equation, which, instead of using this ODE directly, uses the conservation of energy.

Table of Contents

Setting it Up

The total mechanical energy of the system is the sum of the kinetic energy and the potential energy.

The kinetic energy of the system is given by , where is the mass of the object and is its velocity. This is the same for most systems, but the potential energy of the system is different for different systems. In the case of a mass-spring system, the potential energy is given by , where is the spring constant and is the displacement of the object from the equilibrium position.

The total mechanical energy of the system is thus given by:

We can use this to rewrite in terms of and (which is just a constant):

Then, taking the square root of both sides, we get:

Let's introduce the new variables and , both of which are positive, to simplify the equation:

Solving the Differential Equation

(The astute reader will notice that this implies is always positive. We will address this later.) Since is just , this is a first-order differential equation that we can solve by separating variables:

From here we can use a trigonometric substitution to solve the integral on the left-hand side. When using trig substitutions, it's often helpful to draw a right triangle. From our integrand, we can see that is akin to using the Pythagorean theorem to find a missing side of a right triangle.

In this triangle, the hypotenuse is , the adjacent side is , and the opposite side is . We can see that . Then, by implicit differentiation, we have . Plugging both of these into our integral, we get:

Plugging this back into our equation, we get:

Adding integral bounds:

  • At , is the initial angle.
  • At , is the angle at time .

Solving the integrals, we get:

The coefficient of is , which we can denote as .

Recall that , so we can rewrite this as:

Let . Then:

Taking the cosine of both sides, we get:

Finally, we can solve for :

Since , we can rewrite this as:

Differentiating this equation with respect to , we also get the velocity:

Initial Conditions

We can find the initial conditions by looking at the initial position and velocity of the object.

At , and . Plugging into our equation for and , we get:

We can also take the ratio of these two equations to get :

Finally, take our equation for , use a cosine addition identity, and plug in the initial conditions to get the final equation:

This is the equation of motion for the undamped simple harmonic oscillator.

Summary and Next Steps

In this section, we derived the equation of motion for the undamped simple harmonic oscillator using the conservation of energy. We did not have to solve the differential equation directly, but instead used the total mechanical energy of the system to find the position and velocity of the object at any time .

In the next section, we will explore the second method to solve the differential equation, which is probably much faster than this method.