1. Maclaurin Series P3
Maclaurin Series
📐 Worked Example 1 — Maclaurin Series from First Principles
Find the Maclaurin series for f(x) = e^(sin x) up to and including the term in x⁴.
f''(0)=1×(1−0)=1
f'''(0)=e^0[(cos²x−sinx)cosx+e^(sinx)(−2sinxcosx−cosx)] at x=0
= 1×[(1)(1)+1×(0−1)] = 1+1×(−1) = 0
= e^u where u=x−x³/6. Then e^u ≈ 1+u+u²/2+u³/6+u⁴/24
u=x−x³/6; u²=x²−x⁴/3+...; u³=x³+...; u⁴=x⁴+...
e^(sinx) ≈ 1+(x−x³/6)+½(x²−x⁴/3)+x³/6+x⁴/24+...
= 1 + x + x²/2 − x⁴/8 + ...
📐 Worked Example 2 — Binomial Expansion (Non-integer n)
Expand (1+3x)^(−½) up to the term in x³. State the range of validity.
= 1−(3/2)x+(3/8)(9x²)−(5/16)(27x³)+...
= 1 − 3x/2 + 27x²/8 − 135x³/16 + ...
📐 Worked Example 3 — Using Maclaurin to Find a Limit
Find lim[x→0] (sin x − x)/x³.
sin x − x = −x³/6 + x⁵/120 − ...
As x→0: lim = −1/6
2. First-Order Linear ODEs — Integrating Factor P3
1. Write in standard form: dy/dx + P(x)y = Q(x)
2. Find integrating factor: μ = e^(∫P(x)dx) (no constant needed here)
3. Multiply both sides by μ: μ dy/dx + μP(x)y = μQ(x)
4. Recognise left side as d(μy)/dx: d(μy)/dx = μQ(x)
5. Integrate both sides: μy = ∫μQ(x) dx + c
6. Divide by μ to find y. Apply initial condition to find c.
📐 Worked Example 4 — Integrating Factor
Solve dy/dx + y/x = x², given y = 4 when x = 1.
y = x³/4 + 15/(4x)
📐 Worked Example 5 — Integrating Factor with Trig
Solve dy/dx + 2y tan x = sin x.
d(y sec²x)/dx = sin x sec²x = sin x/cos²x = tan x sec x
y = cos²x(sec x + c) = cos x + c cos²x
3. Second-Order Linear ODEs P3
Step 1 — Complementary Function
Case 1 — Two distinct real roots λ₁, λ₂: CF = Ae^(λ₁x) + Be^(λ₂x)
Case 2 — Repeated root λ: CF = (A+Bx)e^(λx)
Case 3 — Complex roots α±βi: CF = e^(αx)(A cos βx + B sin βx)
📐 Worked Example 6 — Complementary Functions
Write down the CF for: (a) y''−5y'+6y=0 (b) y''−4y'+4y=0 (c) y''+2y'+5y=0
CF = Ae^(2x) + Be^(3x)
CF = (A+Bx)e^(2x)
CF = e^(−x)(A cos 2x + B sin 2x)
Step 2 — Particular Integral
f(x) = polynomial of degree n → try PI = polynomial of degree n (e.g. ax²+bx+c)
f(x) = keᵐˣ → try PI = aeᵐˣ (if m is not a root of CE; else try axeᵐˣ or ax²eᵐˣ)
f(x) = p cos kx + q sin kx → try PI = a cos kx + b sin kx
f(x) = p eᵐˣ cos kx → try PI = eᵐˣ(a cos kx + b sin kx)
Modification rule: If trial PI is part of CF, multiply by x (or x² if needed).
📐 Worked Example 7 — Full Second-Order ODE Solution
Solve y'' − 3y' + 2y = 4e³ˣ, given y=1 and y'=0 when x=0.
CF = Ae^x + Be^(2x)
PI' = 3ae^(3x), PI'' = 9ae^(3x). Substitute:
9ae^(3x)−9ae^(3x)+2ae^(3x)=4e^(3x) → 2a=4 → a=2
PI = 2e^(3x)
y'=Ae^x+2Be^(2x)+6e^(3x). y'(0)=0: A+2B+6=0 → A+2B=−6 ...(2)
(2)−(1): B=−5. A=−1+5=4
y = 4e^x − 5e^(2x) + 2e^(3x)
📐 Worked Example 8 — Modification Rule
Find the general solution of y'' − 4y' + 4y = e^(2x).
PI=ax²e^(2x). PI'=e^(2x)(2ax+2ax²). PI''=e^(2x)(2a+8ax+4ax²)
Substitute: e^(2x)(2a+8ax+4ax²)−4e^(2x)(2ax+2ax²)+4ax²e^(2x)=e^(2x)
2a+8ax+4ax²−8ax−8ax²+4ax²=1 → 2a=1 → a=½
PI = ½x²e^(2x)
📐 Worked Example 9 — Trig Forcing Function
Find the general solution of y'' + 4y = 3sin x.
PI''=−a cos x−b sin x. Substitute: (−a cos x−b sin x)+4(a cos x+b sin x)=3sin x
3a cos x+3b sin x=3sin x → a=0, b=1
PI=sin x
4. Further Integration Techniques P3
Integration Using Reduction Formulae
📐 Worked Example 10 — Reduction Formula
Let Iₙ = ∫₀^(π/2) sinⁿx dx. Show that Iₙ = ((n−1)/n)Iₙ₋₂. Hence find I₄ and I₅.
IBP: u=sinⁿ⁻¹x, dv=sin x dx → du=(n−1)sinⁿ⁻²x cos x dx, v=−cos x
Iₙ = [−sinⁿ⁻¹x cos x]₀^(π/2) + (n−1)∫₀^(π/2) sinⁿ⁻²x cos²x dx
Iₙ = (n−1)∫₀^(π/2) sinⁿ⁻²x dx − (n−1)∫₀^(π/2) sinⁿx dx
Iₙ = (n−1)Iₙ₋₂ − (n−1)Iₙ → nIₙ = (n−1)Iₙ₋₂
Iₙ = ((n−1)/n)Iₙ₋₂ ✓
I₄=(3/4)I₂=3π/16 I₅=(4/5)I₃=8/15
Further Substitution — Harder Cases
📐 Worked Example 11 — t = tan(x/2) Integration
Use t = tan(x/2) to find ∫1/(2+cos x) dx.
2+cos x=2+(1−t²)/(1+t²)=(2+2t²+1−t²)/(1+t²)=(3+t²)/(1+t²)
= (2/√3)arctan(t/√3) + c
= (2/√3)arctan(tan(x/2)/√3) + c
5. Numerical Methods for ODEs P3
Euler's Method
📐 Worked Example 12 — Euler's Method
Use Euler's method with h=0.1 to find an approximation for y(0.3) given dy/dx = x + y, y(0) = 1.
y₁ = 1 + 0.1×(0+1) = 1 + 0.1 = 1.1. x₁=0.1
(Exact: y=2eˣ−x−1; y(0.3)=2e^0.3−1.3≈1.400 — Euler has error ≈0.038)
6. Further Topics — Series Solutions and Harder ODEs P3
ODE Substitution to Reduce Order
📐 Worked Example 13 — Substitution in ODE
Using y = vx, solve x dy/dx − y = x² (Bernoulli / homogeneous type).
x(v+x dv/dx)−vx=x² → x²dv/dx=x² → dv/dx=1
y = x² + cx
📐 Worked Example 14 — Bernoulli ODE
Solve dy/dx + y = y² (Bernoulli equation).
dv/dx = −y⁻² dy/dx. Divide ODE by y²: y⁻² dy/dx + y⁻¹ = 1
−dv/dx + v = 1 → dv/dx − v = −1
ve^(−x) = e^(−x) + c → v = 1 + ce^x → 1/y = 1 + ce^x
y = 1/(1+ceˣ)
📝 Exam Practice Questions
Q1 [4 marks] — Obtain the first four non-zero terms of the Maclaurin series for ln(1+sin x).
ln(1+u) = u−u²/2+u³/3−u⁴/4+... where u=sin x=x−x³/6+...
u = x−x³/6; u²=x²−x⁴/3+...; u³=x³+...; u⁴=x⁴+...
ln(1+sin x) = (x−x³/6)−½(x²−x⁴/3)+x³/3−x⁴/4+...
= x−x²/2+(−1/6+1/3)x³+(1/6−1/4)x⁴+...
= x − x²/2 + x³/6 − x⁴/12 + ...
Q2 [4 marks] — Solve the ODE x dy/dx − 3y = x⁴, given y = 2 when x = 1.
IF = e^(∫−3/x dx) = e^(−3ln x) = x⁻³
Multiply by x⁻³: d(yx⁻³)/dx = x⁰ = 1
yx⁻³ = x + c → y = x⁴ + cx³
y=2, x=1: 2=1+c → c=1. y = x⁴+x³
Q3 [5 marks] — Find the general solution of d²y/dx² + 6 dy/dx + 9y = 2e^(−3x) + 4.
CF = (A+Bx)e^(−3x)
PI for 4: try y=k. 0+0+9k=4 → k=4/9.
PI for 2e^(−3x): m=−3 is a double root. Try ax²e^(−3x).
y=ax²e^(−3x): y'=e^(−3x)(2ax−3ax²); y''=e^(−3x)(2a−12ax+9ax²)
Sub: e^(−3x)(2a−12ax+9ax²+12ax−18ax²+9ax²)=2e^(−3x)
→ 2a=2 → a=1. PI₂=x²e^(−3x)
y = (A+Bx)e^(−3x) + x²e^(−3x) + 4/9 = (A+Bx+x²)e^(−3x) + 4/9
Q4 [4 marks] — Use Euler's method with step h=0.2 to estimate y(0.4) for dy/dx = y − x², y(0) = 1. Give your answer to 3 decimal places.
Step 1: y₁=1+0.2×(1−0)=1+0.2=1.200; x₁=0.2
Step 2: y₂=1.200+0.2×(1.200−0.04)=1.200+0.2×1.160=1.200+0.232=1.432; x₂=0.4
Q5 [5 marks] — Find the general solution of d²y/dx² − 2dy/dx + 5y = 13 cos 2x.
CF = e^x(A cos 2x + B sin 2x)
PI: try a cos 2x + b sin 2x
y''=−4a cos 2x−4b sin 2x, y'=−2a sin 2x+2b cos 2x
Sub: (−4a+4b cos 2x...): (−4a−4b+2b×(−2)+5a)cos2x+(−4b+4a+2×(−2a)+5b... let me collect:
cos 2x: −4a+4b+5a=(a+4b)=13 ...(i)
Wait—let me redo carefully. PI terms:
y''−2y'+5y = (−4a cos2x−4b sin2x)−2(−2a sin2x+2b cos2x)+5(a cos2x+b sin2x)
=(−4a−4b+5a)cos2x+(−4b+4a+5b)sin2x=(a−4b)cos2x+(4a+b)sin2x=13cos2x
a−4b=13 ...(i), 4a+b=0 ...(ii)
From (ii): b=−4a. Sub (i): a+16a=13 → 17a=13 → a=13/17, b=−52/17
y = e^x(A cos2x+B sin2x) + (13cos2x−52sin2x)/17
Q6 [4 marks] — Show that the substitution v = y/x transforms the ODE x²y'' + xy' − y = 0 into v'' + (1/x)v' − v/x² = 0... Actually: use v=1/y to solve dy/dx = y(y−1) (Bernoulli with n=2).
dv/dx=−y⁻²dy/dx. Divide ODE by y²: y⁻²dy/dx−y⁻¹=−1
−dv/dx−v=−1 → dv/dx+v=1
IF=eˣ: d(veˣ)/dx=eˣ → veˣ=eˣ+c → v=1+ce^(−x)
1/y=1+ce^(−x)
y = 1/(1+ce^(−x))