Second Order Differential Equations

Stage: 5
Article by Michael Grayling

Published September 2014.


In many real life modelling situations, a differential equation for a variable of interest won’t just depend on the first derivative, but on higher ones as well. Naturally then, higher order differential equations arise in STEP and other advanced mathematics examinations. For anything more than a second derivative, the question will almost certainly be guiding you through some particular trick very specific to the problem at hand. For second order differential equations though, you need to know how to tackle them in general. Fortunately, the technique involved is very simple, and below guides you through all you need to know with a helpful example as well!
 

Homogeneous Second Order Differential Equations


The first major type of second order differential equations you’ll have to learn to solve, are ones that can be written for our dependent variable \(y\) and independent variable \(t\) as:

\( \hspace{3 in} a \frac{d^2y}{dt^2} + b \frac{dy}{dt}+cy=0.\)

Here \(a\), \(b\) and \(c\) are just constants. In general the coefficients next to our derivatives may not be constant, but fortunately you don’t need to worry about how to approach such problems like that in general for STEP.

Now our approach to solving an equation of the above type is a simple one: we guess a solution. Of course, its an educated guess, there’s a lot of maths behind why we make the guess we do, but essentially it boils down to attempting a solution of the form \(y=e^{\lambda t}\). Here, \(\lambda\) is simply an unknown constant, and our aim becomes to find \(\lambda\) for which a solution of this type satisfies the differential equation. Now, our guess implies that:

\(\hspace{2.65 in} \frac{dy}{dt} = \lambda e^{\lambda t}, \hspace{0.5 in} \frac{d^2y}{dt^2} = \lambda^2 e^{\lambda t}, \)

and we can therefore substitute into our differential equation to find:

\( \hspace{2.8 in} a\lambda^2 e^{\lambda t}+b\lambda e^{\lambda t}+c e^{\lambda t}=0.\)

Now because \(e^{\lambda t}\) is never zero, its safe to divide through to acquire a quadratic in \(\lambda\):

\( \hspace{3.2 in} a \lambda^2+b \lambda +c=0.\)

This equation, that in future you can jump to quickly is usually called the Auxiliary Equation.

But we know how to solve quadratics! This means we can find the \(\lambda\) for our \(a\), \(b\) and \(c\) that allow \(e^{\lambda t}\) to satisfy our differential equation. Now, in general we’ll actually have 2 values for \(\lambda\) and our most general solution to the differential equation will be a linear combination of the two solutions they imply. Therefore, if we call our two solutions \(\lambda_1\) and \(\lambda_2\) we have:

\( \hspace{3.2 in} y=Ae^{\lambda_1 t}+Be^{\lambda_2 t}. \)

But what happens if \(\lambda_1 = \lambda_2\), well then instead we’d use:

\(\hspace{3.24 in} y=(A+Bt) e^{\lambda_1 t}.\)

Additionally, it’s important to realise that our \(\lambda\) may not necessarily be real numbers. If they happen to complex our two solutions we could say call \(\lambda_1 =r+is\) and \(\lambda_2 =r-is\), since they’ll always be complex conjugate pairs. Then, our solution for \(y\), using the relations between \(e^{it}\) and the trigonometric functions, can be written as:

\(\hspace{2.8 in} y=e^{rt} (A \cos st+B \sin st ).\)

So these three formula we’ve ended up with are all we actually need to remember! For any homogeneous second order differential equation with constant coefficients, we simply jump to the auxiliary equation, find our (\lambda\), write down the implied solution for \(y\) and then our initial conditions will help us find the constants if required.
 

Inhomogeneous Second Order Differential Equations


One extension to the above that we must tackle, is the case when the RHS in our DE is non-zero, i.e. when we have:

\( \hspace{2.85 in} a \frac{d^2y}{dt^2} + b \frac{dy}{dt}+cy=f(t).\)

Fortunately, the approach is again a simple one. Now, it is common to write our general solution for \(y\) in the form \(y=y_c+y_p\), where \(y_c\) is known as the complimentary function, and \(y_p\) the particular integral. Specifically, \(y_c\) is the solution to the problem:

\( \hspace{2.84 in} a \frac{d^2y_c}{dt^2} + b \frac{dy_c}{dt}+cy_c=0,\)

and y_p to:

\( \hspace{2.71 in} a \frac{d^2y_p}{dt^2} + b \frac{dy_p}{dt}+cy_p=f(t).\)

This may look like we’ve made things infinitely more complicated, but we actually haven’t. Now it should be clear that \(y_c\) is found from the homogeneous case that we tackled above; so all we need to find it is our auxiliary equation. For \(y_p\) we again make use of guessing a solution, but our exact guess depends on f. Fortunately there is only a short list of standard guesses you need to remember:

\(f(t)\) \(y_p\)
\(e^{\alpha t}\) \(Pe^{\alpha t}\)
\(\alpha x^n +\) lower order powers  \(Px^n+Qx^{n-1}+...+Z\)
\(\cos \alpha t\) or \(\sin \alpha t\) \(P\cos \alpha t + Q\sin \alpha t\)

In order to find the constants present in \(y_p\) above, we simpy need to differentiate twice and substitute into its differential equation. Finally, then armed with \(y_c\) and \(y_p\) we have our general solution for \(y\) and can use initial conditions to find the constants in \(y_c\) if we require.

Example


To put this all in to context, let’s work through a particularly complex case ourselves. We wish to solve:

\( \hspace{2.85 in} a \frac{d^2y}{dt^2} + b \frac{dy}{dt}+cy=5x^2 + 12.\)

Now, firstly let’s find \(y_c\) using the auxiliary equation:

\( \hspace{2.5 in} \eqalign{ \lambda^2+2\lambda+5&=0,
\cr \Rightarrow \lambda=\frac{-2 \pm \sqrt{4-20}}{2}&=-1 \pm 2i. } \)

Therefore, we have:

\( \hspace{2.85in} y_c=e^{-t} (A \cos 2t + B \sin 2t ). \)

Now, since the right hand side is a polynomial we must try:

\(\hspace{3.15 in} y_p=Px^2+Qx+R. \)

Notice that even though there is no x term in our RHS we must still include it in our guess for y_p; this is true in general for polynomial f. So this implies that:

\( \hspace{2.6 in} \frac{dy_p}{dt}=2Px+Q, \hspace{0.5 in} \frac{d^2 y_p}{dt^2}=2P.\)

Substituging into our differential equation for \(y_p\) then, we have:

\( \hspace{1.45 in} \eqalign{ (2P)+2(2Px+Q)+5(Px^2+Qx+R)&=5x^2+12,
\cr \Rightarrow 5Px^2+(4P+5Q)x+(2P+2Q+5R)&=5x^2+12. } \)

Now, equating coefficnets of \(x^2\) we find that \(5P=5\), i.e. \(P=1\).Moreover, equating coefficients of \(x\), we then have:

\(\hspace{2.1 in} 4P+5Q=0 \Rightarrow 4+5Q=0 \Rightarrow Q=-5/4.\)

Finally, equating coefficients of \(x^0\) we have:

\( \hspace{0.6 in} 2P+2Q+5R=12 \Rightarrow 2+2(-\frac{5}{4})+5R=12 \Rightarrow R=\frac{1}{5}\left(12-2+\frac{5}{2}\right)=\frac{5}{2}.\)

Putting all this together, we have our general solution for \(y\)! We have:

\( \hspace{1.6 in} y=y_c+y_p=e^{-t} (A \cos 2t+B \sin2t )+x^2-\frac{5}{4}x+\frac{5}{2}. \)
 

Summary


Now you’ve seen almost everything you possibly could need to to prep yourself for starting to attempt a few STEP and other advanced mathematics examinations differential equation questions yourself. And fortunately for you, we’ve picked out a few to get you started in the next part of this module.