Core Pure · Methods in Differential Equations · Year 2

Second-Order Homogeneous & Non-Homogeneous Equations

The auxiliary equation, complementary functions, and finding particular integrals.

15 min read 4 worked examples

Second-order homogeneous equations

Definition 7.3 — the auxiliary equation

A second-order linear homogeneous differential equation with constant coefficients has the form

$$a\frac{d^2y}{dx^2}+b\frac{dy}{dx}+cy=0$$

Trying a solution $y=e^{mx}$ gives $\dfrac{dy}{dx}=me^{mx}$ and $\dfrac{d^2y}{dx^2}=m^2e^{mx}$. Substituting and dividing by $e^{mx}$ (never zero) gives the auxiliary equation:

$$am^2+bm+c=0$$

Theorem 7.4 — general solution by case

Let $m_1,m_2$ be the roots of the auxiliary equation.

Two distinct real roots $m_1\neq m_2$: $\;y=Ae^{m_1x}+Be^{m_2x}$.

Repeated real root $m_1=m_2=m$: $\;y=(A+Bx)e^{mx}$.

Complex conjugate roots $m=p\pm qi$: $\;y=e^{px}(A\cos qx+B\sin qx)$.

ProofThe repeated-root case needs an extra factor of x
1
If $m_1=m_2=m$, then $y=e^{mx}$ alone only supplies one arbitrary constant, but a second-order equation needs two independent solutions.
2
Try $y=xe^{mx}$ as the second solution. Then $\dfrac{dy}{dx}=e^{mx}+mxe^{mx}$ and $\dfrac{d^2y}{dx^2}=2me^{mx}+m^2xe^{mx}$.
3
Substitute into $a\dfrac{d^2y}{dx^2}+b\dfrac{dy}{dx}+cy$: $a(2me^{mx}+m^2xe^{mx})+b(e^{mx}+mxe^{mx})+cxe^{mx}$.
4
Group: $e^{mx}(2am+b)+xe^{mx}(am^2+bm+c)$. The second bracket is zero since $m$ satisfies the auxiliary equation; the first bracket is zero because a repeated root of $am^2+bm+c=0$ satisfies $m=-\dfrac b{2a}$, i.e. $2am+b=0$. So $y=xe^{mx}$ is indeed a solution, and by linearity $y=(A+Bx)e^{mx}$ is the general solution.
∎
Example 1 · Distinct real roots
Find the general solution to $\dfrac{d^2y}{dx^2}+3\dfrac{dy}{dx}-10y=0$.

Auxiliary equation: $m^2+3m-10=0 \Rightarrow (m+5)(m-2)=0 \Rightarrow m=-5,2$.

General solution: $y=Ae^{-5x}+Be^{2x}$.

Example 2 · Complex roots
Find the general solution to $\dfrac{d^2y}{dx^2}-6\dfrac{dy}{dx}+25y=0$.

Auxiliary equation: $m^2-6m+25=0 \Rightarrow m=\dfrac{6\pm\sqrt{36-100}}2=3\pm4i$.

General solution: $y=e^{3x}(A\cos4x+B\sin4x)$.

Non-homogeneous equations

Definition 7.5 — complementary function + particular integral

For $a\dfrac{d^2y}{dx^2}+b\dfrac{dy}{dx}+cy=f(x)$ with $f(x)\not\equiv0$, the general solution is $y=y_{CF}+y_{PI}$, where $y_{CF}$ (the complementary function) solves the associated homogeneous equation, and $y_{PI}$ (a particular integral) is any single function satisfying the full equation.

Standard trial forms for the particular integral

$f(x)=p$ (constant) $\Rightarrow$ try $y_{PI}=\lambda$.   $f(x)=p+qx$ $\Rightarrow$ try $y_{PI}=\lambda+\mu x$.   $f(x)=pe^{kx}$ $\Rightarrow$ try $y_{PI}=\lambda e^{kx}$.   $f(x)=p\cos\omega x$ or $p\sin\omega x$ $\Rightarrow$ try $y_{PI}=\lambda\cos\omega x+\mu\sin\omega x$.

If the trial form already appears in the complementary function, multiply the trial by $x$ (or $x^2$ for a repeated clash) before substituting.

Example 3 · Finding a particular integral
Find the general solution to $\dfrac{d^2y}{dx^2}-2\dfrac{dy}{dx}-8y=4x-1$.

Complementary function: $m^2-2m-8=0\Rightarrow(m-4)(m+2)=0\Rightarrow m=4,-2$, so $y_{CF}=Ae^{4x}+Be^{-2x}$.

Particular integral: try $y_{PI}=\lambda+\mu x$, so $y_{PI}'=\mu$, $y_{PI}''=0$.

Substitute: $0-2\mu-8(\lambda+\mu x)=4x-1$.

Compare $x$ coefficients: $-8\mu=4\Rightarrow\mu=-\dfrac12$. Compare constants: $-2\mu-8\lambda=-1\Rightarrow1-8\lambda=-1\Rightarrow\lambda=\dfrac14$.

General solution: $y=Ae^{4x}+Be^{-2x}+\dfrac14-\dfrac12x$.

Example 4 · Clash with the complementary function
Find a particular integral for $\dfrac{d^2y}{dx^2}-5\dfrac{dy}{dx}+6y=4e^{2x}$.

Complementary function: $m^2-5m+6=0\Rightarrow(m-2)(m-3)=0\Rightarrow y_{CF}=Ae^{2x}+Be^{3x}$.

Since $e^{2x}$ already appears in $y_{CF}$, the naive trial $\lambda e^{2x}$ would fail. Try instead $y_{PI}=\lambda xe^{2x}$: $y_{PI}'=\lambda e^{2x}+2\lambda xe^{2x}$, $y_{PI}''=4\lambda e^{2x}+4\lambda xe^{2x}$.

Substitute: $(4\lambda e^{2x}+4\lambda xe^{2x})-5(\lambda e^{2x}+2\lambda xe^{2x})+6\lambda xe^{2x}=4e^{2x}$.

The $xe^{2x}$ terms cancel ($4\lambda-10\lambda+6\lambda=0$), leaving $(4\lambda-5\lambda)e^{2x}=4e^{2x}\Rightarrow-\lambda=4\Rightarrow\lambda=-4$.

So $y_{PI}=-4xe^{2x}$.

Exam-style questions

Question 1 4 marks

Find the general solution to $\dfrac{d^2y}{dx^2}+8\dfrac{dy}{dx}+16y=0$.

$m^2+8m+16=0\Rightarrow(m+4)^2=0\Rightarrow m=-4$ (repeated). (M1, A1)

$y=(A+Bx)e^{-4x}$. (A1, A1)

Question 2 8 marks

Find the general solution to $\dfrac{d^2y}{dx^2}+4y=\cos2x$.

$m^2+4=0\Rightarrow m=\pm2i\Rightarrow y_{CF}=A\cos2x+B\sin2x$. (M1, A1)

Since $\cos2x$ clashes with $y_{CF}$, try $y_{PI}=x(\lambda\cos2x+\mu\sin2x)$. (M1)

Differentiating twice and substituting (working through the product rule carefully) leads to $-4\lambda\sin2x+4\mu\cos2x=\cos2x$, so $\lambda=0,\mu=\dfrac14$. (M1, A1, A1)

General solution: $y=A\cos2x+B\sin2x+\dfrac14x\sin2x$. (A1, A1)

Question 3 6 marks

Find the general solution to $\dfrac{d^2y}{dx^2}-9y=18$.

$m^2-9=0\Rightarrow m=\pm3\Rightarrow y_{CF}=Ae^{3x}+Be^{-3x}$. (M1, A1)

Try $y_{PI}=\lambda$: $-9\lambda=18\Rightarrow\lambda=-2$. (M1, A1)

General solution: $y=Ae^{3x}+Be^{-3x}-2$. (A1, A1)