Differential Equations
Differential equations are equations involving derivatives of an unknown function. They arise
naturally whenever a rate of change is related to the current state of a system — from population
growth to electrical circuits. This chapter covers first-order equations (separable and integrating
factor methods), second-order linear equations with constant coefficients, and modelling
applications.
Adjust the parameters in the graph above to explore the relationships between variables.
Board Coverage
Board Paper Notes AQA Paper 1 First-order (separable, integrating factor), growth/decay models Edexcel FP2 First-order + second-order linear with constant coefficients OCR (A) Paper 1 First-order + second-order linear with constant coefficients CIE P2 First-order (separable, integrating factor); second-order in P2
All boards examine first-order ODEs. CIE and Edexcel require second-order linear ODEs. AQA
focuses on first-order equations with growth and decay modelling. The formula booklet gives the
integrating factor formula on Edexcel; AQA and OCR students must know it. :::
1. First-Order ODEs: Separable Equations 1.1 Definition Definition. A first-order ordinary differential equation (ODE) is separable if it can be
written in the form
d y d x = f ( x ) g ( y ) \frac{dy}{dx} = f(x)\,g(y) d x d y = f ( x ) g ( y )
where the right-hand side is a product of a function of x x x alone and a function of y y y alone.
1.2 Method Separate the variables and integrate both sides:
∫ 1 g ( y ) d y = ∫ f ( x ) d x \int \frac{1}{g(y)}\,dy = \int f(x)\,dx ∫ g ( y ) 1 d y = ∫ f ( x ) d x
∫ 1 g ( y ) d y = ∫ f ( x ) d x + C \boxed{\int \frac{1}{g(y)}\,dy = \int f(x)\,dx + C} ∫ g ( y ) 1 d y = ∫ f ( x ) d x + C
1.3 Worked example Solve d y d x = x y \dfrac{dy}{dx} = \dfrac{x}{y} d x d y = y x with y ( 0 ) = 2 y(0) = 2 y ( 0 ) = 2 .
Separate: y d y = x d x y\,dy = x\,dx y d y = x d x .
Integrate: y 2 2 = x 2 2 + C \dfrac{y^2}{2} = \dfrac{x^2}{2} + C 2 y 2 = 2 x 2 + C .
Using y ( 0 ) = 2 y(0) = 2 y ( 0 ) = 2 : 4 2 = 0 + C ⟹ C = 2 \dfrac{4}{2} = 0 + C \implies C = 2 2 4 = 0 + C ⟹ C = 2 .
y 2 = x 2 + 4 , y = x 2 + 4 y^2 = x^2 + 4, \quad y = \sqrt{x^2 + 4} y 2 = x 2 + 4 , y = x 2 + 4
(We take the positive root since y ( 0 ) = 2 > 0 y(0) = 2 > 0 y ( 0 ) = 2 > 0 .)
1.4 Domain restrictions When dividing by
g ( y ) g(y) g ( y ) during separation, we implicitly assume
g ( y ) ≠ 0 g(y) \neq 0 g ( y ) = 0 . If
g ( y 0 ) = 0 g(y_0) = 0 g ( y 0 ) = 0 , then y = y 0 y = y_0 y = y 0 is a constant (equilibrium) solution that may not appear in the general
solution. Always check for these. :::
Example. d y d x = y ( 1 − y ) \dfrac{dy}{dx} = y(1-y) d x d y = y ( 1 − y ) .
Separating: ∫ 1 y ( 1 − y ) d y = ∫ d x \displaystyle\int\frac{1}{y(1-y)}\,dy = \int dx ∫ y ( 1 − y ) 1 d y = ∫ d x .
Partial fractions: 1 y ( 1 − y ) = 1 y + 1 1 − y \dfrac{1}{y(1-y)} = \dfrac{1}{y} + \dfrac{1}{1-y} y ( 1 − y ) 1 = y 1 + 1 − y 1 .
ln ∣ y ∣ − ln ∣ 1 − y ∣ = x + C \ln|y| - \ln|1-y| = x + C ln ∣ y ∣ − ln ∣1 − y ∣ = x + C .
ln ∣ y 1 − y ∣ = x + C \ln\left|\dfrac{y}{1-y}\right| = x + C ln 1 − y y = x + C .
y 1 − y = A e x \dfrac{y}{1-y} = Ae^x 1 − y y = A e x where A = ± e C A = \pm e^C A = ± e C .
y = A e x 1 + A e x \boxed{y = \frac{Ae^x}{1 + Ae^x}} y = 1 + A e x A e x
But note y = 0 y = 0 y = 0 and y = 1 y = 1 y = 1 are also solutions (equilibrium solutions), corresponding to A = 0 A = 0 A = 0
and the limiting case A → ∞ A \to \infty A → ∞ .
2. First-Order ODEs: Integrating Factor Method Definition. A first-order linear ODE has the form
d y d x + P ( x ) y = Q ( x ) \frac{dy}{dx} + P(x)\,y = Q(x) d x d y + P ( x ) y = Q ( x )
where P ( x ) P(x) P ( x ) and Q ( x ) Q(x) Q ( x ) are continuous functions of x x x .
2.2 The integrating factor The integrating factor is
μ ( x ) = e ∫ P ( x ) d x \boxed{\mu(x) = e^{\int P(x)\,dx}} μ ( x ) = e ∫ P ( x ) d x
2.3 Derivation of the method Proof of the integrating factor technique Multiply the ODE d y d x + P ( x ) y = Q ( x ) \dfrac{dy}{dx} + P(x)\,y = Q(x) d x d y + P ( x ) y = Q ( x ) by μ ( x ) \mu(x) μ ( x ) :
μ d y d x + μ P y = μ Q \mu\frac{dy}{dx} + \mu P\,y = \mu Q μ d x d y + μ P y = μ Q
The left-hand side is the derivative of μ y \mu y μ y because:
d d x ( μ y ) = μ d y d x + y ◆ L B ◆ d μ ◆ R B ◆◆ L B ◆ d x ◆ R B ◆ \frac{d}{dx}(\mu y) = \mu\frac{dy}{dx} + y\frac◆LB◆d\mu◆RB◆◆LB◆dx◆RB◆ d x d ( μ y ) = μ d x d y + y L ◆ B ◆ d μ ◆ R B ◆◆ L B ◆ d x ◆ R B ◆
Since ◆ L B ◆ d μ ◆ R B ◆◆ L B ◆ d x ◆ R B ◆ = μ ⋅ P ( x ) \dfrac◆LB◆d\mu◆RB◆◆LB◆dx◆RB◆ = \mu \cdot P(x) L ◆ B ◆ d μ ◆ R B ◆◆ L B ◆ d x ◆ R B ◆ = μ ⋅ P ( x ) (because μ = e ∫ P d x \mu = e^{\int P\,dx} μ = e ∫ P d x , so
μ ′ = P ⋅ e ∫ P d x = P μ \mu' = P \cdot e^{\int P\,dx} = P\mu μ ′ = P ⋅ e ∫ P d x = P μ ):
d d x ( μ y ) = μ d y d x + y ⋅ P μ = μ d y d x + μ P y \frac{d}{dx}(\mu y) = \mu\frac{dy}{dx} + y \cdot P\mu = \mu\frac{dy}{dx} + \mu P\,y d x d ( μ y ) = μ d x d y + y ⋅ P μ = μ d x d y + μ P y
This is exactly the left-hand side. Therefore:
d d x ( μ y ) = μ Q \frac{d}{dx}(\mu y) = \mu Q d x d ( μ y ) = μ Q
Integrating both sides:
μ y = ∫ μ Q d x + C \boxed{\mu y = \int \mu Q\,dx + C} μ y = ∫ μ Q d x + C
y = ◆ L B ◆ 1 ◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ( ∫ μ Q d x + C ) \boxed{y = \frac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\left(\int \mu\, Q\,dx + C\right)} y = L ◆ B ◆1◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ( ∫ μ Q d x + C )
□ \square □
2.4 Worked example Solve d y d x + 2 x y = x 2 \dfrac{dy}{dx} + \dfrac{2}{x}\,y = x^2 d x d y + x 2 y = x 2 for x > 0 x > 0 x > 0 .
Here P ( x ) = 2 x P(x) = \dfrac{2}{x} P ( x ) = x 2 , Q ( x ) = x 2 Q(x) = x^2 Q ( x ) = x 2 .
μ = e ∫ 2 / x d x = e 2 ln x = x 2 \mu = e^{\int 2/x\,dx} = e^{2\ln x} = x^2 μ = e ∫ 2/ x d x = e 2 l n x = x 2
Multiply through: x 2 d y d x + 2 x y = x 4 x^2\dfrac{dy}{dx} + 2xy = x^4 x 2 d x d y + 2 x y = x 4 .
Left-hand side is d d x ( x 2 y ) = x 4 \dfrac{d}{dx}(x^2 y) = x^4 d x d ( x 2 y ) = x 4 .
Integrate: x 2 y = x 5 5 + C x^2 y = \dfrac{x^5}{5} + C x 2 y = 5 x 5 + C .
y = x 3 5 + C x 2 \boxed{y = \frac{x^3}{5} + \frac{C}{x^2}} y = 5 x 3 + x 2 C
2.5 Worked example with boundary condition Solve d y d x − 3 y = e 2 x \dfrac{dy}{dx} - 3y = e^{2x} d x d y − 3 y = e 2 x , given y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 .
P ( x ) = − 3 P(x) = -3 P ( x ) = − 3 , Q ( x ) = e 2 x Q(x) = e^{2x} Q ( x ) = e 2 x .
μ = e ∫ − 3 d x = e − 3 x \mu = e^{\int -3\,dx} = e^{-3x} μ = e ∫ − 3 d x = e − 3 x
d d x ( e − 3 x y ) = e − 3 x ⋅ e 2 x = e − x \frac{d}{dx}(e^{-3x}y) = e^{-3x} \cdot e^{2x} = e^{-x} d x d ( e − 3 x y ) = e − 3 x ⋅ e 2 x = e − x
e − 3 x y = ∫ e − x d x = − e − x + C e^{-3x}y = \int e^{-x}\,dx = -e^{-x} + C e − 3 x y = ∫ e − x d x = − e − x + C
y = − e 2 x + C e 3 x y = -e^{2x} + Ce^{3x} y = − e 2 x + C e 3 x
Using y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 : 1 = − 1 + C ⟹ C = 2 1 = -1 + C \implies C = 2 1 = − 1 + C ⟹ C = 2 .
y = 2 e 3 x − e 2 x \boxed{y = 2e^{3x} - e^{2x}} y = 2 e 3 x − e 2 x
The constant of integration in
μ = e ∫ P d x \mu = e^{\int P\,dx} μ = e ∫ P d x can be omitted (absorbed into
C C C ).
Always choose the simplest antiderivative. :::
3. Second-Order Linear ODEs with Constant Coefficients Definition. A second-order linear ODE with constant coefficients has the form
a d 2 y d x 2 + b d y d x + c y = f ( x ) a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = f(x) a d x 2 d 2 y + b d x d y + cy = f ( x )
where a a a , b b b , c c c are constants with a ≠ 0 a \neq 0 a = 0 .
The equation is homogeneous when f ( x ) = 0 f(x) = 0 f ( x ) = 0 :
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
3.2 The auxiliary equation To solve the homogeneous equation, try y = e m x y = e^{mx} y = e m x . Then y ′ = m e m x y' = me^{mx} y ′ = m e m x and y ′ ′ = m 2 e m x y'' = m^2 e^{mx} y ′′ = m 2 e m x .
Substituting: a m 2 e m x + b m e m x + c e m x = 0 am^2 e^{mx} + bme^{mx} + ce^{mx} = 0 a m 2 e m x + bm e m x + c e m x = 0 .
Since e m x ≠ 0 e^{mx} \neq 0 e m x = 0 for all x x x :
a m 2 + b m + c = 0 \boxed{am^2 + bm + c = 0} a m 2 + bm + c = 0
This is the auxiliary equation (or characteristic equation ).
3.3 Three cases The nature of the roots of a m 2 + b m + c = 0 am^2 + bm + c = 0 a m 2 + bm + c = 0 determines the form of the general solution.
Case 1: Two distinct real roots m 1 ≠ m 2 m_1 \neq m_2 m 1 = m 2 (discriminant Δ = b 2 − 4 a c > 0 \Delta = b^2 - 4ac > 0 Δ = b 2 − 4 a c > 0 ):
y = A e m 1 x + B e m 2 x \boxed{y = Ae^{m_1 x} + Be^{m_2 x}} y = A e m 1 x + B e m 2 x
Case 2: Repeated real root m m m (discriminant Δ = 0 \Delta = 0 Δ = 0 ):
y = ( A + B x ) e m x \boxed{y = (A + Bx)e^{mx}} y = ( A + B x ) e m x
Case 3: Complex conjugate roots m = α ± β i m = \alpha \pm \beta i m = α ± β i (discriminant Δ < 0 \Delta < 0 Δ < 0 ):
y = e α x ( A cos β x + B sin β x ) \boxed{y = e^{\alpha x}(A\cos\beta x + B\sin\beta x)} y = e α x ( A cos β x + B sin β x )
Proof of the general solution for Case 3 (complex roots) When m = α + β i m = \alpha + \beta i m = α + β i and m ‾ = α − β i \overline{m} = \alpha - \beta i m = α − β i , the two linearly independent
solutions are e ( α + β i ) x e^{(\alpha+\beta i)x} e ( α + β i ) x and e ( α − β i ) x e^{(\alpha-\beta i)x} e ( α − β i ) x .
Using Euler's formula e i θ = cos θ + i sin θ e^{i\theta} = \cos\theta + i\sin\theta e i θ = cos θ + i sin θ :
e ( α + β i ) x = e α x ( cos β x + i sin β x ) e^{(\alpha+\beta i)x} = e^{\alpha x}(\cos\beta x + i\sin\beta x) e ( α + β i ) x = e α x ( cos β x + i sin β x )
e ( α − β i ) x = e α x ( cos β x − i sin β x ) e^{(\alpha-\beta i)x} = e^{\alpha x}(\cos\beta x - i\sin\beta x) e ( α − β i ) x = e α x ( cos β x − i sin β x )
Any linear combination C 1 e ( α + β i ) x + C 2 e ( α − β i ) x C_1 e^{(\alpha+\beta i)x} + C_2 e^{(\alpha-\beta i)x} C 1 e ( α + β i ) x + C 2 e ( α − β i ) x can be rewritten as:
e α x [ ( C 1 + C 2 ) cos β x + i ( C 1 − C 2 ) sin β x ] e^{\alpha x}\left[(C_1+C_2)\cos\beta x + i(C_1-C_2)\sin\beta x\right] e α x [ ( C 1 + C 2 ) cos β x + i ( C 1 − C 2 ) sin β x ]
Setting A = C 1 + C 2 A = C_1 + C_2 A = C 1 + C 2 and B = i ( C 1 − C 2 ) B = i(C_1 - C_2) B = i ( C 1 − C 2 ) (which are real when C 1 C_1 C 1 and C 2 C_2 C 2 are complex
conjugates), we obtain:
y = e α x ( A cos β x + B sin β x ) y = e^{\alpha x}(A\cos\beta x + B\sin\beta x) y = e α x ( A cos β x + B sin β x )
□ \square □
3.4 Worked examples Example (Case 1). Solve y ′ ′ − 5 y ′ + 6 y = 0 y'' - 5y' + 6y = 0 y ′′ − 5 y ′ + 6 y = 0 .
Auxiliary: m 2 − 5 m + 6 = 0 ⟹ ( m − 2 ) ( m − 3 ) = 0 ⟹ m = 2 , 3 m^2 - 5m + 6 = 0 \implies (m-2)(m-3) = 0 \implies m = 2, 3 m 2 − 5 m + 6 = 0 ⟹ ( m − 2 ) ( m − 3 ) = 0 ⟹ m = 2 , 3 .
y = A e 2 x + B e 3 x y = Ae^{2x} + Be^{3x} y = A e 2 x + B e 3 x
Example (Case 2). Solve y ′ ′ − 4 y ′ + 4 y = 0 y'' - 4y' + 4y = 0 y ′′ − 4 y ′ + 4 y = 0 .
Auxiliary: m 2 − 4 m + 4 = 0 ⟹ ( m − 2 ) 2 = 0 ⟹ m = 2 m^2 - 4m + 4 = 0 \implies (m-2)^2 = 0 \implies m = 2 m 2 − 4 m + 4 = 0 ⟹ ( m − 2 ) 2 = 0 ⟹ m = 2 (repeated).
y = ( A + B x ) e 2 x y = (A + Bx)e^{2x} y = ( A + B x ) e 2 x
Example (Case 3). Solve y ′ ′ + 2 y ′ + 5 y = 0 y'' + 2y' + 5y = 0 y ′′ + 2 y ′ + 5 y = 0 .
Auxiliary: m 2 + 2 m + 5 = 0 ⟹ m = ◆ L B ◆ − 2 ± 4 − 20 ◆ R B ◆◆ L B ◆ 2 ◆ R B ◆ = − 1 ± 2 i m^2 + 2m + 5 = 0 \implies m = \dfrac◆LB◆-2 \pm \sqrt{4-20}◆RB◆◆LB◆2◆RB◆ = -1 \pm 2i m 2 + 2 m + 5 = 0 ⟹ m = L ◆ B ◆ − 2 ± 4 − 20 ◆ R B ◆◆ L B ◆2◆ R B ◆ = − 1 ± 2 i .
y = e − x ( A cos 2 x + B sin 2 x ) y = e^{-x}(A\cos 2x + B\sin 2x) y = e − x ( A cos 2 x + B sin 2 x )
4. Non-Homogeneous Second-Order ODEs: Particular Solutions 4.1 Structure of the general solution Theorem (Superposition). If y h y_h y h is the general solution of the homogeneous equation
a y ′ ′ + b y ′ + c y = 0 a y'' + by' + cy = 0 a y ′′ + b y ′ + cy = 0 (the complementary function , CF), and y p y_p y p is any particular solution of
a y ′ ′ + b y ′ + c y = f ( x ) a y'' + by' + cy = f(x) a y ′′ + b y ′ + cy = f ( x ) (a particular integral , PI), then the general solution is
y = y h + y p \boxed{y = y_h + y_p} y = y h + y p
Proof of the superposition principle Let y 1 y_1 y 1 satisfy a y 1 ′ ′ + b y 1 ′ + c y 1 = 0 a y_1'' + by_1' + cy_1 = 0 a y 1 ′′ + b y 1 ′ + c y 1 = 0 and y p y_p y p satisfy a y p ′ ′ + b y p ′ + c y p = f ( x ) a y_p'' + by_p' + cy_p = f(x) a y p ′′ + b y p ′ + c y p = f ( x ) .
Define y = y 1 + y p y = y_1 + y_p y = y 1 + y p . Then:
a y ′ ′ + b y ′ + c y = a ( y 1 ′ ′ + y p ′ ′ ) + b ( y 1 ′ + y p ′ ) + c ( y 1 + y p ) ay'' + by' + cy = a(y_1'' + y_p'') + b(y_1' + y_p') + c(y_1 + y_p) a y ′′ + b y ′ + cy = a ( y 1 ′′ + y p ′′ ) + b ( y 1 ′ + y p ′ ) + c ( y 1 + y p )
= ( a y 1 ′ ′ + b y 1 ′ + c y 1 ) + ( a y p ′ ′ + b y p ′ + c y p ) = 0 + f ( x ) = f ( x ) = (ay_1'' + by_1' + cy_1) + (ay_p'' + by_p' + cy_p) = 0 + f(x) = f(x) = ( a y 1 ′′ + b y 1 ′ + c y 1 ) + ( a y p ′′ + b y p ′ + c y p ) = 0 + f ( x ) = f ( x )
So y 1 + y p y_1 + y_p y 1 + y p satisfies the non-homogeneous equation. Since y 1 y_1 y 1 contains two arbitrary constants,
the general solution y = y h + y p y = y_h + y_p y = y h + y p also contains two arbitrary constants. □ \square □
4.2 Method of undetermined coefficients To find y p y_p y p , guess the form based on f ( x ) f(x) f ( x ) , then determine coefficients by substitution.
f ( x ) f(x) f ( x ) Trial y p y_p y p (if not in CF) If in CF, multiply by x x x k k k (constant)c c c c x cx c x then c x 2 cx^2 c x 2 k x + ℓ kx + \ell k x + ℓ p x + q px + q p x + q x ( p x + q ) x(px+q) x ( p x + q ) then x 2 ( p x + q ) x^2(px+q) x 2 ( p x + q ) k e α x ke^{\alpha x} k e α x c e α x ce^{\alpha x} c e α x c x e α x cxe^{\alpha x} c x e α x k cos ω x k\cos\omega x k cos ω x c cos ω x + d sin ω x c\cos\omega x + d\sin\omega x c cos ω x + d sin ω x x ( c cos ω x + d sin ω x ) x(c\cos\omega x + d\sin\omega x) x ( c cos ω x + d sin ω x ) k sin ω x k\sin\omega x k sin ω x c cos ω x + d sin ω x c\cos\omega x + d\sin\omega x c cos ω x + d sin ω x x ( c cos ω x + d sin ω x ) x(c\cos\omega x + d\sin\omega x) x ( c cos ω x + d sin ω x ) Polynomial General polynomial of same degree Multiply by x x x as needed
If any term in your trial
y p y_p y p already appears in the complementary function
y h y_h y h ,
multiply the entire trial by x x x . If it still appears, multiply by x 2 x^2 x 2 . :::
4.3 Worked examples Example 1. Solve y ′ ′ − 3 y ′ + 2 y = 4 e 3 x y'' - 3y' + 2y = 4e^{3x} y ′′ − 3 y ′ + 2 y = 4 e 3 x .
CF: m 2 − 3 m + 2 = 0 ⟹ ( m − 1 ) ( m − 2 ) = 0 ⟹ m = 1 , 2 m^2 - 3m + 2 = 0 \implies (m-1)(m-2) = 0 \implies m = 1, 2 m 2 − 3 m + 2 = 0 ⟹ ( m − 1 ) ( m − 2 ) = 0 ⟹ m = 1 , 2 . y h = A e x + B e 2 x y_h = Ae^x + Be^{2x} y h = A e x + B e 2 x .
PI: Since f ( x ) = 4 e 3 x f(x) = 4e^{3x} f ( x ) = 4 e 3 x and e 3 x e^{3x} e 3 x is not in the CF, try y p = c e 3 x y_p = ce^{3x} y p = c e 3 x . y p ′ = 3 c e 3 x y_p' = 3ce^{3x} y p ′ = 3 c e 3 x ,
y p ′ ′ = 9 c e 3 x y_p'' = 9ce^{3x} y p ′′ = 9 c e 3 x .
Substitute: 9 c e 3 x − 9 c e 3 x + 2 c e 3 x = 4 e 3 x ⟹ 2 c = 4 ⟹ c = 2 9ce^{3x} - 9ce^{3x} + 2ce^{3x} = 4e^{3x} \implies 2c = 4 \implies c = 2 9 c e 3 x − 9 c e 3 x + 2 c e 3 x = 4 e 3 x ⟹ 2 c = 4 ⟹ c = 2 .
y = A e x + B e 2 x + 2 e 3 x \boxed{y = Ae^x + Be^{2x} + 2e^{3x}} y = A e x + B e 2 x + 2 e 3 x
Example 2. Solve y ′ ′ + y = sin x y'' + y = \sin x y ′′ + y = sin x .
CF: m 2 + 1 = 0 ⟹ m = ± i m^2 + 1 = 0 \implies m = \pm i m 2 + 1 = 0 ⟹ m = ± i . y h = A cos x + B sin x y_h = A\cos x + B\sin x y h = A cos x + B sin x .
PI: f ( x ) = sin x f(x) = \sin x f ( x ) = sin x . The terms cos x \cos x cos x and sin x \sin x sin x are in the CF, so multiply by x x x :
y p = x ( c cos x + d sin x ) y_p = x(c\cos x + d\sin x) y p = x ( c cos x + d sin x ) .
y p ′ = ( c cos x + d sin x ) + x ( − c sin x + d cos x ) y_p' = (c\cos x + d\sin x) + x(-c\sin x + d\cos x) y p ′ = ( c cos x + d sin x ) + x ( − c sin x + d cos x )
y p ′ ′ = 2 ( − c sin x + d cos x ) + x ( − c cos x − d sin x ) y_p'' = 2(-c\sin x + d\cos x) + x(-c\cos x - d\sin x) y p ′′ = 2 ( − c sin x + d cos x ) + x ( − c cos x − d sin x )
Substitute into y ′ ′ + y = sin x y'' + y = \sin x y ′′ + y = sin x :
2 ( − c sin x + d cos x ) + x ( − c cos x − d sin x ) + x ( c cos x + d sin x ) = sin x 2(-c\sin x + d\cos x) + x(-c\cos x - d\sin x) + x(c\cos x + d\sin x) = \sin x 2 ( − c sin x + d cos x ) + x ( − c cos x − d sin x ) + x ( c cos x + d sin x ) = sin x
2 ( − c sin x + d cos x ) = sin x 2(-c\sin x + d\cos x) = \sin x 2 ( − c sin x + d cos x ) = sin x
Comparing: − 2 c = 1 ⟹ c = − 1 2 -2c = 1 \implies c = -\dfrac{1}{2} − 2 c = 1 ⟹ c = − 2 1 , and 2 d = 0 ⟹ d = 0 2d = 0 \implies d = 0 2 d = 0 ⟹ d = 0 .
y = A cos x + B sin x − 1 2 x cos x \boxed{y = A\cos x + B\sin x - \frac{1}{2}x\cos x} y = A cos x + B sin x − 2 1 x cos x
Example 3. Solve y ′ ′ − 4 y ′ + 4 y = 3 x + 2 y'' - 4y' + 4y = 3x + 2 y ′′ − 4 y ′ + 4 y = 3 x + 2 .
CF: m 2 − 4 m + 4 = 0 ⟹ ( m − 2 ) 2 = 0 m^2 - 4m + 4 = 0 \implies (m-2)^2 = 0 m 2 − 4 m + 4 = 0 ⟹ ( m − 2 ) 2 = 0 . y h = ( A + B x ) e 2 x y_h = (A + Bx)e^{2x} y h = ( A + B x ) e 2 x .
PI: Try y p = p x + q y_p = px + q y p = p x + q . y p ′ = p y_p' = p y p ′ = p , y p ′ ′ = 0 y_p'' = 0 y p ′′ = 0 .
0 − 4 p + 4 ( p x + q ) = 3 x + 2 0 - 4p + 4(px + q) = 3x + 2 0 − 4 p + 4 ( p x + q ) = 3 x + 2 . 4 p x + ( 4 q − 4 p ) = 3 x + 2 4px + (4q - 4p) = 3x + 2 4 p x + ( 4 q − 4 p ) = 3 x + 2 .
4 p = 3 ⟹ p = 3 4 4p = 3 \implies p = \dfrac{3}{4} 4 p = 3 ⟹ p = 4 3 . 4 q − 3 = 2 ⟹ q = 5 4 4q - 3 = 2 \implies q = \dfrac{5}{4} 4 q − 3 = 2 ⟹ q = 4 5 .
y = ( A + B x ) e 2 x + 3 4 x + 5 4 \boxed{y = (A + Bx)e^{2x} + \frac{3}{4}x + \frac{5}{4}} y = ( A + B x ) e 2 x + 4 3 x + 4 5
5. Growth and Decay Models 5.1 Exponential growth and decay The ODE d y d t = k y \dfrac{dy}{dt} = ky d t d y = k y (where k k k is a constant) has solution
y = y 0 e k t \boxed{y = y_0 e^{kt}} y = y 0 e k t
where y 0 = y ( 0 ) y_0 = y(0) y 0 = y ( 0 ) . If k > 0 k > 0 k > 0 : exponential growth. If k < 0 k < 0 k < 0 : exponential decay.
Proof. Separable:
1 y d y d t = k ⟹ ∫ 1 y d y = ∫ k d t ⟹ ln y = k t + C \dfrac{1}{y}\dfrac{dy}{dt} = k \implies \displaystyle\int \frac{1}{y}\,dy = \int k\,dt \implies \ln y = kt + C y 1 d t d y = k ⟹ ∫ y 1 d y = ∫ k d t ⟹ ln y = k t + C .
y = e k t + C = A e k t y = e^{kt+C} = Ae^{kt} y = e k t + C = A e k t . With y ( 0 ) = y 0 y(0) = y_0 y ( 0 ) = y 0 : A = y 0 A = y_0 A = y 0 . □ \square □
5.2 Newton's law of cooling Definition. Newton's law of cooling states that the rate of temperature change of a body is
proportional to the difference between its temperature T T T and the ambient temperature T a T_a T a :
d T d t = − k ( T − T a ) \frac{dT}{dt} = -k(T - T_a) d t d T = − k ( T − T a )
where k > 0 k > 0 k > 0 is the cooling constant.
Solution. Let θ = T − T a \theta = T - T_a θ = T − T a . Then ◆ L B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ = − k θ \dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ = -k\theta L ◆ B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ = − k θ , giving
θ = θ 0 e − k t \theta = \theta_0 e^{-kt} θ = θ 0 e − k t .
T = T a + ( T 0 − T a ) e − k t \boxed{T = T_a + (T_0 - T_a)e^{-kt}} T = T a + ( T 0 − T a ) e − k t
Example. A cup of tea at 90 ° C 90°C 90° C is placed in a room at 20 ° C 20°C 20° C . After 10 minutes the temperature
is 60 ° C 60°C 60° C . Find the temperature after 20 minutes.
T 0 = 90 T_0 = 90 T 0 = 90 , T a = 20 T_a = 20 T a = 20 . T ( 10 ) = 60 T(10) = 60 T ( 10 ) = 60 :
60 = 20 + 70 e − 10 k ⟹ e − 10 k = 40 70 = 4 7 ⟹ k = 1 10 ln 7 4 60 = 20 + 70e^{-10k} \implies e^{-10k} = \dfrac{40}{70} = \dfrac{4}{7} \implies k = \dfrac{1}{10}\ln\dfrac{7}{4} 60 = 20 + 70 e − 10 k ⟹ e − 10 k = 70 40 = 7 4 ⟹ k = 10 1 ln 4 7 .
T ( 20 ) = 20 + 70 e − 20 k = 20 + 70 ( 4 7 ) 2 = 20 + 70 ⋅ 16 49 = 20 + 160 7 ≈ 42.9 ° C T(20) = 20 + 70e^{-20k} = 20 + 70\left(\dfrac{4}{7}\right)^2 = 20 + 70 \cdot \dfrac{16}{49} = 20 + \dfrac{160}{7} \approx 42.9°C T ( 20 ) = 20 + 70 e − 20 k = 20 + 70 ( 7 4 ) 2 = 20 + 70 ⋅ 49 16 = 20 + 7 160 ≈ 42.9° C .
5.3 Population growth with carrying capacity The logistic equation models population growth with a carrying capacity M M M :
d P d t = k P ( 1 − P M ) \frac{dP}{dt} = kP\left(1 - \frac{P}{M}\right) d t d P = k P ( 1 − M P )
This is separable. The solution is
P ( t ) = M 1 + A e − k t \boxed{P(t) = \frac{M}{1 + Ae^{-kt}}} P ( t ) = 1 + A e − k t M
where A = M − P 0 P 0 A = \dfrac{M - P_0}{P_0} A = P 0 M − P 0 .
5.4 Mixing problems Example. A tank contains 100 litres of water with 10 kg of salt. Pure water flows in at 5 L/min,
and the mixture flows out at 5 L/min. Find the amount of salt after t t t minutes.
Let S ( t ) S(t) S ( t ) be the amount of salt (kg). Rate in = 0. Rate out = concentration × \times × flow rate
= S 100 × 5 = S 20 = \dfrac{S}{100} \times 5 = \dfrac{S}{20} = 100 S × 5 = 20 S .
d S d t = − S 20 \frac{dS}{dt} = -\frac{S}{20} d t d S = − 20 S
S = 10 e − t / 20 S = 10e^{-t/20} S = 10 e − t /20 .
After 20 minutes: S ( 20 ) = 10 e − 1 ≈ 3.68 S(20) = 10e^{-1} \approx 3.68 S ( 20 ) = 10 e − 1 ≈ 3.68 kg.
6. Proof of the General Solution of the Second-Order Homogeneous ODE Proof that the CF gives the general solution We must show that for all three cases, the proposed general solution has two arbitrary constants and
satisfies the ODE.
Case 1 (m 1 ≠ m 2 m_1 \neq m_2 m 1 = m 2 , real). Let y 1 = e m 1 x y_1 = e^{m_1 x} y 1 = e m 1 x and y 2 = e m 2 x y_2 = e^{m_2 x} y 2 = e m 2 x .
Substituting y 1 y_1 y 1 into a y ′ ′ + b y ′ + c y = 0 ay'' + by' + cy = 0 a y ′′ + b y ′ + cy = 0 :
a m 1 2 e m 1 x + b m 1 e m 1 x + c e m 1 x = ( a m 1 2 + b m 1 + c ) e m 1 x = 0 am_1^2 e^{m_1 x} + bm_1 e^{m_1 x} + ce^{m_1 x} = (am_1^2 + bm_1 + c)e^{m_1 x} = 0 a m 1 2 e m 1 x + b m 1 e m 1 x + c e m 1 x = ( a m 1 2 + b m 1 + c ) e m 1 x = 0 since m 1 m_1 m 1 is a
root. Similarly for y 2 y_2 y 2 .
The Wronskian is
W = y 1 y 2 ′ − y 1 ′ y 2 = m 2 e ( m 1 + m 2 ) x − m 1 e ( m 1 + m 2 ) x = ( m 2 − m 1 ) e ( m 1 + m 2 ) x ≠ 0 W = y_1 y_2' - y_1' y_2 = m_2 e^{(m_1+m_2)x} - m_1 e^{(m_1+m_2)x} = (m_2 - m_1)e^{(m_1+m_2)x} \neq 0 W = y 1 y 2 ′ − y 1 ′ y 2 = m 2 e ( m 1 + m 2 ) x − m 1 e ( m 1 + m 2 ) x = ( m 2 − m 1 ) e ( m 1 + m 2 ) x = 0 .
Since W ≠ 0 W \neq 0 W = 0 , y 1 y_1 y 1 and y 2 y_2 y 2 are linearly independent, so y = A e m 1 x + B e m 2 x y = Ae^{m_1 x} + Be^{m_2 x} y = A e m 1 x + B e m 2 x is the
general solution.
Case 2 (m m m repeated). y 1 = e m x y_1 = e^{mx} y 1 = e m x is one solution. We need a second linearly independent
solution. Try y 2 = x e m x y_2 = xe^{mx} y 2 = x e m x .
y 2 ′ = e m x ( 1 + m x ) y_2' = e^{mx}(1 + mx) y 2 ′ = e m x ( 1 + m x ) , y 2 ′ ′ = e m x ( 2 m + m 2 x ) y_2'' = e^{mx}(2m + m^2 x) y 2 ′′ = e m x ( 2 m + m 2 x ) .
a y 2 ′ ′ + b y 2 ′ + c y 2 = e m x [ a ( 2 m + m 2 x ) + b ( 1 + m x ) + c x ] ay_2'' + by_2' + cy_2 = e^{mx}\left[a(2m + m^2 x) + b(1 + mx) + cx\right] a y 2 ′′ + b y 2 ′ + c y 2 = e m x [ a ( 2 m + m 2 x ) + b ( 1 + m x ) + c x ]
= e m x [ ( a m 2 + b m + c ) x + ( 2 a m + b ) ] = e^{mx}\left[(am^2 + bm + c)x + (2am + b)\right] = e m x [ ( a m 2 + bm + c ) x + ( 2 am + b ) ]
The coefficient of x x x is zero since m m m satisfies the auxiliary equation. The constant:
2 a m + b = 0 2am + b = 0 2 am + b = 0 when the root is repeated (since m = − b / 2 a m = -b/2a m = − b /2 a ). So y 2 y_2 y 2 is also a solution.
The Wronskian: W = e m x ⋅ e m x ( 1 + m x ) − m e m x ⋅ x e m x = e 2 m x ≠ 0 W = e^{mx} \cdot e^{mx}(1+mx) - me^{mx} \cdot xe^{mx} = e^{2mx} \neq 0 W = e m x ⋅ e m x ( 1 + m x ) − m e m x ⋅ x e m x = e 2 m x = 0 .
Therefore y = ( A + B x ) e m x y = (A + Bx)e^{mx} y = ( A + B x ) e m x is the general solution.
□ \square □
Problems Problem 1 Solve d y d x = 3 x 2 y 2 \dfrac{dy}{dx} = \dfrac{3x^2}{y^2} d x d y = y 2 3 x 2 given y ( 1 ) = 2 y(1) = 2 y ( 1 ) = 2 .
Solution 1 Separate: y 2 d y = 3 x 2 d x y^2\,dy = 3x^2\,dx y 2 d y = 3 x 2 d x .
Integrate: y 3 3 = x 3 + C \dfrac{y^3}{3} = x^3 + C 3 y 3 = x 3 + C .
y ( 1 ) = 2 y(1) = 2 y ( 1 ) = 2 : 8 3 = 1 + C ⟹ C = 5 3 \dfrac{8}{3} = 1 + C \implies C = \dfrac{5}{3} 3 8 = 1 + C ⟹ C = 3 5 .
y 3 = 3 x 3 + 5 ⟹ y = 3 x 3 + 5 3 y^3 = 3x^3 + 5 \implies \boxed{y = \sqrt[3]{3x^3 + 5}} y 3 = 3 x 3 + 5 ⟹ y = 3 3 x 3 + 5 .
If you get this wrong, revise: Separable Equations —
Section 1.
Problem 2 Solve d y d x + 3 x y = x 2 \dfrac{dy}{dx} + \dfrac{3}{x}\,y = x^2 d x d y + x 3 y = x 2 for x > 0 x > 0 x > 0 , given y ( 1 ) = 0 y(1) = 0 y ( 1 ) = 0 .
Solution 2 P ( x ) = 3 / x P(x) = 3/x P ( x ) = 3/ x , Q ( x ) = x 2 Q(x) = x^2 Q ( x ) = x 2 .
μ = e ∫ 3 / x d x = e 3 ln x = x 3 \mu = e^{\int 3/x\,dx} = e^{3\ln x} = x^3 μ = e ∫ 3/ x d x = e 3 l n x = x 3 .
d d x ( x 3 y ) = x 3 ⋅ x 2 = x 5 \dfrac{d}{dx}(x^3 y) = x^3 \cdot x^2 = x^5 d x d ( x 3 y ) = x 3 ⋅ x 2 = x 5 .
x 3 y = x 6 6 + C x^3 y = \dfrac{x^6}{6} + C x 3 y = 6 x 6 + C .
y = x 3 6 + C x 3 y = \dfrac{x^3}{6} + \dfrac{C}{x^3} y = 6 x 3 + x 3 C .
y ( 1 ) = 0 y(1) = 0 y ( 1 ) = 0 : 1 6 + C = 0 ⟹ C = − 1 6 \dfrac{1}{6} + C = 0 \implies C = -\dfrac{1}{6} 6 1 + C = 0 ⟹ C = − 6 1 .
y = x 3 6 − 1 6 x 3 = x 6 − 1 6 x 3 \boxed{y = \dfrac{x^3}{6} - \dfrac{1}{6x^3} = \dfrac{x^6 - 1}{6x^3}} y = 6 x 3 − 6 x 3 1 = 6 x 3 x 6 − 1 .
If you get this wrong, revise:
Integrating Factor — Section 2.
Problem 3 Solve y ′ ′ − 6 y ′ + 9 y = 0 y'' - 6y' + 9y = 0 y ′′ − 6 y ′ + 9 y = 0 given y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 and y ′ ( 0 ) = 0 y'(0) = 0 y ′ ( 0 ) = 0 .
Solution 3 Auxiliary: m 2 − 6 m + 9 = 0 ⟹ ( m − 3 ) 2 = 0 ⟹ m = 3 m^2 - 6m + 9 = 0 \implies (m-3)^2 = 0 \implies m = 3 m 2 − 6 m + 9 = 0 ⟹ ( m − 3 ) 2 = 0 ⟹ m = 3 (repeated).
y = ( A + B x ) e 3 x y = (A + Bx)e^{3x} y = ( A + B x ) e 3 x , y ′ = ( B + 3 A + 3 B x ) e 3 x y' = (B + 3A + 3Bx)e^{3x} y ′ = ( B + 3 A + 3 B x ) e 3 x .
y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 : A = 1 A = 1 A = 1 . y ′ ( 0 ) = 0 y'(0) = 0 y ′ ( 0 ) = 0 : B + 3 = 0 ⟹ B = − 3 B + 3 = 0 \implies B = -3 B + 3 = 0 ⟹ B = − 3 .
y = ( 1 − 3 x ) e 3 x \boxed{y = (1 - 3x)e^{3x}} y = ( 1 − 3 x ) e 3 x .
If you get this wrong, revise: Three Cases — Section 3.3.
Problem 4 Solve y ′ ′ + 4 y ′ + 13 y = 0 y'' + 4y' + 13y = 0 y ′′ + 4 y ′ + 13 y = 0 .
Solution 4 Auxiliary: m 2 + 4 m + 13 = 0 ⟹ m = ◆ L B ◆ − 4 ± 16 − 52 ◆ R B ◆◆ L B ◆ 2 ◆ R B ◆ = − 2 ± 3 i m^2 + 4m + 13 = 0 \implies m = \dfrac◆LB◆-4 \pm \sqrt{16-52}◆RB◆◆LB◆2◆RB◆ = -2 \pm 3i m 2 + 4 m + 13 = 0 ⟹ m = L ◆ B ◆ − 4 ± 16 − 52 ◆ R B ◆◆ L B ◆2◆ R B ◆ = − 2 ± 3 i .
α = − 2 \alpha = -2 α = − 2 , β = 3 \beta = 3 β = 3 .
y = e − 2 x ( A cos 3 x + B sin 3 x ) \boxed{y = e^{-2x}(A\cos 3x + B\sin 3x)} y = e − 2 x ( A cos 3 x + B sin 3 x ) .
If you get this wrong, revise: Three Cases — Section 3.3.
Problem 5 Find the general solution of y ′ ′ − y = 2 e x y'' - y = 2e^x y ′′ − y = 2 e x .
Solution 5 CF: m 2 − 1 = 0 ⟹ m = ± 1 m^2 - 1 = 0 \implies m = \pm 1 m 2 − 1 = 0 ⟹ m = ± 1 . y h = A e x + B e − x y_h = Ae^x + Be^{-x} y h = A e x + B e − x .
PI: f ( x ) = 2 e x f(x) = 2e^x f ( x ) = 2 e x . Since e x e^x e x appears in the CF, try y p = c x e x y_p = cxe^x y p = c x e x .
y p ′ = c ( 1 + x ) e x y_p' = c(1+x)e^x y p ′ = c ( 1 + x ) e x , y p ′ ′ = c ( 2 + x ) e x y_p'' = c(2+x)e^x y p ′′ = c ( 2 + x ) e x .
y p ′ ′ − y p = c ( 2 + x ) e x − c x e x = 2 c e x = 2 e x ⟹ c = 1 y_p'' - y_p = c(2+x)e^x - cxe^x = 2ce^x = 2e^x \implies c = 1 y p ′′ − y p = c ( 2 + x ) e x − c x e x = 2 c e x = 2 e x ⟹ c = 1 .
y = A e x + B e − x + x e x \boxed{y = Ae^x + Be^{-x} + xe^x} y = A e x + B e − x + x e x .
If you get this wrong, revise:
Undetermined Coefficients — Section 4.2.
Problem 6 Find the general solution of y ′ ′ + 2 y ′ + y = x 2 y'' + 2y' + y = x^2 y ′′ + 2 y ′ + y = x 2 .
Solution 6 CF: m 2 + 2 m + 1 = 0 ⟹ ( m + 1 ) 2 = 0 m^2 + 2m + 1 = 0 \implies (m+1)^2 = 0 m 2 + 2 m + 1 = 0 ⟹ ( m + 1 ) 2 = 0 . y h = ( A + B x ) e − x y_h = (A + Bx)e^{-x} y h = ( A + B x ) e − x .
PI: Try y p = p x 2 + q x + r y_p = px^2 + qx + r y p = p x 2 + q x + r . y p ′ = 2 p x + q y_p' = 2px + q y p ′ = 2 p x + q , y p ′ ′ = 2 p y_p'' = 2p y p ′′ = 2 p .
( 2 p ) + 2 ( 2 p x + q ) + ( p x 2 + q x + r ) = x 2 (2p) + 2(2px + q) + (px^2 + qx + r) = x^2 ( 2 p ) + 2 ( 2 p x + q ) + ( p x 2 + q x + r ) = x 2 .
p x 2 + ( 4 p + q ) x + ( 2 p + 2 q + r ) = x 2 px^2 + (4p+q)x + (2p+2q+r) = x^2 p x 2 + ( 4 p + q ) x + ( 2 p + 2 q + r ) = x 2 .
p = 1 p = 1 p = 1 , 4 + q = 0 ⟹ q = − 4 4 + q = 0 \implies q = -4 4 + q = 0 ⟹ q = − 4 , 2 − 8 + r = 0 ⟹ r = 6 2 - 8 + r = 0 \implies r = 6 2 − 8 + r = 0 ⟹ r = 6 .
y = ( A + B x ) e − x + x 2 − 4 x + 6 \boxed{y = (A + Bx)e^{-x} + x^2 - 4x + 6} y = ( A + B x ) e − x + x 2 − 4 x + 6 .
If you get this wrong, revise:
Undetermined Coefficients — Section 4.2.
Problem 7 A body cools from 80 ° C 80°C 80° C to 60 ° C 60°C 60° C in 10 minutes in surroundings at 20 ° C 20°C 20° C . How long does it take to
cool to 40 ° C 40°C 40° C ?
Solution 7 Newton's law: T = 20 + 60 e − k t T = 20 + 60e^{-kt} T = 20 + 60 e − k t (since T 0 = 80 T_0 = 80 T 0 = 80 , T a = 20 T_a = 20 T a = 20 ).
T ( 10 ) = 60 T(10) = 60 T ( 10 ) = 60 : 60 = 20 + 60 e − 10 k ⟹ e − 10 k = 2 3 60 = 20 + 60e^{-10k} \implies e^{-10k} = \dfrac{2}{3} 60 = 20 + 60 e − 10 k ⟹ e − 10 k = 3 2 .
T ( t ) = 40 T(t) = 40 T ( t ) = 40 : 40 = 20 + 60 e − k t ⟹ e − k t = 1 3 40 = 20 + 60e^{-kt} \implies e^{-kt} = \dfrac{1}{3} 40 = 20 + 60 e − k t ⟹ e − k t = 3 1 .
( 2 3 ) t / 10 = 1 3 ⟹ t 10 ln 2 3 = ln 1 3 \left(\dfrac{2}{3}\right)^{t/10} = \dfrac{1}{3} \implies \dfrac{t}{10}\ln\dfrac{2}{3} = \ln\dfrac{1}{3} ( 3 2 ) t /10 = 3 1 ⟹ 10 t ln 3 2 = ln 3 1 .
t = ◆ L B ◆ 10 ln ( 1 / 3 ) ◆ R B ◆◆ L B ◆ ln ( 2 / 3 ) ◆ R B ◆ = ◆ L B ◆ 10 ln 3 ◆ R B ◆◆ L B ◆ ln ( 3 / 2 ) ◆ R B ◆ ≈ ◆ L B ◆ 10 × 1.0986 ◆ R B ◆◆ L B ◆ 0.4055 ◆ R B ◆ ≈ 27.1 t = \dfrac◆LB◆10\ln(1/3)◆RB◆◆LB◆\ln(2/3)◆RB◆ = \dfrac◆LB◆10\ln 3◆RB◆◆LB◆\ln(3/2)◆RB◆ \approx \dfrac◆LB◆10 \times 1.0986◆RB◆◆LB◆0.4055◆RB◆ \approx 27.1 t = L ◆ B ◆10 ln ( 1/3 ) ◆ R B ◆◆ L B ◆ ln ( 2/3 ) ◆ R B ◆ = L ◆ B ◆10 ln 3◆ R B ◆◆ L B ◆ ln ( 3/2 ) ◆ R B ◆ ≈ L ◆ B ◆10 × 1.0986◆ R B ◆◆ L B ◆0.4055◆ R B ◆ ≈ 27.1
minutes.
If you get this wrong, revise: Newton's Law of Cooling — Section
5.2.
Problem 8 Solve d y d x = x y \dfrac{dy}{dx} = xy d x d y = x y given y ( 0 ) = 5 y(0) = 5 y ( 0 ) = 5 .
Solution 8 Separate: 1 y d y = x d x \dfrac{1}{y}\,dy = x\,dx y 1 d y = x d x .
Integrate: ln ∣ y ∣ = x 2 2 + C \ln|y| = \dfrac{x^2}{2} + C ln ∣ y ∣ = 2 x 2 + C .
y ( 0 ) = 5 y(0) = 5 y ( 0 ) = 5 : ln 5 = C \ln 5 = C ln 5 = C .
y = e x 2 / 2 + ln 5 = 5 e x 2 / 2 y = e^{x^2/2 + \ln 5} = 5e^{x^2/2} y = e x 2 /2 + l n 5 = 5 e x 2 /2 .
y = 5 e x 2 / 2 \boxed{y = 5e^{x^2/2}} y = 5 e x 2 /2 .
If you get this wrong, revise: Separable Equations —
Section 1.
Problem 9 Solve y ′ ′ + 9 y = 6 cos 3 x y'' + 9y = 6\cos 3x y ′′ + 9 y = 6 cos 3 x .
Solution 9 CF: m 2 + 9 = 0 ⟹ m = ± 3 i m^2 + 9 = 0 \implies m = \pm 3i m 2 + 9 = 0 ⟹ m = ± 3 i . y h = A cos 3 x + B sin 3 x y_h = A\cos 3x + B\sin 3x y h = A cos 3 x + B sin 3 x .
PI: f ( x ) = 6 cos 3 x f(x) = 6\cos 3x f ( x ) = 6 cos 3 x . Since cos 3 x \cos 3x cos 3 x and sin 3 x \sin 3x sin 3 x are in the CF, try
y p = x ( c cos 3 x + d sin 3 x ) y_p = x(c\cos 3x + d\sin 3x) y p = x ( c cos 3 x + d sin 3 x ) .
y p ′ = ( c cos 3 x + d sin 3 x ) + x ( − 3 c sin 3 x + 3 d cos 3 x ) y_p' = (c\cos 3x + d\sin 3x) + x(-3c\sin 3x + 3d\cos 3x) y p ′ = ( c cos 3 x + d sin 3 x ) + x ( − 3 c sin 3 x + 3 d cos 3 x )
y p ′ ′ = ( − 6 c sin 3 x + 6 d cos 3 x ) + x ( − 9 c cos 3 x − 9 d sin 3 x ) y_p'' = (-6c\sin 3x + 6d\cos 3x) + x(-9c\cos 3x - 9d\sin 3x) y p ′′ = ( − 6 c sin 3 x + 6 d cos 3 x ) + x ( − 9 c cos 3 x − 9 d sin 3 x )
y p ′ ′ + 9 y p = − 6 c sin 3 x + 6 d cos 3 x = 6 cos 3 x y_p'' + 9y_p = -6c\sin 3x + 6d\cos 3x = 6\cos 3x y p ′′ + 9 y p = − 6 c sin 3 x + 6 d cos 3 x = 6 cos 3 x .
d = 1 d = 1 d = 1 , c = 0 c = 0 c = 0 .
y = A cos 3 x + B sin 3 x + x sin 3 x \boxed{y = A\cos 3x + B\sin 3x + x\sin 3x} y = A cos 3 x + B sin 3 x + x sin 3 x .
If you get this wrong, revise:
Undetermined Coefficients — Section 4.2.
Problem 10 Solve d y d x − y x = x 2 \dfrac{dy}{dx} - \dfrac{y}{x} = x^2 d x d y − x y = x 2 for x > 0 x > 0 x > 0 , given y ( 1 ) = 3 y(1) = 3 y ( 1 ) = 3 .
Solution 10 P ( x ) = − 1 / x P(x) = -1/x P ( x ) = − 1/ x , Q ( x ) = x 2 Q(x) = x^2 Q ( x ) = x 2 .
μ = e ∫ − 1 / x d x = e − ln x = 1 x \mu = e^{\int -1/x\,dx} = e^{-\ln x} = \dfrac{1}{x} μ = e ∫ − 1/ x d x = e − l n x = x 1 .
d d x ( y x ) = 1 x ⋅ x 2 = x \dfrac{d}{dx}\!\left(\dfrac{y}{x}\right) = \dfrac{1}{x} \cdot x^2 = x d x d ( x y ) = x 1 ⋅ x 2 = x .
y x = x 2 2 + C ⟹ y = x 3 2 + C x \dfrac{y}{x} = \dfrac{x^2}{2} + C \implies y = \dfrac{x^3}{2} + Cx x y = 2 x 2 + C ⟹ y = 2 x 3 + C x .
y ( 1 ) = 3 y(1) = 3 y ( 1 ) = 3 : 1 2 + C = 3 ⟹ C = 5 2 \dfrac{1}{2} + C = 3 \implies C = \dfrac{5}{2} 2 1 + C = 3 ⟹ C = 2 5 .
y = x 3 2 + 5 x 2 = x ( x 2 + 5 ) 2 \boxed{y = \dfrac{x^3}{2} + \dfrac{5x}{2} = \dfrac{x(x^2 + 5)}{2}} y = 2 x 3 + 2 5 x = 2 x ( x 2 + 5 ) .
If you get this wrong, revise:
Integrating Factor — Section 2.
8. Advanced Worked Examples
Example 8.1: Second-order linear ODE with complex roots
Problem. Solve d 2 y d x 2 + 4 d y d x + 13 y = 0 \dfrac{d^2y}{dx^2} + 4\dfrac{dy}{dx} + 13y = 0 d x 2 d 2 y + 4 d x d y + 13 y = 0 given y ( 0 ) = 2 y(0) = 2 y ( 0 ) = 2 and
y ′ ( 0 ) = − 1 y'(0) = -1 y ′ ( 0 ) = − 1 .
Solution. Auxiliary equation: m 2 + 4 m + 13 = 0 m^2 + 4m + 13 = 0 m 2 + 4 m + 13 = 0 .
m = ◆ L B ◆ − 4 ± 16 − 52 ◆ R B ◆◆ L B ◆ 2 ◆ R B ◆ = − 2 ± 3 i m = \dfrac◆LB◆-4 \pm \sqrt{16-52}◆RB◆◆LB◆2◆RB◆ = -2 \pm 3i m = L ◆ B ◆ − 4 ± 16 − 52 ◆ R B ◆◆ L B ◆2◆ R B ◆ = − 2 ± 3 i .
General solution: y = e − 2 x ( A cos 3 x + B sin 3 x ) y = e^{-2x}(A\cos 3x + B\sin 3x) y = e − 2 x ( A cos 3 x + B sin 3 x ) .
y ( 0 ) = A = 2 y(0) = A = 2 y ( 0 ) = A = 2 .
y ′ = e − 2 x ( − 2 A cos 3 x − 2 B sin 3 x − 3 A sin 3 x + 3 B cos 3 x ) y' = e^{-2x}(-2A\cos 3x - 2B\sin 3x - 3A\sin 3x + 3B\cos 3x) y ′ = e − 2 x ( − 2 A cos 3 x − 2 B sin 3 x − 3 A sin 3 x + 3 B cos 3 x ) .
y ′ ( 0 ) = − 2 A + 3 B = − 1 ⟹ − 4 + 3 B = − 1 ⟹ B = 1 y'(0) = -2A + 3B = -1 \implies -4 + 3B = -1 \implies B = 1 y ′ ( 0 ) = − 2 A + 3 B = − 1 ⟹ − 4 + 3 B = − 1 ⟹ B = 1 .
y = e − 2 x ( 2 cos 3 x + sin 3 x ) \boxed{y = e^{-2x}(2\cos 3x + \sin 3x)} y = e − 2 x ( 2 cos 3 x + sin 3 x )
Example 8.2: Integrating factor with a tricky integral
Problem. Solve d y d x + 2 y x = x 2 \dfrac{dy}{dx} + \dfrac{2y}{x} = x^2 d x d y + x 2 y = x 2 for x > 0 x > 0 x > 0 .
Solution. Integrating factor:
μ = exp ( ∫ 2 x d x ) = e 2 ln x = x 2 \mu = \exp\!\left(\displaystyle\int \frac{2}{x}\,dx\right) = e^{2\ln x} = x^2 μ = exp ( ∫ x 2 d x ) = e 2 l n x = x 2 .
d d x ( x 2 y ) = x 4 \frac{d}{dx}(x^2 y) = x^4 d x d ( x 2 y ) = x 4
x 2 y = x 5 5 + C x^2 y = \frac{x^5}{5} + C x 2 y = 5 x 5 + C
y = x 3 5 + C x 2 \boxed{y = \frac{x^3}{5} + \frac{C}{x^2}} y = 5 x 3 + x 2 C
Example 8.3: Homogeneous equation via substitution
Problem. Solve d y d x = x + y x − y \dfrac{dy}{dx} = \dfrac{x + y}{x - y} d x d y = x − y x + y .
Solution. This is a homogeneous equation. Let y = v x y = vx y = v x , so
d y d x = v + x d v d x \dfrac{dy}{dx} = v + x\dfrac{dv}{dx} d x d y = v + x d x d v .
v + x d v d x = 1 + v 1 − v v + x\frac{dv}{dx} = \frac{1+v}{1-v} v + x d x d v = 1 − v 1 + v
x d v d x = 1 + v 1 − v − v = 1 + v − v + v 2 1 − v = 1 + v 2 1 − v x\frac{dv}{dx} = \frac{1+v}{1-v} - v = \frac{1+v-v+v^2}{1-v} = \frac{1+v^2}{1-v} x d x d v = 1 − v 1 + v − v = 1 − v 1 + v − v + v 2 = 1 − v 1 + v 2
∫ 1 − v 1 + v 2 d v = ∫ 1 x d x \int \frac{1-v}{1+v^2}\,dv = \int \frac{1}{x}\,dx ∫ 1 + v 2 1 − v d v = ∫ x 1 d x
∫ 1 1 + v 2 d v − ∫ v 1 + v 2 d v = ln ∣ x ∣ + C \int \frac{1}{1+v^2}\,dv - \int \frac{v}{1+v^2}\,dv = \ln|x| + C ∫ 1 + v 2 1 d v − ∫ 1 + v 2 v d v = ln ∣ x ∣ + C
arctan v − 1 2 ln ( 1 + v 2 ) = ln ∣ x ∣ + C \arctan v - \frac{1}{2}\ln(1+v^2) = \ln|x| + C arctan v − 2 1 ln ( 1 + v 2 ) = ln ∣ x ∣ + C
Substituting v = y / x v = y/x v = y / x :
arctan ( y x ) − 1 2 ln ( 1 + y 2 x 2 ) = ln ∣ x ∣ + C \arctan\!\left(\frac{y}{x}\right) - \frac{1}{2}\ln\!\left(1+\frac{y^2}{x^2}\right) = \ln|x| + C arctan ( x y ) − 2 1 ln ( 1 + x 2 y 2 ) = ln ∣ x ∣ + C
Example 8.4: Coupled first-order ODEs
Problem. Solve d x d t = 3 x + 2 y \dfrac{dx}{dt} = 3x + 2y d t d x = 3 x + 2 y , d y d t = − 5 x − y \dfrac{dy}{dt} = -5x - y d t d y = − 5 x − y .
Solution. From the second equation: y = 1 2 ( d x d t − 3 x ) y = \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right) y = 2 1 ( d t d x − 3 x ) .
Differentiating: d y d t = 1 2 ( d 2 x d t 2 − 3 d x d t ) \dfrac{dy}{dt} = \dfrac{1}{2}\!\left(\dfrac{d^2x}{dt^2} - 3\dfrac{dx}{dt}\right) d t d y = 2 1 ( d t 2 d 2 x − 3 d t d x ) .
Substituting into the second equation:
1 2 ( d 2 x d t 2 − 3 d x d t ) = − 5 x − 1 2 ( d x d t − 3 x ) \dfrac{1}{2}\!\left(\dfrac{d^2x}{dt^2} - 3\dfrac{dx}{dt}\right) = -5x - \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right) 2 1 ( d t 2 d 2 x − 3 d t d x ) = − 5 x − 2 1 ( d t d x − 3 x ) .
d 2 x d t 2 − 3 d x d t = − 10 x − d x d t + 3 x \frac{d^2x}{dt^2} - 3\frac{dx}{dt} = -10x - \frac{dx}{dt} + 3x d t 2 d 2 x − 3 d t d x = − 10 x − d t d x + 3 x
d 2 x d t 2 − 2 d x d t + 7 x = 0 \frac{d^2x}{dt^2} - 2\frac{dx}{dt} + 7x = 0 d t 2 d 2 x − 2 d t d x + 7 x = 0
Auxiliary: m 2 − 2 m + 7 = 0 ⟹ m = 1 ± i 6 m^2 - 2m + 7 = 0 \implies m = 1 \pm i\sqrt{6} m 2 − 2 m + 7 = 0 ⟹ m = 1 ± i 6 .
x = e t ( A cos 6 t + B sin 6 t ) x = e^t(A\cos\sqrt{6}\,t + B\sin\sqrt{6}\,t) x = e t ( A cos 6 t + B sin 6 t ) .
Then y = 1 2 ( d x d t − 3 x ) y = \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right) y = 2 1 ( d t d x − 3 x ) .
Example 8.5: Exponential growth with harvesting
Problem. A population P ( t ) P(t) P ( t ) satisfies d P d t = 0.1 P − 50 \dfrac{dP}{dt} = 0.1P - 50 d t d P = 0.1 P − 50 . Find the general solution
and interpret.
Solution. This is a first-order linear ODE: d P d t − 0.1 P = − 50 \dfrac{dP}{dt} - 0.1P = -50 d t d P − 0.1 P = − 50 .
Integrating factor: μ = e − 0.1 t \mu = e^{-0.1t} μ = e − 0.1 t .
d d t ( P e − 0.1 t ) = − 50 e − 0.1 t \frac{d}{dt}(Pe^{-0.1t}) = -50e^{-0.1t} d t d ( P e − 0.1 t ) = − 50 e − 0.1 t
P e − 0.1 t = 500 e − 0.1 t + C Pe^{-0.1t} = 500e^{-0.1t} + C P e − 0.1 t = 500 e − 0.1 t + C
P = 500 + C e 0.1 t \boxed{P = 500 + Ce^{0.1t}} P = 500 + C e 0.1 t
The equilibrium population is P = 500 P = 500 P = 500 . If P ( 0 ) > 500 P(0) > 500 P ( 0 ) > 500 , the population grows exponentially; if
P ( 0 ) < 500 P(0) < 500 P ( 0 ) < 500 , it decays to zero (extinction).
Example 8.6: Boundary value problem
Problem. Solve y ′ ′ − 6 y ′ + 9 y = 0 y'' - 6y' + 9y = 0 y ′′ − 6 y ′ + 9 y = 0 with y ( 0 ) = 1 y(0) = 1 y ( 0 ) = 1 and y ( 1 ) = e 3 y(1) = e^3 y ( 1 ) = e 3 .
Solution. Auxiliary: m 2 − 6 m + 9 = 0 ⟹ ( m − 3 ) 2 = 0 m^2 - 6m + 9 = 0 \implies (m-3)^2 = 0 m 2 − 6 m + 9 = 0 ⟹ ( m − 3 ) 2 = 0 . Repeated root m = 3 m = 3 m = 3 .
General solution: y = ( A + B x ) e 3 x y = (A + Bx)e^{3x} y = ( A + B x ) e 3 x .
y ( 0 ) = A = 1 y(0) = A = 1 y ( 0 ) = A = 1 .
y ( 1 ) = ( 1 + B ) e 3 = e 3 ⟹ 1 + B = 1 ⟹ B = 0 y(1) = (1+B)e^3 = e^3 \implies 1+B = 1 \implies B = 0 y ( 1 ) = ( 1 + B ) e 3 = e 3 ⟹ 1 + B = 1 ⟹ B = 0 .
y = e 3 x \boxed{y = e^{3x}} y = e 3 x
Example 8.7: Non-homogeneous second-order ODE
Problem. Solve y ′ ′ + y = 2 cos x y'' + y = 2\cos x y ′′ + y = 2 cos x .
Solution. Complementary function: m 2 + 1 = 0 ⟹ m = ± i m^2 + 1 = 0 \implies m = \pm i m 2 + 1 = 0 ⟹ m = ± i . 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: Since cos x \cos x cos x is part of the CF, try y p = x ( C cos x + D sin x ) y_p = x(C\cos x + D\sin x) y p = x ( C cos x + D sin x ) .
y p ′ = C cos x + D sin x + x ( − C sin x + D cos x ) y_p' = C\cos x + D\sin x + x(-C\sin x + D\cos x) y p ′ = C cos x + D sin x + x ( − C sin x + D cos x ) .
y p ′ ′ = − C sin x + D cos x + ( − C sin x + D cos x ) + x ( − C cos x − D sin x ) = 2 ( − C sin x + D cos x ) − x ( C cos x + D sin x ) y_p'' = -C\sin x + D\cos x + (-C\sin x + D\cos x) + x(-C\cos x - D\sin x) = 2(-C\sin x + D\cos x) - x(C\cos x + D\sin x) y p ′′ = − C sin x + D cos x + ( − C sin x + D cos x ) + x ( − C cos x − D sin x ) = 2 ( − C sin x + D cos x ) − x ( C cos x + D sin x ) .
y p ′ ′ + y p = 2 ( − C sin x + D cos x ) = 2 cos x y_p'' + y_p = 2(-C\sin x + D\cos x) = 2\cos x y p ′′ + y p = 2 ( − C sin x + D cos x ) = 2 cos x .
D = 1 D = 1 D = 1 , C = 0 C = 0 C = 0 . So y p = x sin x y_p = x\sin x y p = x sin x .
y = A cos x + B sin x + x sin x \boxed{y = A\cos x + B\sin x + x\sin x} y = A cos x + B sin x + x sin x
9. Common Pitfalls
Pitfall Correct Approach Forgetting the constant of integration when using an integrating factor Integrate both sides after multiplying by μ \mu μ ; + C +C + C appears on the right Using the wrong trial function for the particular integral If the RHS is part of the complementary function, multiply by x x x (or x 2 x^2 x 2 if needed) Confusing A e m x Ae^{mx} A e m x (single root) with ( A + B x ) e m x (A+Bx)e^{mx} ( A + B x ) e m x (repeated root) Check the discriminant: repeated root ⟺ \iff ⟺ discriminant = 0 = 0 = 0 Not applying initial conditions to find A A A and B B B Always substitute the given conditions into the general solution and its derivative
10. Additional Exam-Style Questions
Question 8
Solve d 2 y d x 2 − 2 d y d x − 3 y = 6 e 2 x \dfrac{d^2y}{dx^2} - 2\dfrac{dy}{dx} - 3y = 6e^{2x} d x 2 d 2 y − 2 d x d y − 3 y = 6 e 2 x .
Solution CF: m 2 − 2 m − 3 = 0 ⟹ ( m − 3 ) ( m + 1 ) = 0 m^2 - 2m - 3 = 0 \implies (m-3)(m+1) = 0 m 2 − 2 m − 3 = 0 ⟹ ( m − 3 ) ( m + 1 ) = 0 . y c = A e 3 x + B e − x y_c = Ae^{3x} + Be^{-x} y c = A e 3 x + B e − x .
PI: Try y p = C e 2 x y_p = Ce^{2x} y p = C e 2 x . Substituting: 4 C − 4 C − 3 C = 6 ⟹ C = − 2 4C - 4C - 3C = 6 \implies C = -2 4 C − 4 C − 3 C = 6 ⟹ C = − 2 .
y = A e 3 x + B e − x − 2 e 2 x \boxed{y = Ae^{3x} + Be^{-x} - 2e^{2x}} y = A e 3 x + B e − x − 2 e 2 x
Question 9
A body cools according to ◆ L B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ = − k ( θ − 20 ) \dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ = -k(\theta - 20) L ◆ B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ = − k ( θ − 20 ) , where θ \theta θ is the
temperature in ° C °\mathrm{C} ° C and 20 ° C 20°\mathrm{C} 20° C is the room temperature. If θ ( 0 ) = 90 \theta(0) = 90 θ ( 0 ) = 90 and
θ ( 10 ) = 50 \theta(10) = 50 θ ( 10 ) = 50 , find θ ( 30 ) \theta(30) θ ( 30 ) .
Solution ◆ L B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ + k θ = 20 k \dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ + k\theta = 20k L ◆ B ◆ d θ ◆ R B ◆◆ L B ◆ d t ◆ R B ◆ + k θ = 20 k . IF: e k t e^{kt} e k t .
θ e k t = 20 e k t + C \theta e^{kt} = 20e^{kt} + C θ e k t = 20 e k t + C
θ = 20 + C e − k t \theta = 20 + Ce^{-kt} θ = 20 + C e − k t .
θ ( 0 ) = 90 ⟹ C = 70 \theta(0) = 90 \implies C = 70 θ ( 0 ) = 90 ⟹ C = 70 .
θ ( 10 ) = 50 ⟹ 50 = 20 + 70 e − 10 k ⟹ e − 10 k = 3 7 \theta(10) = 50 \implies 50 = 20 + 70e^{-10k} \implies e^{-10k} = \dfrac{3}{7} θ ( 10 ) = 50 ⟹ 50 = 20 + 70 e − 10 k ⟹ e − 10 k = 7 3 .
θ ( 30 ) = 20 + 70 e − 30 k = 20 + 70 ( 3 7 ) 3 = 20 + 70 × 27 343 = 20 + 1890 343 \theta(30) = 20 + 70e^{-30k} = 20 + 70\!\left(\dfrac{3}{7}\right)^{\!3} = 20 + 70 \times \dfrac{27}{343} = 20 + \dfrac{1890}{343} θ ( 30 ) = 20 + 70 e − 30 k = 20 + 70 ( 7 3 ) 3 = 20 + 70 × 343 27 = 20 + 343 1890 .
θ ( 30 ) ≈ 25.5 ° C \boxed{\theta(30) \approx 25.5°\mathrm{C}} θ ( 30 ) ≈ 25.5° C
Question 10
Prove that the substitution y = v x y = vx y = v x transforms d y d x = f ( y x ) \dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right) d x d y = f ( x y )
into a separable equation.
Solution Let y = v x y = vx y = v x , so d y d x = v + x d v d x \dfrac{dy}{dx} = v + x\dfrac{dv}{dx} d x d y = v + x d x d v .
Substituting: v + x d v d x = f ( v ) v + x\dfrac{dv}{dx} = f(v) v + x d x d v = f ( v ) .
x d v d x = f ( v ) − v x\frac{dv}{dx} = f(v) - v x d x d v = f ( v ) − v
d v f ( v ) − v = d x x \frac{dv}{f(v) - v} = \frac{dx}{x} f ( v ) − v d v = x d x
This is separable. Integrating gives ∫ d v f ( v ) − v = ln ∣ x ∣ + C \displaystyle\int \frac{dv}{f(v) - v} = \ln|x| + C ∫ f ( v ) − v d v = ln ∣ x ∣ + C .
■ \blacksquare ■
Question 11
Find the particular solution to x d y d x − y = x 2 x\dfrac{dy}{dx} - y = x^2 x d x d y − y = x 2 with y ( 1 ) = 3 y(1) = 3 y ( 1 ) = 3 .
Solution d y d x − y x = x \dfrac{dy}{dx} - \dfrac{y}{x} = x d x d y − x y = x . IF:
μ = exp ( ∫ − 1 x d x ) = 1 x \mu = \exp\!\left(\displaystyle\int -\dfrac{1}{x}\,dx\right) = \dfrac{1}{x} μ = exp ( ∫ − x 1 d x ) = x 1 .
1 x ⋅ d y d x − y x 2 = 1 \frac{1}{x}\cdot\frac{dy}{dx} - \frac{y}{x^2} = 1 x 1 ⋅ d x d y − x 2 y = 1
d d x ( y x ) = 1 \frac{d}{dx}\!\left(\frac{y}{x}\right) = 1 d x d ( x y ) = 1
y x = x + C ⟹ y = x 2 + C x \frac{y}{x} = x + C \implies y = x^2 + Cx x y = x + C ⟹ y = x 2 + C x
y ( 1 ) = 1 + C = 3 ⟹ C = 2 y(1) = 1 + C = 3 \implies C = 2 y ( 1 ) = 1 + C = 3 ⟹ C = 2 .
y = x 2 + 2 x \boxed{y = x^2 + 2x} y = x 2 + 2 x
11. Connections to Other Topics
11.1 Differential equations and calculus
Solving ODEs requires integration techniques (substitution, parts, partial fractions). See
Further Calculus .
11.2 Second-order ODEs and complex numbers
The auxiliary equation uses complex roots to give oscillatory solutions
e α t ( A cos β t + B sin β t ) e^{\alpha t}(A\cos\beta t + B\sin\beta t) e α t ( A cos β t + B sin β t ) . See
Complex Numbers .
11.3 Differential equations and mechanics
Newton's second law F = m a F = ma F = ma leads to second-order ODEs in mechanics. See
Circular Motion .
12. Key Results Summary
ODE Type Method General Solution d y d x + P ( x ) y = Q ( x ) \dfrac{dy}{dx} + P(x)y = Q(x) d x d y + P ( x ) y = Q ( x ) Integrating factor μ = e ∫ P d x \mu = e^{\int P\,dx} μ = e ∫ P d x y = ◆ L B ◆ 1 ◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ∫ μ Q d x y = \dfrac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\displaystyle\int \mu Q\,dx y = L ◆ B ◆1◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ∫ μ Q d x d y d x = f ( y x ) \dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right) d x d y = f ( x y ) Substitution y = v x y = vx y = v x Separate and integrate a d 2 y d x 2 + b d y d x + c y = 0 a\dfrac{d^2y}{dx^2}+b\dfrac{dy}{dx}+cy=0 a d x 2 d 2 y + b d x d y + cy = 0 Auxiliary equation a m 2 + b m + c = 0 am^2+bm+c=0 a m 2 + bm + c = 0 Real roots: A e m 1 x + B e m 2 x Ae^{m_1x}+Be^{m_2x} A e m 1 x + B e m 2 x ; repeated: ( A + B x ) e m x (A+Bx)e^{mx} ( A + B x ) e m x ; complex: e α x ( A cos β x + B sin β x ) e^{\alpha x}(A\cos\beta x+B\sin\beta x) e α x ( A cos β x + B sin β x )
13. Further Exam-Style Questions
Question 12
Solve d 2 y d x 2 − 6 d y d x + 25 y = 0 \dfrac{d^2y}{dx^2} - 6\dfrac{dy}{dx} + 25y = 0 d x 2 d 2 y − 6 d x d y + 25 y = 0 with y ( 0 ) = 0 y(0) = 0 y ( 0 ) = 0 and y ′ ( 0 ) = 3 y'(0) = 3 y ′ ( 0 ) = 3 .
Solution m 2 − 6 m + 25 = 0 ⟹ m = 3 ± 4 i m^2 - 6m + 25 = 0 \implies m = 3 \pm 4i m 2 − 6 m + 25 = 0 ⟹ m = 3 ± 4 i .
y = e 3 x ( A cos 4 x + B sin 4 x ) y = e^{3x}(A\cos 4x + B\sin 4x) y = e 3 x ( A cos 4 x + B sin 4 x ) .
y ( 0 ) = A = 0 y(0) = A = 0 y ( 0 ) = A = 0 . y ′ = 3 e 3 x B sin 4 x + 4 e 3 x B cos 4 x y' = 3e^{3x}B\sin 4x + 4e^{3x}B\cos 4x y ′ = 3 e 3 x B sin 4 x + 4 e 3 x B cos 4 x . y ′ ( 0 ) = 4 B = 3 ⟹ B = 3 / 4 y'(0) = 4B = 3 \implies B = 3/4 y ′ ( 0 ) = 4 B = 3 ⟹ B = 3/4 .
y = 3 4 e 3 x sin 4 x \boxed{y = \dfrac{3}{4}e^{3x}\sin 4x} y = 4 3 e 3 x sin 4 x
Question 13
Prove that the Wronskian W ( y 1 , y 2 ) = y 1 y 2 ′ − y 1 ′ y 2 ≠ 0 W(y_1, y_2) = y_1y_2' - y_1'y_2 \neq 0 W ( y 1 , y 2 ) = y 1 y 2 ′ − y 1 ′ y 2 = 0 if and only if y 1 y_1 y 1 and y 2 y_2 y 2
are linearly independent solutions of a second-order linear ODE.
Solution If y 1 y_1 y 1 and y 2 y_2 y 2 are linearly dependent, y 2 = c y 1 y_2 = cy_1 y 2 = c y 1 , then W = y 1 ( c y 1 ′ ) − y 1 ′ ( c y 1 ) = 0 W = y_1(cy_1') - y_1'(cy_1) = 0 W = y 1 ( c y 1 ′ ) − y 1 ′ ( c y 1 ) = 0 .
Conversely, if W = 0 W = 0 W = 0 at some point and both satisfy the same linear ODE, then the initial value
problem with initial conditions matching y 1 y_1 y 1 and y 2 y_2 y 2 would have two solutions, contradicting
uniqueness. Hence y 1 y_1 y 1 and y 2 y_2 y 2 must be linearly dependent.
Therefore W ≠ 0 ⟺ W \neq 0 \iff W = 0 ⟺ linearly independent. ■ \blacksquare ■
14. Advanced Topics
14.1 The integrating factor method — derivation
For d y d x + P ( x ) y = Q ( x ) \dfrac{dy}{dx} + P(x)y = Q(x) d x d y + P ( x ) y = Q ( x ) , multiply by μ = e ∫ P d x \mu = e^{\int P\,dx} μ = e ∫ P d x :
μ d y d x + μ P y = μ Q \mu\frac{dy}{dx} + \mu Py = \mu Q μ d x d y + μ P y = μ Q
d d x ( μ y ) = μ Q \frac{d}{dx}(\mu y) = \mu Q d x d ( μ y ) = μ Q
μ y = ∫ μ Q d x + C \mu y = \int \mu Q\,dx + C μ y = ∫ μ Q d x + C
y = ◆ L B ◆ 1 ◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ∫ μ Q d x + ◆ L B ◆ C ◆ R B ◆◆ L B ◆ μ ◆ R B ◆ y = \frac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\int \mu Q\,dx + \frac◆LB◆C◆RB◆◆LB◆\mu◆RB◆ y = L ◆ B ◆1◆ R B ◆◆ L B ◆ μ ◆ R B ◆ ∫ μ Q d x + L ◆ B ◆ C ◆ R B ◆◆ L B ◆ μ ◆ R B ◆
14.2 Systems of linear ODEs
For the system x ˙ = A x \dot{\mathbf{x}} = \mathbf{A}\mathbf{x} x ˙ = Ax where x = ( x 1 , … , x n ) \mathbf{x} = (x_1, \ldots, x_n) x = ( x 1 , … , x n ) :
If A \mathbf{A} A is diagonalisable with A = P D P − 1 \mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1} A = PD P − 1 , let
z = P − 1 x \mathbf{z} = \mathbf{P}^{-1}\mathbf{x} z = P − 1 x :
z ˙ = D z \dot{\mathbf{z}} = \mathbf{D}\mathbf{z} z ˙ = Dz , giving z i = c i e λ i t z_i = c_i e^{\lambda_i t} z i = c i e λ i t .
x = P z = ∑ c i e λ i t v i \mathbf{x} = \mathbf{P}\mathbf{z} = \sum c_i e^{\lambda_i t}\mathbf{v}_i x = Pz = ∑ c i e λ i t v i .
14.3 Boundary value problems vs initial value problems
An IVP specifies y y y and y ′ y' y ′ at one point. A BVP specifies y y y at two (or more) points. BVPs may
have zero, one, or multiple solutions, unlike IVPs which (for linear ODEs) have a unique solution.
14.4 Phase portraits
For autonomous 2D systems x ˙ = f ( x , y ) \dot{x} = f(x,y) x ˙ = f ( x , y ) , y ˙ = g ( x , y ) \dot{y} = g(x,y) y ˙ = g ( x , y ) , the phase portrait shows
trajectories in the x y xy x y -plane. Key features:
Fixed points: where x ˙ = y ˙ = 0 \dot{x} = \dot{y} = 0 x ˙ = y ˙ = 0
Stability: determined by the eigenvalues of the Jacobian at each fixed point
15. Further Exam-Style Questions
Question 14
Solve d y d x = x 2 + y 2 x y \dfrac{dy}{dx} = \dfrac{x^2+y^2}{xy} d x d y = x y x 2 + y 2 using an appropriate substitution.
Solution This is homogeneous: d y d x = 1 + ( y / x ) 2 y / x \dfrac{dy}{dx} = \dfrac{1+(y/x)^2}{y/x} d x d y = y / x 1 + ( y / x ) 2 . Let v = y / x v = y/x v = y / x :
v + x d v d x = 1 + v 2 v = 1 v + v v + x\dfrac{dv}{dx} = \dfrac{1+v^2}{v} = \dfrac{1}{v} + v v + x d x d v = v 1 + v 2 = v 1 + v .
x d v d x = 1 v x\dfrac{dv}{dx} = \dfrac{1}{v} x d x d v = v 1 .
∫ v d v = ∫ d x x ⟹ v 2 2 = ln ∣ x ∣ + C \int v\,dv = \int \dfrac{dx}{x} \implies \dfrac{v^2}{2} = \ln|x| + C ∫ v d v = ∫ x d x ⟹ 2 v 2 = ln ∣ x ∣ + C .
y 2 2 x 2 = ln ∣ x ∣ + C \dfrac{y^2}{2x^2} = \ln|x| + C 2 x 2 y 2 = ln ∣ x ∣ + C .
y 2 = 2 x 2 ( ln ∣ x ∣ + C ) y^2 = 2x^2(\ln|x|+C) y 2 = 2 x 2 ( ln ∣ x ∣ + C ) .
Question 15
Prove that the general solution of d 2 y d x 2 + ω 2 y = 0 \dfrac{d^2y}{dx^2} + \omega^2 y = 0 d x 2 d 2 y + ω 2 y = 0 can be written as
y = R cos ( ω x − δ ) y = R\cos(\omega x - \delta) y = R cos ( ω x − δ ) where R R R and δ \delta δ are constants.
Solution The general solution is y = A cos ω x + B sin ω x y = A\cos\omega x + B\sin\omega x y = A cos ω x + B sin ω x .
Let R cos δ = A R\cos\delta = A R cos δ = A and R sin δ = B R\sin\delta = B R sin δ = B . Then R = A 2 + B 2 R = \sqrt{A^2+B^2} R = A 2 + B 2 and δ = arctan ( B / A ) \delta = \arctan(B/A) δ = arctan ( B / A ) .
A cos ω x + B sin ω x = R cos δ cos ω x + R sin δ sin ω x = R cos ( ω x − δ ) A\cos\omega x + B\sin\omega x = R\cos\delta\cos\omega x + R\sin\delta\sin\omega x = R\cos(\omega x - \delta) A cos ω x + B sin ω x = R cos δ cos ω x + R sin δ sin ω x = R cos ( ω x − δ ) .
■ \blacksquare ■