Skip to content

9231 · 2.6

Differential equations — practice questions

Practice and worked examples for 9231 Differential equations. Short previews only — attempt the full question in MarkScheme against the official scheme.

Worked example 1

Find the general solution of the differential equation dydx2xy=x2\frac{dy}{dx} - \frac{2}{x}y = x^2.

Show solution outline

Step 1: Identify P(x)P(x) and Q(x)Q(x). The equation is in the form dydx+P(x)y=Q(x)\frac{dy}{dx} + P(x)y = Q(x). Here, P(x)=2xP(x) = -\frac{2}{x} and Q(x)=x2Q(x) = x^2.

Step 2: Calculate the Integrating Factor (IF). I(x)=eP(x)dx=e2xdx=e2lnx=elnx2=x2=1x2I(x) = e^{\int P(x) dx} = e^{\int -\frac{2}{x} dx} = e^{-2\ln|x|} = e^{\ln|x^{-2}|} = x^{-2} = \frac{1}{x^2}.

Step 3: Multiply the DE by the IF. 1x2dydx2x3y=x2x2\frac{1}{x^2}\frac{dy}{dx} - \frac{2}{x^3}y = \frac{x^2}{x^2} The left side becomes ddx(1x2y)\frac{d}{dx}(\frac{1}{x^2}y). So, ddx(yx2)=1\frac{d}{dx}(\frac{y}{x^2}) = 1.

Step 4: Integrate both sides with respect to xx. ddx(yx2)dx=1dx\int \frac{d}{dx}(\frac{y}{x^2}) dx = \int 1 dx yx2=x+C\frac{y}{x^2} = x + C, where C is the constant of integration.

Step 5: Rearrange to find the general solution. y=x2(x+C)=x3+Cx2y = x^2(x+C) = x^3 + Cx^2.

Worked example 2

Find the particular solution of the differential equation d2ydx2+5dydx+6y=12ex\frac{d^2y}{dx^2} + 5\frac{dy}{dx} + 6y = 12e^{-x} given that y=1y=1 and dydx=0\frac{dy}{dx}=0 when x=0x=0.

Show solution outline

Step 1: Find the Complementary Function (CF). The auxiliary equation is m2+5m+6=0m^2 + 5m + 6 = 0. Factoring gives (m+2)(m+3)=0(m+2)(m+3)=0, so the roots are m1=2m_1 = -2 and m2=3m_2 = -3. The CF is yCF=Ae2x+Be3xy_{CF} = Ae^{-2x} + Be^{-3x}.

Step 2: Find the Particular Integral (PI). The right-hand side is 12ex12e^{-x}. This form is not in the CF. Try a PI of the form yPI=Cexy_{PI} = Ce^{-x}. Then dyPIdx=Cex\frac{dy_{PI}}{dx} = -Ce^{-x} and d2yPIdx2=Cex\frac{d^2y_{PI}}{dx^2} = Ce^{-x}. Substitute into the original DE: (Cex)+5(Cex)+6(Cex)=12ex(Ce^{-x}) + 5(-Ce^{-x}) + 6(Ce^{-x}) = 12e^{-x} Cex5Cex+6Cex=12exCe^{-x} - 5Ce^{-x} + 6Ce^{-x} = 12e^{-x} 2Cex=12ex2Ce^{-x} = 12e^{-x} 2C=12    C=62C = 12 \implies C = 6. So, the PI is yPI=6exy_{PI} = 6e^{-x}.

Step 3: Form the General Solution. y=yCF+yPI=Ae2x+Be3x+6exy = y_{CF} + y_{PI} = Ae^{-2x} + Be^{-3x} + 6e^{-x}.

Step 4: Use initial conditions to find A and B. We have y(0)=1y(0)=1 and y(0)=0y'(0)=0. First, find dydx=2Ae2x3Be3x6ex\frac{dy}{dx} = -2Ae^{-2x} - 3Be^{-3x} - 6e^{-x}. Using y(0)=1y(0)=1: 1=Ae0+Be0+6e0    1=A+B+6    A+B=51 = Ae^0 + Be^0 + 6e^0 \implies 1 = A + B + 6 \implies A+B = -5 (Eq 1). Using y(0)=0y'(0)=0: 0=2Ae03Be06e0    0=2A3B6    2A+3B=60 = -2Ae^0 - 3Be^0 - 6e^0 \implies 0 = -2A - 3B - 6 \implies 2A+3B = -6 (Eq 2).

Solving simultaneously: Multiply (Eq 1) by 2: 2A+2B=102A+2B = -10. Subtract this from (Eq 2): (2A+3B)(2A+2B)=6(10)    B=4(2A+3B) - (2A+2B) = -6 - (-10) \implies B = 4. Substitute B=4B=4 into A+B=5A+B=-5 to get A+4=5    A=9A+4=-5 \implies A=-9.

Step 5: Write the particular solution. y=9e2x+4e3x+6exy = -9e^{-2x} + 4e^{-3x} + 6e^{-x}.