5.18 Second order differential equations

5.18 Second order differential equations

IB Maths: Applications and Interpretation HL: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A second-order equation contains d2xdt2\frac{d^2x}{dt^2}; springs, damping and pendulums come from Newton's second law.
  • Let y=dxdty=\frac{dx}{dt} to turn it into a coupled first-order system: dxdt=y\frac{dx}{dt}=y and dydt=f(x,y,t)\frac{dy}{dt}=f(x,y,t).
  • Euler's method steps both equations together, using the old values.
  • For d2xdt2+adxdt+bx=0\frac{d^2x}{dt^2}+a\frac{dx}{dt}+bx=0 the eigenvalues satisfy λ2+aλ+b=0\lambda^2+a\lambda+b=0.
  • Imaginary eigenvalues: undamped; complex with negative real part: damped oscillation.

Physical contexts

Newton's second law turns forces on springs and pendulums into equations for d2xdt2\frac{d^2x}{dt^2}.

A second-order differential equation contains d2xdt2\frac{d^2x}{dt^2}, the acceleration when xx is a displacement. They arise from Newton's second law.

A mass mm on a spring of stiffness kk gives d2xdt2=−kmx\frac{d^2x}{dt^2}=-\frac{k}{m}x. Adding damping proportional to velocity gives d2xdt2+adxdt+bx=0\frac{d^2x}{dt^2}+a\frac{dx}{dt}+bx=0. A pendulum gives d2θdt2=−gLsin⁡θ\frac{d^2\theta}{dt^2}=-\frac{g}{L}\sin\theta.

In examinations the equation is given; you solve it numerically or analyse it with a phase portrait.

Spring

  • d2xdt2=−kmx\frac{d^2x}{dt^2}=-\frac{k}{m}x
  • Force pulls back to x=0x=0

Damped spring

  • d2xdt2+adxdt+bx=0\frac{d^2x}{dt^2}+a\frac{dx}{dt}+bx=0
  • Friction proportional to velocity

Pendulum

  • d2θdt2=−gLsin⁡θ\frac{d^2\theta}{dt^2}=-\frac{g}{L}\sin\theta
  • Non-linear

What law gives these equations?

A coupled first-order system

Introduce y=dxdty=\frac{dx}{dt}, so one second-order equation becomes two first-order equations.

Euler's method needs first-order equations, so introduce a variable for velocity. For d2xdt2=f(x,dxdt,t)\frac{d^2x}{dt^2}=f\left(x,\frac{dx}{dt},t\right) let y=dxdty=\frac{dx}{dt}. Then

dxdt=y,dydt=f(x,y,t).\frac{dx}{dt}=y,\qquad \frac{dy}{dt}=f(x,y,t).

Example: d2xdt2=−4x−0.5dxdt\frac{d^2x}{dt^2}=-4x-0.5\frac{dx}{dt} becomes dxdt=y\frac{dx}{dt}=y and dydt=−4x−0.5y\frac{dy}{dt}=-4x-0.5y. The initial conditions become x(0)x(0) and y(0)=dxdt(0)y(0)=\frac{dx}{dt}(0).

  1. 1

    Let y=dxdty=\frac{dx}{dt}

    the velocity

  2. 2

    First equation

    dxdt=y\frac{dx}{dt}=y

  3. 3

    Second equation

    dydt=f(x,y,t)\frac{dy}{dt}=f(x,y,t)

Reducing to a coupled system

Worked example

Write d2xdt2=−9x−2dxdt\frac{d^2x}{dt^2}=-9x-2\frac{dx}{dt} as a coupled first-order system.

d2xdt2=−x\frac{d^2x}{dt^2}=-x with y=dxdty=\frac{dx}{dt}. What is dydt\frac{dy}{dt}?

Euler's method for the pair

Update xx and yy together, both using the values from the start of the step.

Apply Euler to both equations, using the old values on the right.

Example: d2xdt2=−2x+t\frac{d^2x}{dt^2}=-2x+t, x(0)=1x(0)=1, dxdt(0)=0\frac{dx}{dt}(0)=0, h=0.1h=0.1. Step 1 (t=0t=0): x1=1x_1=1 and y1=0+0.1(−2+0)=−0.2y_1=0+0.1(-2+0)=-0.2. Step 2 (t=0.1t=0.1): x2=1+0.1(−0.2)=0.98x_2=1+0.1(-0.2)=0.98 and y2=−0.2+0.1(−2+0.1)=−0.39y_2=-0.2+0.1(-2+0.1)=-0.39.

Use a spreadsheet for more steps, and radian mode if the equation contains sin⁡x\sin x. Euler slowly drifts: for d2xdt2=−x\frac{d^2x}{dt^2}=-x each step multiplies x2+y2x^2+y^2 by (1+h2)(1+h^2), though the true value is constant.

  • xn+1x_{n+1}xn+h ynx_n+h\,y_n
  • yn+1y_{n+1}yn+h f(xn,yn,tn)y_n+h\,f(x_n,y_n,t_n)
  • tn+1t_{n+1}tn+ht_n+h

In step 1 above, what is y1y_1?

Linear equations and phase portraits

Write the matrix of the coupled system; its eigenvalues satisfy λ2+aλ+b=0\lambda^2+a\lambda+b=0.

For d2xdt2+adxdt+bx=0\frac{d^2x}{dt^2}+a\frac{dx}{dt}+bx=0 the coupled system is dxdt=y\frac{dx}{dt}=y, dydt=−bx−ay\frac{dy}{dt}=-bx-ay, with matrix M=(01−b−a)M=\begin{pmatrix} 0 & 1 \\ -b & -a \end{pmatrix}. Its eigenvalues satisfy

λ2+aλ+b=0.\lambda^2+a\lambda+b=0.

Then use the phase-portrait method from 5.17, with position xx and velocity yy as the axes.

Example: d2xdt2+2dxdt+10x=0\frac{d^2x}{dt^2}+2\frac{dx}{dt}+10x=0 has λ=−1±3i\lambda=-1\pm3i.

123456−1−0.50.51xyx = e^(−t) cos 3tenvelope
A damped oscillation: λ = −1 ± 3i gives x = e^(−t) cos 3t, inside the decaying envelope ±e^(−t).

d2xdt2+3dxdt+2x=0\frac{d^2x}{dt^2}+3\frac{dx}{dt}+2x=0. What is the characteristic equation?

Interpreting the eigenvalues

The eigenvalues tell you whether the motion is undamped, damped, heavily damped or unstable.

The origin x=0x=0, y=0y=0 is the rest position: the mass at the centre with no velocity.

Describe each case in context, not just in terms of shapes: say that a decaying spiral means the oscillation dies away and the object settles at rest.

a=0, b>0a=0,\ b>0

Portrait:
Imaginary: closed ellipses
Motion:
Undamped oscillation

Complex, real part negative

Portrait:
Spiral towards the origin
Motion:
Damped oscillation

Two negative real

Portrait:
Stable node
Motion:
Returns to 0 without oscillating

b<0b<0

Portrait:
Saddle point
Motion:
xx runs away

Imaginary eigenvalues ±2i\pm 2i mean...

Numerical or qualitative?

Euler's method gives numbers for any equation; the phase portrait gives the behaviour of linear equations.

Euler's method gives numbers: position and velocity at particular times, for any given equation, including non-linear ones like the pendulum. The phase portrait gives the qualitative behaviour of linear equations: grow, decay or cycle, without calculating values.

For a non-linear equation such as d2θdt2=−10sin⁡θ\frac{d^2\theta}{dt^2}=-10\sin\theta, replacing sin⁡θ\sin\theta by θ\theta for small angles gives a linear equation to analyse.

Check which is asked: "estimate xx when t=…t=\dots" needs Euler; "describe the long-term behaviour" needs the eigenvalues.

Euler's method

Gives:
Numbers at given times
Works for:
Any equation

Phase portrait

Gives:
Long-term behaviour
Works for:
Linear equations

"Describe the long-term behaviour" of a linear system needs...

Try an exam question

A mass satisfies d2xdt2+2dxdt+10x=0\frac{d^2x}{dt^2}+2\frac{dx}{dt}+10x=0. Write this as a coupled first-order system, find the eigenvalues, and describe the motion.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Using y=dxdty=\frac{dx}{dt}, which pair of first-order equations is equivalent to d2xdt2=−x\frac{d^2x}{dt^2}=-x?

1 mark, marked against the mark scheme

Revision notes