Skip to content

FP2 Chapter 6: Second-Order Differential Equations

FP2 Lecture Notes: Second-Order Ordinary Differential Equations

Section titled “FP2 Lecture Notes: Second-Order Ordinary Differential Equations”

Second order ordinary differential equations (ODEs) are equations involving the second derivative of an unknown function. They are fundamental in mathematical modeling of physical systems and appear in countless applications in physics, engineering, and other sciences. In this lecture, we’ll explore the theory and techniques for solving these equations, with special focus on linear equations with constant coefficients.

Before diving into second-order ODEs, we need to review quadratic equations, as they will play a crucial role in our solution methods.

Quadratic Equation. An equation of the form:

ax2+bx+c=0ax^2 + bx + c = 0

where a0a \neq 0 and a,b,ca, b, c are constants.

Module 2: Introduction to Second Order ODEs

Section titled “Module 2: Introduction to Second Order ODEs”

Second Order ODE. An equation involving the second derivative of an unknown function. The general form is:

F ⁣(x,y,dydx,d2ydx2)=0F\!\left(x, y, \frac{dy}{dx}, \frac{d^2y}{dx^2}\right) = 0

where y=f(x)y = f(x) is the unknown function.

  1. d2ydx2+4y=0\frac{d^2y}{dx^2} + 4y = 0 — Linear, homogeneous, constant coefficients
  2. d2ydx2+2dydx+y=sinx\frac{d^2y}{dx^2} + 2\frac{dy}{dx} + y = \sin x — Linear, non-homogeneous, constant coefficients
  3. xd2ydx2+dydx+xy=0x\frac{d^2y}{dx^2} + \frac{dy}{dx} + xy = 0 — Linear, homogeneous, variable coefficients
  4. d2ydx2+(dydx)2+y=0\frac{d^2y}{dx^2} + \left(\frac{dy}{dx}\right)^2 + y = 0 — Nonlinear
  5. d2ydx2=y3\frac{d^2y}{dx^2} = y^3 — Nonlinear

Module 3: Linear Homogeneous ODEs with Constant Coefficients

Section titled “Module 3: Linear Homogeneous ODEs with Constant Coefficients”

We now focus on solving linear homogeneous second-order ODEs with constant coefficients:

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

Solve d2ydx25dydx+6y=0\frac{d^2y}{dx^2} - 5\frac{dy}{dx} + 6y = 0.

Solution:

  1. Auxiliary equation: r25r+6=0r^2 - 5r + 6 = 0
  2. Factor: (r2)(r3)=0(r - 2)(r - 3) = 0
  3. Roots: r1=2r_1 = 2, r2=3r_2 = 3
  4. General solution: y=C1e2x+C2e3xy = C_1e^{2x} + C_2e^{3x}

Solve d2ydx26dydx+9y=0\frac{d^2y}{dx^2} - 6\frac{dy}{dx} + 9y = 0.

Solution:

  1. Auxiliary equation: r26r+9=0r^2 - 6r + 9 = 0
  2. Factor: (r3)2=0(r - 3)^2 = 0
  3. Repeated root: r=3r = 3
  4. General solution: y=C1e3x+C2xe3xy = C_1e^{3x} + C_2xe^{3x}

Solve d2ydx2+4y=0\frac{d^2y}{dx^2} + 4y = 0.

Solution:

  1. Auxiliary equation: r2+4=0r^2 + 4 = 0
  2. Roots: r=±2ir = \pm 2i (i.e., α=0\alpha = 0, β=2\beta = 2)
  3. General solution: y=C1cos2x+C2sin2xy = C_1\cos 2x + C_2\sin 2x

After mastering homogeneous equations, we now turn to inhomogeneous linear second-order ODEs with constant coefficients:

ad2ydx2+bdydx+cy=g(x)a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = g(x)

where g(x)0g(x) \neq 0 is the inhomogeneous term (forcing function).

Consider d2ydx2+4y=sinx\frac{d^2y}{dx^2} + 4y = \sin x.

Step 1: Complementary function ycy_c (from d2ydx2+4y=0\frac{d^2y}{dx^2} + 4y = 0):

  • Auxiliary equation: r2+4=0    r=±2ir^2 + 4 = 0 \implies r = \pm 2i
  • yc=Acos2x+Bsin2xy_c = A\cos 2x + B\sin 2x

Step 2: Particular integral ypy_p:

  • yp=13sinxy_p = -\frac{1}{3}\sin x

Step 3: General solution:

y=Acos2x+Bsin2x13sinxy = A\cos 2x + B\sin 2x - \frac{1}{3}\sin x

Solve d2ydx23dydx+2y=4x+5\frac{d^2y}{dx^2} - 3\frac{dy}{dx} + 2y = 4x + 5.

Step 1: Complementary function

  • Auxiliary: r23r+2=0    (r1)(r2)=0    r=1,2r^2 - 3r + 2 = 0 \implies (r-1)(r-2) = 0 \implies r = 1, 2
  • yc=C1ex+C2e2xy_c = C_1e^x + C_2e^{2x}

Step 2: Particular integral

  • Try yp=Ax+By_p = Ax + B, so yp=Ay_p' = A, yp=0y_p'' = 0
  • Substituting: 03A+2(Ax+B)=4x+50 - 3A + 2(Ax + B) = 4x + 5
  • Comparing coefficients: 2A=4    A=22A = 4 \implies A = 2; 2B3A=5    B=5.52B - 3A = 5 \implies B = 5.5
  • yp=2x+5.5y_p = 2x + 5.5

Step 3: General solution:

y=C1ex+C2e2x+2x+5.5y = C_1e^x + C_2e^{2x} + 2x + 5.5

Solve d2ydx2dydx6y=3e2x\frac{d^2y}{dx^2} - \frac{dy}{dx} - 6y = 3e^{2x}.

Step 1: Auxiliary: r2r6=0    r=3,2r^2 - r - 6 = 0 \implies r = 3, -2. So yc=C1e3x+C2e2xy_c = C_1e^{3x} + C_2e^{-2x}.

Step 2: Try yp=Ae2xy_p = Ae^{2x}. Substituting:

4Ae2x2Ae2x6Ae2x=3e2x    4A=3    A=344Ae^{2x} - 2Ae^{2x} - 6Ae^{2x} = 3e^{2x} \implies -4A = 3 \implies A = -\frac{3}{4}

Step 3: y=C1e3x+C2e2x34e2xy = C_1e^{3x} + C_2e^{-2x} - \frac{3}{4}e^{2x}

Example 8: Trigonometric Inhomogeneous Term (Special Case)

Section titled “Example 8: Trigonometric Inhomogeneous Term (Special Case)”

Solve d2ydx2+4y=3sin2x\frac{d^2y}{dx^2} + 4y = 3\sin 2x.

Step 1: Auxiliary: r2+4=0    r=±2ir^2 + 4 = 0 \implies r = \pm 2i. So yc=C1cos2x+C2sin2xy_c = C_1\cos 2x + C_2\sin 2x.

Step 2: Since sin2x\sin 2x and cos2x\cos 2x are already in ycy_c, multiply by xx:

Try yp=x(Acos2x+Bsin2x)y_p = x(A\cos 2x + B\sin 2x).

Computing derivatives and substituting:

4Asin2x+4Bcos2x=3sin2x-4A\sin 2x + 4B\cos 2x = 3\sin 2x

Comparing coefficients: 4A=3    A=34-4A = 3 \implies A = -\frac{3}{4}; 4B=0    B=04B = 0 \implies B = 0.

So yp=34xcos2xy_p = -\frac{3}{4}x\cos 2x.

Step 3:

y=C1cos2x+C2sin2x34xcos2xy = C_1\cos 2x + C_2\sin 2x - \frac{3}{4}x\cos 2x

Module 5: Boundary Conditions and Particular Solutions

Section titled “Module 5: Boundary Conditions and Particular Solutions”

Solve:

d2ydx2+y=x,y(0)=2,y(0)=1\frac{d^2y}{dx^2} + y = x, \quad y(0) = 2, \quad y'(0) = -1

Solution:

  1. Complementary function: r2+1=0    r=±ir^2 + 1 = 0 \implies r = \pm i, so yc=Acosx+Bsinxy_c = A\cos x + B\sin x

  2. Particular integral: Try yp=Cxy_p = Cx. Substituting: 0+Cx=x    C=10 + Cx = x \implies C = 1. So yp=xy_p = x.

  3. General solution: y=Acosx+Bsinx+xy = A\cos x + B\sin x + x

  4. Apply initial conditions:

y(0)=A=2y(0) = A = 2 y(0)=B+1=1    B=2y'(0) = B + 1 = -1 \implies B = -2
  1. Particular solution: y=2cosx2sinx+xy = 2\cos x - 2\sin x + x

Solve:

d2ydx2+y=0,y(0)=0,y(π/2)=1\frac{d^2y}{dx^2} + y = 0, \quad y(0) = 0, \quad y(\pi/2) = 1

Solution:

  1. General solution: y=Acosx+Bsinxy = A\cos x + B\sin x
  2. y(0)=A=0y(0) = A = 0
  3. y(π/2)=B=1y(\pi/2) = B = 1
  4. y=sinxy = \sin x

Module 6: Substitution Methods for Second-Order ODEs

Section titled “Module 6: Substitution Methods for Second-Order ODEs”

Sometimes a second-order ODE can be simplified through appropriate substitutions. We explore two main types: substituting the independent variable xx and substituting the dependent variable yy.

Variable Substitution (Changing the Independent Variable)

Section titled “Variable Substitution (Changing the Independent Variable)”

Solve:

x2d2ydx23xdydx+4y=0,x>0x^2\frac{d^2y}{dx^2} - 3x\frac{dy}{dx} + 4y = 0, \quad x > 0

Using t=lnxt = \ln x.

Solution:

  1. Let t=lnxt = \ln x, so x=etx = e^t.

  2. Transform derivatives:

dydx=dydt1x\frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{1}{x} d2ydx2=1x2(d2ydt2dydt)\frac{d^2y}{dx^2} = \frac{1}{x^2}\left(\frac{d^2y}{dt^2} - \frac{dy}{dt}\right)
  1. Substitute into the original equation:
x21x2(d2ydt2dydt)3x1xdydt+4y=0x^2 \cdot \frac{1}{x^2}\left(\frac{d^2y}{dt^2} - \frac{dy}{dt}\right) - 3x \cdot \frac{1}{x} \cdot \frac{dy}{dt} + 4y = 0 d2ydt24dydt+4y=0\frac{d^2y}{dt^2} - 4\frac{dy}{dt} + 4y = 0
  1. Solve with constant coefficients:

    • Auxiliary: (r2)2=0    r=2(r-2)^2 = 0 \implies r = 2 (repeated)
    • y(t)=C1e2t+C2te2ty(t) = C_1e^{2t} + C_2te^{2t}
  2. Substitute back:

y(x)=C1x2+C2x2lnxy(x) = C_1x^2 + C_2x^2\ln x

Solve:

xd2ydx2(6x2+1)dydx+9x3y=x5,x>0x\frac{d^2y}{dx^2} - (6x^2 + 1)\frac{dy}{dx} + 9x^3y = x^5, \quad x > 0

Using x=t12x = t^{\frac{1}{2}} (equivalently t=x2t = x^2), this transforms into:

4d2ydt212dydt+9y=t4\frac{d^2y}{dt^2} - 12\frac{dy}{dt} + 9y = t

which is a second-order ODE with constant coefficients.

Dependent Variable Substitution (Transforming the Equation)

Section titled “Dependent Variable Substitution (Transforming the Equation)”

Solve:

d2ydx2(y)2y+y=0\frac{d^2y}{dx^2} - \frac{(y')^2}{y} + y' = 0

Using y=ezy = e^z.

Solution:

  1. Let y=ezy = e^z, so y=ezzy' = e^z z' and y=ez(z)2+ezzy'' = e^z(z')^2 + e^z z''.

  2. Substitute:

ez(z)2+ezz(ezz)2ez+ezz=0e^z(z')^2 + e^z z'' - \frac{(e^z z')^2}{e^z} + e^z z' = 0 ezz+ezz=0e^z z'' + e^z z' = 0
  1. Since ez0e^z \neq 0: z+z=0z'' + z' = 0

  2. Auxiliary: r2+r=0    r=0,1r^2 + r = 0 \implies r = 0, -1. So z=C1+C2exz = C_1 + C_2e^{-x}.

  3. Substitute back:

y=eC1+C2ex=AeBexy = e^{C_1 + C_2e^{-x}} = A \cdot e^{Be^{-x}}

where A=eC1>0A = e^{C_1} > 0 and B=C2B = C_2 are arbitrary constants.

Given:

x2d2ydx22y=1+4lnx2(lnx)2,x>0x^2\frac{d^2y}{dx^2} - 2y = 1 + 4\ln x - 2(\ln x)^2, \quad x > 0

Show that using t=lnxt = \ln x, this becomes:

d2ydt2dydt2y=1+4t2t2\frac{d^2y}{dt^2} - \frac{dy}{dt} - 2y = 1 + 4t - 2t^2

Then solve to determine the general solution of the original equation.

Distinguishing Between Transformation Types

Section titled “Distinguishing Between Transformation Types”

(a) Determine the general solution of

d2ydx2+2dydx+5y=6cosx\frac{d^2y}{dx^2} + 2\frac{dy}{dx} + 5y = 6\cos x

(b) Find the particular solution for which y=0y = 0 and dydx=0\frac{dy}{dx} = 0 at x=0x = 0.

(a) Find the general solution of

d2ydx26dydx+8y=2x2+x\frac{d^2y}{dx^2} - 6\frac{dy}{dx} + 8y = 2x^2 + x

(b) Find the particular solution for which y=1y = 1 and dydx=0\frac{dy}{dx} = 0 when x=0x = 0.

(a) Show that the transformation y=xvy = xv transforms

3d2ydx26xdydx+6yx2+3y=x2,x0(I)3\frac{d^2y}{dx^2} - \frac{6}{x}\frac{dy}{dx} + \frac{6y}{x^2} + 3y = x^2, \quad x \neq 0 \quad \text{(I)}

into

3d2vdx2+3v=x(II)3\frac{d^2v}{dx^2} + 3v = x \quad \text{(II)}

(b) Hence obtain the general solution of (I), giving your answer in the form y=f(x)y = f(x).

(a) Show that the transformation x=t2x = t^2 transforms

4xd2ydx2+2(1+2x)dydx15y=15x(I)4x\frac{d^2y}{dx^2} + 2(1 + 2\sqrt{x})\frac{dy}{dx} - 15y = 15x \quad \text{(I)}

into

d2ydt2+2dydt15y=15t2(II)\frac{d^2y}{dt^2} + 2\frac{dy}{dt} - 15y = 15t^2 \quad \text{(II)}

(b) Solve (II) to determine yy in terms of tt.

(c) Hence determine the general solution of (I).