← All notesMaths AA · Differential equations and Maclaurin series⬇ Download PDF
IB DP Maths AA · Topic 5 Calculus · AHL 5.18, 5.19 · ~9 min read

Differential equations and Maclaurin series

HL first-order differential equations: separating variables, slope fields, homogeneous equations with y = vx, integrating factors and modelling growth and cooling, plus Maclaurin series from the formula booklet, building new series by substitution, multiplication and differentiation, series from a differential equation, and limits using series.

Differential equationsSeparating variablesSlope fieldsHomogeneous equations (y = vx)Integrating factorExponential modelsNewton’s law of coolingMaclaurin series
RSby Riyaz Sir
mentorriyaz.in
No tag = SL and HLHL ONLY HL students onlyFORMULA BOOKLET given in the examM1A1 how marks are awardedhighlight = comes up again and againTest yourself at the end

In 30 seconds

  • A differential equation links y, x and dy/dx. Solving it means finding y as a function of x; a boundary condition fixes the constant.
  • Three methods: separate the variables (dy/dx = f(x)g(y)); substitute y = vx for homogeneous equations (dy/dx = f(y/x)); multiply by an integrating factor e∫P dx for dy/dx + P(x)y = Q(x).
  • A Maclaurin series writes f(x) as a polynomial in x: f(x) = f(0) + xf′(0) + x22!f″(0) + … The series for eˣ, sin x, cos x, ln(1 + x) and (1 + x)p are in the booklet.
  • Build new series from known ones by substituting, multiplying, differentiating or integrating, instead of differentiating from scratch.
  • This note is HL only (AHL 5.18–5.19).

By the end you can

  • Set up differential equations from a description of rates of change. HL
  • Solve separable differential equations with boundary conditions. HL
  • Sketch and interpret slope fields. HL
  • Solve homogeneous equations with y = vx, and linear equations with an integrating factor. HL
  • Find Maclaurin series by differentiation and from the standard series. HL
  • Use Maclaurin series to approximate values, solve DEs and find limits. HL
Syllabus noteFrom first exams in 2029, Euler's method for numerical solutions of differential equations is removed. If you sit exams before 2029, you still need it: yn + 1 = yn + h × f(xn, yn), xn + 1 = xn + h.

1Setting up and separating variables HL

  • Words to equations: "the rate of growth is proportional to the population" means dP/dt = kP. "Cools at a rate proportional to the difference from room temperature" means dT/dt = −k(T − Troom).
  • Separating: get all the y terms (with dy) on one side and all the x terms (with dx) on the other, then integrate both sides. One + C is enough.
Worked example

Solve dydx = xy given y = 2 when x = 0.

  1. ∫1y dy = ∫x dx M1
  2. ln ǀyǀ = x22 + C A1
  3. y = Aex^{2/2}; y(0) = 2 ⇒ A = 2 M1
  4. y = 2ex^{2/2} A1
Worked example

Solve dydx = 1 + y2 with y = 0 at x = 0.

  1. ∫11 + y2 dy = ∫1 dx M1
  2. arctan y = x + C, and C = 0 A1
  3. y = tan x (for −π/2 < x < π/2) A1
Common mistakeWriting ln y = x22 + C and then y = ex^{2/2} + C. The constant goes inside the exponential: y = ex^{2/2 + C} = Aex^{2/2}.

2Slope fields HL

xydy/dx = xyeach dash hasgradient xyRed and blue: the solutions y = Ae^(x²/2) for two values of A.
At each point, draw a short dash with the gradient given by the DE. Solution curves follow the dashes and never cross.
  • Reading a slope field: where dy/dx = 0 the dashes are horizontal (here along both axes). Isoclines are curves where the gradient is the same.

3Homogeneous equations HL

  • Recognise it: dy/dx = f(yx), for example x + yx = 1 + yx or x2 + y2xy.
  • Method: let y = vx, so dydx = v + xdvdx. The equation becomes separable in v and x.
Worked example

Solve dydx = x + yx for x > 0, given y = 2 when x = 1.

  1. y = vx: v + xdvdx = 1 + v M1
  2. dvdx = 1x ⇒ v = ln x + C A1
  3. y = x ln x + Cx; y(1) = 2 ⇒ C = 2 M1
  4. y = x ln x + 2x A1

4The integrating factor HL

dydx + P(x)y = Q(x), integrating factor e∫P(x) dx FORMULA BOOKLET
multiply through and the left side becomes d/dx (IF × y)
Worked example

Solve dydx + 2yx = x2 for x > 0, given y = 1 when x = 1.

  1. IF = e∫2/x dx = e2 ln x = x2 M1A1
  2. ddx(x2y) = x4 ⇒ x2y = x55 + C M1
  3. y(1) = 1 ⇒ C = 45, so y = x35 + 45x2 A1
Common mistakeForgetting to put the DE in standard form first. dy/dx must have coefficient 1: divide xdydx + 2y = x3 by x before finding P(x).

5Models HL

t (min)T (°C)010203040506020406080100(10, 60)30 °C at t ≈ 34.8room temperature 20 °CdT/dt = −k(T − 20)T = 20 + 70e^(−kt), k = 0.0560
The temperature drops quickly at first, then levels off towards room temperature.
Worked example

Tea at 90 °C cools in a 20 °C room, with dTdt = −k(T − 20). After 10 minutes it is 60 °C. When does it reach 30 °C?

  1. separate: T = 20 + 70e−kt M1A1
  2. 60 = 20 + 70e−10k ⇒ k = ln(7/4)10 = 0.0560 M1A1
  3. 30 = 20 + 70e−kt ⇒ t = ln 7k = 34.8 min A1
  • Logistic growth dP/dt = kP(1 − P/N) is solved with partial fractions (Proof, counting and partial fractions); the population levels off at N.
GDC (calculator) methodPaper 2: graph your solution and check it passes through the boundary point. Some GDCs can draw slope fields, which helps you check the shape.

6Maclaurin series HL

f(x) = f(0) + xf′(0) + x22!f″(0) + x33!f‴(0) + … FORMULA BOOKLET
general Maclaurin series
FunctionSeriesValid for
eˣ1 + x + x22! + x33! + …all x
ln(1 + x)x − x22 + x33 − …−1 < x ≤ 1
sin xx − x33! + x55! − …all x
cos x1 − x22! + x44! − …all x
arctan xx − x33 + x55 − …ǀxǀ ≤ 1
(1 + x)p1 + px + p(p − 1)2!x2 + …ǀxǀ < 1
xycos x1 − x²/2+ x⁴/24− x⁶/720More terms: a good fit over a wider interval around x = 0.
Each extra term of the cos x series hugs the curve over a wider interval.
Worked example

Find the Maclaurin series for e2x up to the x3 term.

  1. substitute 2x for x in the eˣ series M1
  2. 1 + 2x + (2x)22 + (2x)36 M1
  3. = 1 + 2x + 2x2 + 43x3 A1
Worked example

Find the series for eˣ sin x up to the x3 term.

  1. (1 + x + x22 + …)(x − x36 + …) M1
  2. = x + x2 + x32 − x36 + … A1
  3. = x + x2 + x33 A1
  • Differentiate or integrate a series: differentiating sin x's series gives cos x's; integrating 11 + x2 = 1 − x2 + x4 − … term by term gives arctan x.
Worked example

Use the series for e−x^{2} to estimate ∫00.5 e−x^{2} dx.

  1. e−x^{2} = 1 − x2 + x42 − … M1
  2. integrate: x − x33 + x510 from 0 to 0.5 M1
  3. = 0.5 − 0.04167 + 0.00313 = 0.4615 (true value 0.4613) A1

7Series from a differential equation HL

Worked example

y satisfies dydx = x + y with y(0) = 1. Find the Maclaurin series up to the x3 term.

  1. y′(0) = 0 + 1 = 1 A1
  2. differentiate: y″ = 1 + y′ ⇒ y″(0) = 2; y‴ = y″ ⇒ y‴(0) = 2 M1A1
  3. y ≈ 1 + x + x2 + x33 A1

8Limits with series HL

Worked example

Find limx → 0 1 − cos xx2.

  1. 1 − cos x = x22 − x424 + … M1
  2. 1 − cos xx2 = ½ − x224 + … → ½ A1
Exam tipFor a 0/0 limit, series and L'Hôpital's rule (Differentiation) both work. Series are often quicker when the function is a product or a composite.
Linking questionEvery DE here is solved by integrating (Integration and kinematics). Exponential models link to Exponents and logarithms, and the (1 + x)p series extends the binomial theorem (Sequences, series and the binomial theorem) to any power p.
Idea for your IA / explorationModel a real cooling curve (a cup of tea with a thermometer and timer) with Newton's law of cooling and compare the fitted k with your data, or investigate how many Maclaurin terms you need to compute π or e to a given accuracy.

Test yourself — cover the answers first

Quick check

  1. HL Write "the rate of decay of mass m is proportional to m" as a DE.
  2. HL What substitution solves a homogeneous DE?
  3. HL Find the integrating factor for dy/dx + 3y = eˣ.
  4. HL Write the first three non-zero terms of the series for sin 2x.
  5. HL What is f″(0) if the Maclaurin series of f starts 3 + 2x + 5x² + …?

Exam-style

  1. HL Use an integrating factor to solve xdydx − y = x2, x > 0, given y = 3 at x = 1.
  2. HL Find the Maclaurin series of ln(1 + sin x) up to the x2 term.
Show answers
  1. dm/dt = −km
  2. y = vx
  3. e3x
  4. 2x − (4/3)x³ + (4/15)x⁵
  5. 10
  6. standard form dydx − yx = x; IF = e−ln x = 1x
    ddx(yx) = 1 ⇒ yx = x + C
    y(1) = 3 ⇒ C = 2, so y = x2 + 2x
  7. sin x ≈ x, so ln(1 + sin x) ≈ sin x − sin2x2
    ≈ (x − …) − x22
    ≈ x − x22
Practise this chapter
Stuck on a question?

Send it to me on WhatsApp. I read every message.

Want regular help? Send this to your parent →
Share with a friendAsk Riyaz Sir

Independent notes written by Riyaz Sir. Not produced, endorsed or approved by the International Baccalaureate Organization. Syllabus codes refer to the IB DP subject guides.