Skip to main content
Examonaut

Topic 9 · Lesson 2 of 4

Second order equations

The homogeneous equation

An equation ad2ydx2+bdydx+cy=0a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0, with constants aa, bb, cc, is second order linear with constant coefficients. Try y=emxy = e^{mx}: then y′=memxy' = me^{mx} and y′′=m2emxy'' = m^2e^{mx}, and dividing by emxe^{mx} leaves the auxiliary equation

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

Its discriminant decides the form of the general solution, which always has two arbitrary constants:

  • Two real roots α≠β\alpha \neq \beta (b2>4acb^2 > 4ac): y=Aeαx+Beβxy = Ae^{\alpha x} + Be^{\beta x}.
  • A repeated root α\alpha (b2=4acb^2 = 4ac): y=(A+Bx)eαxy = (A + Bx)e^{\alpha x}.
  • Complex roots p±qip \pm qi (b2<4acb^2 < 4ac): y=epx(Acos⁡qx+Bsin⁡qx)y = e^{px}(A\cos qx + B\sin qx). With p=0p = 0 (roots ±qi\pm qi) this is Acos⁡qx+Bsin⁡qxA\cos qx + B\sin qx.

The complex case comes from Ce(p+qi)x+De(p−qi)xCe^{(p + qi)x} + De^{(p - qi)x}, using eiqx=cos⁡qx+isin⁡qxe^{iqx} = \cos qx + i\sin qx and combining the constants.

For example:

  • y′′−5y′+6y=0y'' - 5y' + 6y = 0: m=2,3m = 2, 3, so y=Ae2x+Be3xy = Ae^{2x} + Be^{3x}.
  • y′′+4y′+4y=0y'' + 4y' + 4y = 0: m=−2m = -2 (repeated), so y=(A+Bx)e−2xy = (A + Bx)e^{-2x}.
  • y′′+2y′+5y=0y'' + 2y' + 5y = 0: m=−1±2im = -1 \pm 2i, so y=e−x(Acos⁡2x+Bsin⁡2x)y = e^{-x}(A\cos 2x + B\sin 2x).

The non-homogeneous equation

For ay′′+by′+cy=f(x)ay'' + by' + cy = f(x), the general solution is

y=complementary function (CF)+particular integral (PI)y = \text{complementary function (CF)} + \text{particular integral (PI)}

The CF is the general solution of the equation with f(x)f(x) replaced by 0. The PI is any one solution of the full equation, found by trying a function of the same type as f(x)f(x) with unknown coefficients:

  • f(x)=kf(x) = k: try λ\lambda.
  • f(x)=A+Bxf(x) = A + Bx: try λ+μx\lambda + \mu x.
  • f(x)=p+qx+cx2f(x) = p + qx + cx^2: try λ+μx+νx2\lambda + \mu x + \nu x^2 (all three terms, even if ff is missing some).
  • f(x)=kepxf(x) = ke^{px}: try λepx\lambda e^{px}.
  • f(x)=mcos⁡ωx+nsin⁡ωxf(x) = m\cos\omega x + n\sin\omega x: try λcos⁡ωx+μsin⁡ωx\lambda\cos\omega x + \mu\sin\omega x (both terms, even if ff has only one).

Substitute the trial function, compare coefficients, and solve. Warning: if the trial function is already part of the CF, it gives 0 on the left and cannot work. Then multiply it by xx: for y′′−5y′+6y=e2xy'' - 5y' + 6y = e^{2x} (where e2xe^{2x} is in the CF), try λxe2x\lambda xe^{2x}, which gives λ=−1\lambda = -1.

Worked example

A polynomial right-hand side

Find the solution of y′′−5y′+6y=12x+2y'' - 5y' + 6y = 12x + 2 with y=3y = 3 and y′=0y' = 0 when x=0x = 0.

Show solution
  1. CF: m2−5m+6=0m^2 - 5m + 6 = 0, m=2,3m = 2, 3: Ae2x+Be3xAe^{2x} + Be^{3x}.
  2. PI: try y=λ+μxy = \lambda + \mu x. Then y′=μy' = \mu, y′′=0y'' = 0, and −5μ+6λ+6μx=12x+2-5\mu + 6\lambda + 6\mu x = 12x + 2. So μ=2\mu = 2 and 6λ−10=26\lambda - 10 = 2, giving λ=2\lambda = 2.
  3. General solution: y=Ae2x+Be3x+2x+2y = Ae^{2x} + Be^{3x} + 2x + 2.
  4. y(0)=3y(0) = 3: A+B+2=3A + B + 2 = 3. y′(0)=0y'(0) = 0: 2A+3B+2=02A + 3B + 2 = 0. So A=5A = 5 and B=−4B = -4.
  5. y=5e2x−4e3x+2x+2y = 5e^{2x} - 4e^{3x} + 2x + 2.

Always find the general solution (CF + PI) before using the conditions; using them on the CF alone gives wrong constants.

Practise this topic

Both are part of Premium.