Using Boundary Conditions
Turning a general solution into a unique particular solution using initial or boundary values.
Two constants need two conditions
The general solution of a second-order differential equation contains two arbitrary constants ($A$ and $B$), so pinning down the particular solution requires two pieces of information. These commonly come as:
· two values of $y$ at two different values of $x$ (a boundary value problem), or
· a value of $y$ and a value of $\dfrac{dy}{dx}$ at the same value of $x$ (an initial value problem).
Find the general solution as usual (complementary function, plus particular integral if the equation is non-homogeneous). Differentiate once to get $\dfrac{dy}{dx}$ if needed. Substitute both conditions to form simultaneous equations in $A$ and $B$, and solve.
Auxiliary equation: $m^2-4m+3=0\Rightarrow(m-1)(m-3)=0\Rightarrow m=1,3$.
General solution: $y=Ae^x+Be^{3x}$, so $\dfrac{dy}{dx}=Ae^x+3Be^{3x}$.
At $x=0$: $y=A+B=4$ and $\dfrac{dy}{dx}=A+3B=8$.
Subtracting: $2B=4\Rightarrow B=2$, so $A=2$.
Particular solution: $y=2e^x+2e^{3x}$.
Auxiliary equation: $m^2+9=0\Rightarrow m=\pm3i$.
General solution: $y=A\cos3x+B\sin3x$.
At $x=0$: $y=A\cos0+B\sin0=A=5$.
At $x=\dfrac\pi3$: $y=5\cos\pi+B\sin\pi=-5+0=-5$. This is automatically satisfied for any $B$ — so the second condition doesn't determine $B$ here (a degenerate case, since $\dfrac\pi3$ is a multiple of the period structure that keeps $\sin3x=0$). More information (e.g. a derivative condition) would be needed to pin down $B$; with the given conditions, the solution is $y=5\cos3x+B\sin3x$ for arbitrary $B$.
Complementary function: $m^2-m-2=0\Rightarrow(m-2)(m+1)=0\Rightarrow y_{CF}=Ae^{2x}+Be^{-x}$.
Particular integral: try $y_{PI}=\lambda$: $-2\lambda=6\Rightarrow\lambda=-3$.
General solution: $y=Ae^{2x}+Be^{-x}-3$, so $\dfrac{dy}{dx}=2Ae^{2x}-Be^{-x}$.
At $x=0$: $y=A+B-3=0\Rightarrow A+B=3$. Also $\dfrac{dy}{dx}=2A-B=0$.
Adding: $3A=3\Rightarrow A=1$, so $B=2$.
Particular solution: $y=e^{2x}+2e^{-x}-3$.
As Example 2 shows, boundary conditions placed at special values of $x$ (such as where $\sin$ or $\cos$ vanishes) can fail to isolate both constants uniquely. Always check that your two equations are genuinely independent before concluding the particular solution is fully determined.
Exam-style questions
Question 1 7 marks
Find the particular solution to $\dfrac{d^2y}{dx^2}-6\dfrac{dy}{dx}+9y=0$, given that $y=2$ and $\dfrac{dy}{dx}=1$ when $x=0$.
$m^2-6m+9=0\Rightarrow(m-3)^2=0\Rightarrow m=3$ (repeated). (M1, A1)
$y=(A+Bx)e^{3x}$, so $\dfrac{dy}{dx}=Be^{3x}+3(A+Bx)e^{3x}$. (M1, A1)
At $x=0$: $A=2$. Also $B+3A=1\Rightarrow B=1-6=-5$. (M1, A1)
Particular solution: $y=(2-5x)e^{3x}$. (A1)
Question 2 9 marks
Find the particular solution to $\dfrac{d^2y}{dx^2}+2\dfrac{dy}{dx}+5y=10$, given that $y=4$ when $x=0$ and $y=2$ when $x=\dfrac\pi4$.
$m^2+2m+5=0\Rightarrow m=-1\pm2i \Rightarrow y_{CF}=e^{-x}(A\cos2x+B\sin2x)$. (M1, A1)
P.I.: try $y_{PI}=\lambda$: $5\lambda=10\Rightarrow\lambda=2$. (M1, A1)
General: $y=e^{-x}(A\cos2x+B\sin2x)+2$. At $x=0$: $A+2=4\Rightarrow A=2$. (M1, A1)
At $x=\dfrac\pi4$: $\cos\dfrac\pi2=0$ and $\sin\dfrac\pi2=1$, so $y=e^{-\pi/4}(0+B)+2=2$. (M1)
This gives $Be^{-\pi/4}=0$, so $B=0$. (A1)
Particular solution: $y=2e^{-x}\cos2x+2$. (A1)
Question 3 6 marks
Find the particular solution to $\dfrac{d^2y}{dx^2}-y=0$, given that $y=3$ when $x=0$ and $y\to0$ as $x\to\infty$.
$m^2-1=0\Rightarrow m=\pm1\Rightarrow y=Ae^x+Be^{-x}$. (M1, A1)
As $x\to\infty$, $e^x\to\infty$ while $e^{-x}\to0$; for $y\to0$ we need $A=0$. (M1, A1)
At $x=0$: $y=B=3$. Particular solution: $y=3e^{-x}$. (A1, A1)