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.
Motivating Problem: Spring-Mass System
Consider a mass m m m attached to a spring with spring constant k k k . If the mass is displaced from equilibrium and released, its position x ( t ) x(t) x ( t ) satisfies:
m d 2 x d t 2 = − k x m\frac{d^2x}{dt^2} = -kx m d t 2 d 2 x = − k x or equivalently:
d 2 x d t 2 + k m x = 0 \frac{d^2x}{dt^2} + \frac{k}{m}x = 0 d t 2 d 2 x + m k x = 0 How does the mass move over time?
This is a classic example of a second-order ODE. Its solution describes simple harmonic motion: x ( t ) = A cos ( ω t ) + B sin ( ω t ) x(t) = A\cos(\omega t) + B\sin(\omega t) x ( t ) = A cos ( ω t ) + B sin ( ω t ) where ω = k m \omega = \sqrt{\frac{k}{m}} ω = m k and A A A , B B B are constants determined by initial conditions.
This equation appears in various contexts beyond springs, including pendulums (for small oscillations), electrical circuits, and sound wave propagation.
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:
a x 2 + b x + c = 0 ax^2 + bx + c = 0 a x 2 + b x + c = 0
where a ≠ 0 a \neq 0 a = 0 and a , b , c a, b, c a , b , c are constants.
Second Order ODE. An equation involving the second derivative of an unknown function. The general form is:
F ( x , y , d y d x , d 2 y d x 2 ) = 0 F\!\left(x, y, \frac{dy}{dx}, \frac{d^2y}{dx^2}\right) = 0 F ( x , y , d x d y , d x 2 d 2 y ) = 0
where y = f ( x ) y = f(x) y = f ( x ) is the unknown function.
Classification of Second Order ODEs
Second order ODEs can be classified in several ways:
1. Linear vs. Nonlinear
Linear: Can be written as a ( x ) d 2 y d x 2 + b ( x ) d y d x + c ( x ) y = g ( x ) a(x)\frac{d^2y}{dx^2} + b(x)\frac{dy}{dx} + c(x)y = g(x) a ( x ) d x 2 d 2 y + b ( x ) d x d y + c ( x ) y = g ( x )
Nonlinear: Cannot be written in the above form
2. Homogeneous vs. Non-homogeneous
Homogeneous: g ( x ) = 0 g(x) = 0 g ( x ) = 0
Non-homogeneous: g ( x ) ≠ 0 g(x) \neq 0 g ( x ) = 0
3. Constant Coefficients vs. Variable Coefficients
Constant Coefficients: a ( x ) a(x) a ( x ) , b ( x ) b(x) b ( x ) , c ( x ) c(x) c ( x ) are constants
Variable Coefficients: At least one depends on x x x
In this lecture, we focus on linear second-order ODEs with constant coefficients:
a d 2 y d x 2 + b d y d x + c y = g ( x ) a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = g(x) a d x 2 d 2 y + b d x d y + cy = g ( x ) where a a a , b b b , c c c are constants (a ≠ 0 a \neq 0 a = 0 ).
d 2 y d x 2 + 4 y = 0 \frac{d^2y}{dx^2} + 4y = 0 d x 2 d 2 y + 4 y = 0 — Linear, homogeneous, constant coefficients
d 2 y d x 2 + 2 d y d x + y = sin x \frac{d^2y}{dx^2} + 2\frac{dy}{dx} + y = \sin x d x 2 d 2 y + 2 d x d y + y = sin x — Linear, non-homogeneous, constant coefficients
x d 2 y d x 2 + d y d x + x y = 0 x\frac{d^2y}{dx^2} + \frac{dy}{dx} + xy = 0 x d x 2 d 2 y + d x d y + x y = 0 — Linear, homogeneous, variable coefficients
d 2 y d x 2 + ( d y d x ) 2 + y = 0 \frac{d^2y}{dx^2} + \left(\frac{dy}{dx}\right)^2 + y = 0 d x 2 d 2 y + ( d x d y ) 2 + y = 0 — Nonlinear
d 2 y d x 2 = y 3 \frac{d^2y}{dx^2} = y^3 d x 2 d 2 y = y 3 — Nonlinear
We now focus on solving linear homogeneous second-order ODEs with constant coefficients:
a d 2 y d x 2 + b d y d x + c y = 0 a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0 a d x 2 d 2 y + b d x d y + cy = 0
The Auxiliary Equation Approach
To solve a d 2 y d x 2 + b d y d x + c y = 0 a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0 a d x 2 d 2 y + b d x d y + cy = 0 :
Look for solutions of the form y = e r x y = e^{rx} y = e r x , where r r r is a constant to be determined
Substitute into the differential equation:
a r 2 e r x + b r e r x + c e r x = 0 ar^2e^{rx} + bre^{rx} + ce^{rx} = 0 a r 2 e r x + b r e r x + c e r x = 0 e r x ( a r 2 + b r + c ) = 0 e^{rx}(ar^2 + br + c) = 0 e r x ( a r 2 + b r + c ) = 0
Since e r x ≠ 0 e^{rx} \neq 0 e r x = 0 , we must have:
a r 2 + b r + c = 0 ar^2 + br + c = 0 a r 2 + b r + c = 0 This is the auxiliary equation (or characteristic equation ).
Solve this quadratic for r r r . The form of the general solution depends on the roots.
Case 1: Two Distinct Real Roots
If a r 2 + b r + c = 0 ar^2 + br + c = 0 a r 2 + b r + c = 0 has two distinct real roots r 1 r_1 r 1 and r 2 r_2 r 2 (i.e., b 2 − 4 a c > 0 b^2 - 4ac > 0 b 2 − 4 a c > 0 ), then:
y = C 1 e r 1 x + C 2 e r 2 x y = C_1e^{r_1x} + C_2e^{r_2x} y = C 1 e r 1 x + C 2 e r 2 x where C 1 C_1 C 1 and C 2 C_2 C 2 are arbitrary constants.
Why this works: Since the ODE is linear, if y 1 y_1 y 1 and y 2 y_2 y 2 are both solutions, then C 1 y 1 + C 2 y 2 C_1y_1 + C_2y_2 C 1 y 1 + C 2 y 2 is also a solution. Both e r 1 x e^{r_1x} e r 1 x and e r 2 x e^{r_2x} e r 2 x satisfy the auxiliary equation, and this is the complete general solution.
Solve d 2 y d x 2 − 5 d y d x + 6 y = 0 \frac{d^2y}{dx^2} - 5\frac{dy}{dx} + 6y = 0 d x 2 d 2 y − 5 d x d y + 6 y = 0 .
Solution:
Auxiliary equation: r 2 − 5 r + 6 = 0 r^2 - 5r + 6 = 0 r 2 − 5 r + 6 = 0
Factor: ( r − 2 ) ( r − 3 ) = 0 (r - 2)(r - 3) = 0 ( r − 2 ) ( r − 3 ) = 0
Roots: r 1 = 2 r_1 = 2 r 1 = 2 , r 2 = 3 r_2 = 3 r 2 = 3
General solution: y = C 1 e 2 x + C 2 e 3 x y = C_1e^{2x} + C_2e^{3x} y = C 1 e 2 x + C 2 e 3 x
Case 2: Repeated Real Root
If a r 2 + b r + c = 0 ar^2 + br + c = 0 a r 2 + b r + c = 0 has a repeated real root r 1 r_1 r 1 (i.e., b 2 − 4 a c = 0 b^2 - 4ac = 0 b 2 − 4 a c = 0 ), then:
y = C 1 e r 1 x + C 2 x e r 1 x y = C_1e^{r_1x} + C_2xe^{r_1x} y = C 1 e r 1 x + C 2 x e r 1 x Why x e r 1 x xe^{r_1x} x e r 1 x appears: With a repeated root, we need a second linearly independent solution. It can be shown that x e r 1 x xe^{r_1x} x e r 1 x is also a solution, ensuring the complete general solution.
Solve d 2 y d x 2 − 6 d y d x + 9 y = 0 \frac{d^2y}{dx^2} - 6\frac{dy}{dx} + 9y = 0 d x 2 d 2 y − 6 d x d y + 9 y = 0 .
Solution:
Auxiliary equation: r 2 − 6 r + 9 = 0 r^2 - 6r + 9 = 0 r 2 − 6 r + 9 = 0
Factor: ( r − 3 ) 2 = 0 (r - 3)^2 = 0 ( r − 3 ) 2 = 0
Repeated root: r = 3 r = 3 r = 3
General solution: y = C 1 e 3 x + C 2 x e 3 x y = C_1e^{3x} + C_2xe^{3x} y = C 1 e 3 x + C 2 x e 3 x
Case 3: Complex Conjugate Roots
If a r 2 + b r + c = 0 ar^2 + br + c = 0 a r 2 + b r + c = 0 has complex conjugate roots r = α ± i β r = \alpha \pm i\beta r = α ± i β (i.e., b 2 − 4 a c < 0 b^2 - 4ac < 0 b 2 − 4 a c < 0 ), then:
y = e α x ( C 1 cos β x + C 2 sin β x ) y = e^{\alpha x}(C_1\cos\beta x + C_2\sin\beta x) y = e α x ( C 1 cos β x + C 2 sin β x ) Why this form? Complex roots yield complex solutions: e ( α + i β ) x = e α x ( cos β x + i sin β x ) e^{(\alpha+i\beta)x} = e^{\alpha x}(\cos\beta x + i\sin\beta x) e ( α + i β ) x = e α x ( cos β x + i sin β x ) . Since we want real solutions, we use linear combinations of the real and imaginary parts.
This form is particularly useful in physics, as it represents oscillatory motion with exponential growth or decay.
Solve d 2 y d x 2 + 4 y = 0 \frac{d^2y}{dx^2} + 4y = 0 d x 2 d 2 y + 4 y = 0 .
Solution:
Auxiliary equation: r 2 + 4 = 0 r^2 + 4 = 0 r 2 + 4 = 0
Roots: r = ± 2 i r = \pm 2i r = ± 2 i (i.e., α = 0 \alpha = 0 α = 0 , β = 2 \beta = 2 β = 2 )
General solution: y = C 1 cos 2 x + C 2 sin 2 x y = C_1\cos 2x + C_2\sin 2x y = C 1 cos 2 x + C 2 sin 2 x
After mastering homogeneous equations, we now turn to inhomogeneous linear second-order ODEs with constant coefficients:
a d 2 y d x 2 + b d y d x + c y = g ( x ) a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = g(x) a d x 2 d 2 y + b d x d y + cy = g ( x )
where g ( x ) ≠ 0 g(x) \neq 0 g ( x ) = 0 is the inhomogeneous term (forcing function).
General Solution Structure
The general solution to an inhomogeneous linear ODE is:
y = y c + y p y = y_c + y_p y = y c + y p where:
y c y_c y c is the complementary function (general solution of a d 2 y d x 2 + b d y d x + c y = 0 a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0 a d x 2 d 2 y + b d x d y + cy = 0 )
y p y_p y p is a particular integral (any specific solution of the full inhomogeneous equation)
Key points:
The complementary function contains the arbitrary constants
The particular integral contains no arbitrary constants
We only need to find one particular integral
Consider d 2 y d x 2 + 4 y = sin x \frac{d^2y}{dx^2} + 4y = \sin x d x 2 d 2 y + 4 y = sin x .
Step 1: Complementary function y c y_c y c (from d 2 y d x 2 + 4 y = 0 \frac{d^2y}{dx^2} + 4y = 0 d x 2 d 2 y + 4 y = 0 ):
Auxiliary equation: r 2 + 4 = 0 ⟹ r = ± 2 i r^2 + 4 = 0 \implies r = \pm 2i r 2 + 4 = 0 ⟹ r = ± 2 i
y c = A cos 2 x + B sin 2 x y_c = A\cos 2x + B\sin 2x y c = A cos 2 x + B sin 2 x
Step 2: Particular integral y p y_p y p :
y p = − 1 3 sin x y_p = -\frac{1}{3}\sin x y p = − 3 1 sin x
Step 3: General solution:
y = A cos 2 x + B sin 2 x − 1 3 sin x y = A\cos 2x + B\sin 2x - \frac{1}{3}\sin x y = A cos 2 x + B sin 2 x − 3 1 sin x
Method of Undetermined Coefficients
This method works when g ( x ) g(x) g ( x ) has a simple form like polynomials, exponentials, sines, cosines, or products of these:
Based on the form of g ( x ) g(x) g ( x ) , guess an appropriate form for y p y_p y p with undetermined coefficients
Compute y p ′ y_p' y p ′ and y p ′ ′ y_p'' y p ′′
Substitute into the original equation
Solve for the unknown coefficients by comparing like terms
Important: If your trial function or any part of it is already a solution to the homogeneous equation, you must multiply by x x x (or x 2 x^2 x 2 if necessary) to ensure linear independence.
Trial Functions for Particular Integrals
Inhomogeneous Term g ( x ) g(x) g ( x ) Trial Function for y p y_p y p k k k (constant)A A A Polynomial: a n x n + ⋯ + a 0 a_nx^n + \cdots + a_0 a n x n + ⋯ + a 0 A n x n + ⋯ + A 0 A_nx^n + \cdots + A_0 A n x n + ⋯ + A 0 Exponential: k e α x ke^{\alpha x} k e α x A e α x Ae^{\alpha x} A e α x Sine/Cosine: k sin β x k\sin\beta x k sin β x or k cos β x k\cos\beta x k cos β x A sin β x + B cos β x A\sin\beta x + B\cos\beta x A sin β x + B cos β x p ( x ) e α x p(x)e^{\alpha x} p ( x ) e α x q ( x ) e α x q(x)e^{\alpha x} q ( x ) e α x (same degree as p p p )p ( x ) sin β x p(x)\sin\beta x p ( x ) sin β x or p ( x ) cos β x p(x)\cos\beta x p ( x ) cos β x q 1 ( x ) sin β x + q 2 ( x ) cos β x q_1(x)\sin\beta x + q_2(x)\cos\beta x q 1 ( x ) sin β x + q 2 ( x ) cos β x (same degree)e α x sin β x e^{\alpha x}\sin\beta x e α x sin β x or e α x cos β x e^{\alpha x}\cos\beta x e α x cos β x e α x ( A sin β x + B cos β x ) e^{\alpha x}(A\sin\beta x + B\cos\beta x) e α x ( A sin β x + B cos β x )
Special Cases: If the trial function appears in the complementary function:
If g ( x ) = k e α x g(x) = ke^{\alpha x} g ( x ) = k e α x and e α x e^{\alpha x} e α x is in y c y_c y c , use y p = A x e α x y_p = Axe^{\alpha x} y p = A x e α x
If g ( x ) = k sin β x g(x) = k\sin\beta x g ( x ) = k sin β x or k cos β x k\cos\beta x k cos β x and these are in y c y_c y c , use y p = x ( A sin β x + B cos β x ) y_p = x(A\sin\beta x + B\cos\beta x) y p = x ( A sin β x + B cos β x )
If repeated root and trial includes x e α x xe^{\alpha x} x e α x , use y p = A x 2 e α x y_p = Ax^2e^{\alpha x} y p = A x 2 e α x
Solve d 2 y d x 2 − 3 d y d x + 2 y = 4 x + 5 \frac{d^2y}{dx^2} - 3\frac{dy}{dx} + 2y = 4x + 5 d x 2 d 2 y − 3 d x d y + 2 y = 4 x + 5 .
Step 1: Complementary function
Auxiliary: r 2 − 3 r + 2 = 0 ⟹ ( r − 1 ) ( r − 2 ) = 0 ⟹ r = 1 , 2 r^2 - 3r + 2 = 0 \implies (r-1)(r-2) = 0 \implies r = 1, 2 r 2 − 3 r + 2 = 0 ⟹ ( r − 1 ) ( r − 2 ) = 0 ⟹ r = 1 , 2
y c = C 1 e x + C 2 e 2 x y_c = C_1e^x + C_2e^{2x} y c = C 1 e x + C 2 e 2 x
Step 2: Particular integral
Try y p = A x + B y_p = Ax + B y p = A x + B , so y p ′ = A y_p' = A y p ′ = A , y p ′ ′ = 0 y_p'' = 0 y p ′′ = 0
Substituting: 0 − 3 A + 2 ( A x + B ) = 4 x + 5 0 - 3A + 2(Ax + B) = 4x + 5 0 − 3 A + 2 ( A x + B ) = 4 x + 5
Comparing coefficients: 2 A = 4 ⟹ A = 2 2A = 4 \implies A = 2 2 A = 4 ⟹ A = 2 ; 2 B − 3 A = 5 ⟹ B = 5.5 2B - 3A = 5 \implies B = 5.5 2 B − 3 A = 5 ⟹ B = 5.5
y p = 2 x + 5.5 y_p = 2x + 5.5 y p = 2 x + 5.5
Step 3: General solution:
y = C 1 e x + C 2 e 2 x + 2 x + 5.5 y = C_1e^x + C_2e^{2x} + 2x + 5.5 y = C 1 e x + C 2 e 2 x + 2 x + 5.5
Solve d 2 y d x 2 − d y d x − 6 y = 3 e 2 x \frac{d^2y}{dx^2} - \frac{dy}{dx} - 6y = 3e^{2x} d x 2 d 2 y − d x d y − 6 y = 3 e 2 x .
Step 1: Auxiliary: r 2 − r − 6 = 0 ⟹ r = 3 , − 2 r^2 - r - 6 = 0 \implies r = 3, -2 r 2 − r − 6 = 0 ⟹ r = 3 , − 2 . So y c = C 1 e 3 x + C 2 e − 2 x y_c = C_1e^{3x} + C_2e^{-2x} y c = C 1 e 3 x + C 2 e − 2 x .
Step 2: Try y p = A e 2 x y_p = Ae^{2x} y p = A e 2 x . Substituting:
4 A e 2 x − 2 A e 2 x − 6 A e 2 x = 3 e 2 x ⟹ − 4 A = 3 ⟹ A = − 3 4 4Ae^{2x} - 2Ae^{2x} - 6Ae^{2x} = 3e^{2x} \implies -4A = 3 \implies A = -\frac{3}{4} 4 A e 2 x − 2 A e 2 x − 6 A e 2 x = 3 e 2 x ⟹ − 4 A = 3 ⟹ A = − 4 3
Step 3: y = C 1 e 3 x + C 2 e − 2 x − 3 4 e 2 x y = C_1e^{3x} + C_2e^{-2x} - \frac{3}{4}e^{2x} y = C 1 e 3 x + C 2 e − 2 x − 4 3 e 2 x
Solve d 2 y d x 2 + 4 y = 3 sin 2 x \frac{d^2y}{dx^2} + 4y = 3\sin 2x d x 2 d 2 y + 4 y = 3 sin 2 x .
Step 1: Auxiliary: r 2 + 4 = 0 ⟹ r = ± 2 i r^2 + 4 = 0 \implies r = \pm 2i r 2 + 4 = 0 ⟹ r = ± 2 i . So y c = C 1 cos 2 x + C 2 sin 2 x y_c = C_1\cos 2x + C_2\sin 2x y c = C 1 cos 2 x + C 2 sin 2 x .
Step 2: Since sin 2 x \sin 2x sin 2 x and cos 2 x \cos 2x cos 2 x are already in y c y_c y c , multiply by x x x :
Try y p = x ( A cos 2 x + B sin 2 x ) y_p = x(A\cos 2x + B\sin 2x) y p = x ( A cos 2 x + B sin 2 x ) .
Computing derivatives and substituting:
− 4 A sin 2 x + 4 B cos 2 x = 3 sin 2 x -4A\sin 2x + 4B\cos 2x = 3\sin 2x − 4 A sin 2 x + 4 B cos 2 x = 3 sin 2 x
Comparing coefficients: − 4 A = 3 ⟹ A = − 3 4 -4A = 3 \implies A = -\frac{3}{4} − 4 A = 3 ⟹ A = − 4 3 ; 4 B = 0 ⟹ B = 0 4B = 0 \implies B = 0 4 B = 0 ⟹ B = 0 .
So y p = − 3 4 x cos 2 x y_p = -\frac{3}{4}x\cos 2x y p = − 4 3 x cos 2 x .
Step 3:
y = C 1 cos 2 x + C 2 sin 2 x − 3 4 x cos 2 x y = C_1\cos 2x + C_2\sin 2x - \frac{3}{4}x\cos 2x y = C 1 cos 2 x + C 2 sin 2 x − 4 3 x cos 2 x
Initial Value Problems (IVPs)
An initial value problem for a second-order ODE specifies:
The differential equation itself
The value of the function at a specific point: y ( x 0 ) = y 0 y(x_0) = y_0 y ( x 0 ) = y 0
The value of the first derivative at the same point: y ′ ( x 0 ) = y 1 y'(x_0) = y_1 y ′ ( x 0 ) = y 1
For a second-order ODE, we need exactly two conditions to determine the arbitrary constants.
Solve:
d 2 y d x 2 + y = x , y ( 0 ) = 2 , y ′ ( 0 ) = − 1 \frac{d^2y}{dx^2} + y = x, \quad y(0) = 2, \quad y'(0) = -1 d x 2 d 2 y + y = x , y ( 0 ) = 2 , y ′ ( 0 ) = − 1
Solution:
Complementary function: r 2 + 1 = 0 ⟹ r = ± i r^2 + 1 = 0 \implies r = \pm i r 2 + 1 = 0 ⟹ r = ± i , so y c = A cos x + B sin x y_c = A\cos x + B\sin x y c = A cos x + B sin x
Particular integral: Try y p = C x y_p = Cx y p = C x . Substituting: 0 + C x = x ⟹ C = 1 0 + Cx = x \implies C = 1 0 + C x = x ⟹ C = 1 . So y p = x y_p = x y p = x .
General solution: y = A cos x + B sin x + x y = A\cos x + B\sin x + x y = A cos x + B sin x + x
Apply initial conditions:
y ( 0 ) = A = 2 y(0) = A = 2 y ( 0 ) = A = 2
y ′ ( 0 ) = B + 1 = − 1 ⟹ B = − 2 y'(0) = B + 1 = -1 \implies B = -2 y ′ ( 0 ) = B + 1 = − 1 ⟹ B = − 2
Particular solution: y = 2 cos x − 2 sin x + x y = 2\cos x - 2\sin x + x y = 2 cos x − 2 sin x + x
Boundary Value Problems (BVPs)
A boundary value problem specifies conditions at different points:
y ( a ) = α and y ( b ) = β y(a) = \alpha \quad \text{and} \quad y(b) = \beta y ( a ) = α and y ( b ) = β
Solve:
d 2 y d x 2 + y = 0 , y ( 0 ) = 0 , y ( π / 2 ) = 1 \frac{d^2y}{dx^2} + y = 0, \quad y(0) = 0, \quad y(\pi/2) = 1 d x 2 d 2 y + y = 0 , y ( 0 ) = 0 , y ( π /2 ) = 1
Solution:
General solution: y = A cos x + B sin x y = A\cos x + B\sin x y = A cos x + B sin x
y ( 0 ) = A = 0 y(0) = A = 0 y ( 0 ) = A = 0
y ( π / 2 ) = B = 1 y(\pi/2) = B = 1 y ( π /2 ) = B = 1
y = sin x y = \sin x y = sin x
Sometimes a second-order ODE can be simplified through appropriate substitutions. We explore two main types: substituting the independent variable x x x and substituting the dependent variable y y y .
Substituting the Independent Variable
When a differential equation contains functions with a common argument, substitute that argument with a new variable to simplify.
Chain rule transformations: When t = f ( x ) t = f(x) t = f ( x ) and y = y ( t ) y = y(t) y = y ( t ) :
d y d x = d y d t ⋅ d t d x = d y d t ⋅ f ′ ( x ) \frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{dt}{dx} = \frac{dy}{dt} \cdot f'(x) d x d y = d t d y ⋅ d x d t = d t d y ⋅ f ′ ( x ) d 2 y d x 2 = d 2 y d t 2 ⋅ [ f ′ ( x ) ] 2 + d y d t ⋅ f ′ ′ ( x ) \frac{d^2y}{dx^2} = \frac{d^2y}{dt^2} \cdot [f'(x)]^2 + \frac{dy}{dt} \cdot f''(x) d x 2 d 2 y = d t 2 d 2 y ⋅ [ f ′ ( x ) ] 2 + d t d y ⋅ f ′′ ( x )
Solve:
x 2 d 2 y d x 2 − 3 x d y d x + 4 y = 0 , x > 0 x^2\frac{d^2y}{dx^2} - 3x\frac{dy}{dx} + 4y = 0, \quad x > 0 x 2 d x 2 d 2 y − 3 x d x d y + 4 y = 0 , x > 0
Using t = ln x t = \ln x t = ln x .
Solution:
Let t = ln x t = \ln x t = ln x , so x = e t x = e^t x = e t .
Transform derivatives:
d y d x = d y d t ⋅ 1 x \frac{dy}{dx} = \frac{dy}{dt} \cdot \frac{1}{x} d x d y = d t d y ⋅ x 1
d 2 y d x 2 = 1 x 2 ( d 2 y d t 2 − d y d t ) \frac{d^2y}{dx^2} = \frac{1}{x^2}\left(\frac{d^2y}{dt^2} - \frac{dy}{dt}\right) d x 2 d 2 y = x 2 1 ( d t 2 d 2 y − d t d y )
Substitute into the original equation:
x 2 ⋅ 1 x 2 ( d 2 y d t 2 − d y d t ) − 3 x ⋅ 1 x ⋅ d y d t + 4 y = 0 x^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 x 2 ⋅ x 2 1 ( d t 2 d 2 y − d t d y ) − 3 x ⋅ x 1 ⋅ d t d y + 4 y = 0
d 2 y d t 2 − 4 d y d t + 4 y = 0 \frac{d^2y}{dt^2} - 4\frac{dy}{dt} + 4y = 0 d t 2 d 2 y − 4 d t d y + 4 y = 0
Solve with constant coefficients:
Auxiliary: ( r − 2 ) 2 = 0 ⟹ r = 2 (r-2)^2 = 0 \implies r = 2 ( r − 2 ) 2 = 0 ⟹ r = 2 (repeated)
y ( t ) = C 1 e 2 t + C 2 t e 2 t y(t) = C_1e^{2t} + C_2te^{2t} y ( t ) = C 1 e 2 t + C 2 t e 2 t
Substitute back:
y ( x ) = C 1 x 2 + C 2 x 2 ln x y(x) = C_1x^2 + C_2x^2\ln x y ( x ) = C 1 x 2 + C 2 x 2 ln x
Solve:
x d 2 y d x 2 − ( 6 x 2 + 1 ) d y d x + 9 x 3 y = x 5 , x > 0 x\frac{d^2y}{dx^2} - (6x^2 + 1)\frac{dy}{dx} + 9x^3y = x^5, \quad x > 0 x d x 2 d 2 y − ( 6 x 2 + 1 ) d x d y + 9 x 3 y = x 5 , x > 0
Using x = t 1 2 x = t^{\frac{1}{2}} x = t 2 1 (equivalently t = x 2 t = x^2 t = x 2 ), this transforms into:
4 d 2 y d t 2 − 12 d y d t + 9 y = t 4\frac{d^2y}{dt^2} - 12\frac{dy}{dt} + 9y = t 4 d t 2 d 2 y − 12 d t d y + 9 y = t
which is a second-order ODE with constant coefficients.
Substituting the Dependent Variable
When a differential equation has a particular structure, substituting the dependent variable y y y can sometimes transform it into a simpler equation.
Solve:
d 2 y d x 2 − ( y ′ ) 2 y + y ′ = 0 \frac{d^2y}{dx^2} - \frac{(y')^2}{y} + y' = 0 d x 2 d 2 y − y ( y ′ ) 2 + y ′ = 0
Using y = e z y = e^z y = e z .
Solution:
Let y = e z y = e^z y = e z , so y ′ = e z z ′ y' = e^z z' y ′ = e z z ′ and y ′ ′ = e z ( z ′ ) 2 + e z z ′ ′ y'' = e^z(z')^2 + e^z z'' y ′′ = e z ( z ′ ) 2 + e z z ′′ .
Substitute:
e z ( z ′ ) 2 + e z z ′ ′ − ( e z z ′ ) 2 e z + e z z ′ = 0 e^z(z')^2 + e^z z'' - \frac{(e^z z')^2}{e^z} + e^z z' = 0 e z ( z ′ ) 2 + e z z ′′ − e z ( e z z ′ ) 2 + e z z ′ = 0
e z z ′ ′ + e z z ′ = 0 e^z z'' + e^z z' = 0 e z z ′′ + e z z ′ = 0
Since e z ≠ 0 e^z \neq 0 e z = 0 : z ′ ′ + z ′ = 0 z'' + z' = 0 z ′′ + z ′ = 0
Auxiliary: r 2 + r = 0 ⟹ r = 0 , − 1 r^2 + r = 0 \implies r = 0, -1 r 2 + r = 0 ⟹ r = 0 , − 1 . So z = C 1 + C 2 e − x z = C_1 + C_2e^{-x} z = C 1 + C 2 e − x .
Substitute back:
y = e C 1 + C 2 e − x = A ⋅ e B e − x y = e^{C_1 + C_2e^{-x}} = A \cdot e^{Be^{-x}} y = e C 1 + C 2 e − x = A ⋅ e B e − x
where A = e C 1 > 0 A = e^{C_1} > 0 A = e C 1 > 0 and B = C 2 B = C_2 B = C 2 are arbitrary constants.
Given:
x 2 d 2 y d x 2 − 2 y = 1 + 4 ln x − 2 ( ln x ) 2 , x > 0 x^2\frac{d^2y}{dx^2} - 2y = 1 + 4\ln x - 2(\ln x)^2, \quad x > 0 x 2 d x 2 d 2 y − 2 y = 1 + 4 ln x − 2 ( ln x ) 2 , x > 0
Show that using t = ln x t = \ln x t = ln x , this becomes:
d 2 y d t 2 − d y d t − 2 y = 1 + 4 t − 2 t 2 \frac{d^2y}{dt^2} - \frac{dy}{dt} - 2y = 1 + 4t - 2t^2 d t 2 d 2 y − d t d y − 2 y = 1 + 4 t − 2 t 2
Then solve to determine the general solution of the original equation.
Dependent vs. Independent Variable Change
Dependent Variable Change (y → v y \to v y → v ):
The substitution redefines the dependent variable: v = f ( y ) v = f(y) v = f ( y ) , y = g ( v ) y = g(v) y = g ( v )
Derivatives remain with respect to x x x (e.g., d v d x \frac{dv}{dx} d x d v )
You are changing what is varying with x x x
Examples: v = y − 2 v = y^{-2} v = y − 2 , z = y 2 z = y^2 z = y 2 , y = v e x y = ve^x y = v e x
Independent Variable Change (x → t x \to t x → t ):
The substitution redefines the independent variable: t = h ( x ) t = h(x) t = h ( x ) or x = k ( t ) x = k(t) x = k ( t )
y y y remains the dependent variable, but now as a function of t t t
Derivatives are with respect to t t t (e.g., d y d t \frac{dy}{dt} d t d y )
You are changing with respect to which variable y y y varies
Examples: t = ln x t = \ln x t = ln x , x = e t x = e^t x = e t , x = t 2 x = t^2 x = t 2
Chain Rule for Independent Variable Changes
Case 1: t = h ( x ) t = h(x) t = h ( x )
d y d x = d y d t ⋅ h ′ ( x ) \frac{dy}{dx} = \frac{dy}{dt} \cdot h'(x) d x d y = d t d y ⋅ h ′ ( x ) d 2 y d x 2 = d 2 y d t 2 ⋅ [ h ′ ( x ) ] 2 + d y d t ⋅ h ′ ′ ( x ) \frac{d^2y}{dx^2} = \frac{d^2y}{dt^2} \cdot [h'(x)]^2 + \frac{dy}{dt} \cdot h''(x) d x 2 d 2 y = d t 2 d 2 y ⋅ [ h ′ ( x ) ] 2 + d t d y ⋅ h ′′ ( x ) Express everything in terms of t t t using x = h − 1 ( t ) x = h^{-1}(t) x = h − 1 ( t ) .
Case 2: x = k ( t ) x = k(t) x = k ( t )
d y d x = d y / d t k ′ ( t ) \frac{dy}{dx} = \frac{dy/dt}{k'(t)} d x d y = k ′ ( t ) d y / d t d 2 y d x 2 = d 2 y d t 2 k ′ ( t ) − d y d t k ′ ′ ( t ) [ k ′ ( t ) ] 3 \frac{d^2y}{dx^2} = \frac{\frac{d^2y}{dt^2}k'(t) - \frac{dy}{dt}k''(t)}{[k'(t)]^3} d x 2 d 2 y = [ k ′ ( t ) ] 3 d t 2 d 2 y k ′ ( t ) − d t d y k ′′ ( t )
(a) Determine the general solution of
d 2 y d x 2 + 2 d y d x + 5 y = 6 cos x \frac{d^2y}{dx^2} + 2\frac{dy}{dx} + 5y = 6\cos x d x 2 d 2 y + 2 d x d y + 5 y = 6 cos x
(b) Find the particular solution for which y = 0 y = 0 y = 0 and d y d x = 0 \frac{dy}{dx} = 0 d x d y = 0 at x = 0 x = 0 x = 0 .
(a) Find the general solution of
d 2 y d x 2 − 6 d y d x + 8 y = 2 x 2 + x \frac{d^2y}{dx^2} - 6\frac{dy}{dx} + 8y = 2x^2 + x d x 2 d 2 y − 6 d x d y + 8 y = 2 x 2 + x
(b) Find the particular solution for which y = 1 y = 1 y = 1 and d y d x = 0 \frac{dy}{dx} = 0 d x d y = 0 when x = 0 x = 0 x = 0 .
(a) Show that the transformation y = x v y = xv y = xv transforms
3 d 2 y d x 2 − 6 x d y d x + 6 y x 2 + 3 y = x 2 , x ≠ 0 (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)} 3 d x 2 d 2 y − x 6 d x d y + x 2 6 y + 3 y = x 2 , x = 0 (I)
into
3 d 2 v d x 2 + 3 v = x (II) 3\frac{d^2v}{dx^2} + 3v = x \quad \text{(II)} 3 d x 2 d 2 v + 3 v = x (II)
(b) Hence obtain the general solution of (I), giving your answer in the form y = f ( x ) y = f(x) y = f ( x ) .
(a) Show that the transformation x = t 2 x = t^2 x = t 2 transforms
4 x d 2 y d x 2 + 2 ( 1 + 2 x ) d y d x − 15 y = 15 x (I) 4x\frac{d^2y}{dx^2} + 2(1 + 2\sqrt{x})\frac{dy}{dx} - 15y = 15x \quad \text{(I)} 4 x d x 2 d 2 y + 2 ( 1 + 2 x ) d x d y − 15 y = 15 x (I)
into
d 2 y d t 2 + 2 d y d t − 15 y = 15 t 2 (II) \frac{d^2y}{dt^2} + 2\frac{dy}{dt} - 15y = 15t^2 \quad \text{(II)} d t 2 d 2 y + 2 d t d y − 15 y = 15 t 2 (II)
(b) Solve (II) to determine y y y in terms of t t t .
(c) Hence determine the general solution of (I).