Second-Order Homogeneous & Non-Homogeneous Equations
The auxiliary equation, complementary functions, and finding particular integrals.
Second-order homogeneous equations
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$$
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)$.
Auxiliary equation: $m^2+3m-10=0 \Rightarrow (m+5)(m-2)=0 \Rightarrow m=-5,2$.
General solution: $y=Ae^{-5x}+Be^{2x}$.
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
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.
$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.
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$.
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)