Radford Mathematics IB Mathematics resources • AA HL

Radford Mathematics

Contact / enquiry

Send a question about tutoring, revision courses, website resources or anything else. Your message will be sent to info@radfordmathematics.com.

IB Mathematics: Analysis and Approaches HL — Topic 5 Calculus

First-Order Differential Equations

Recognise the structure of a first-order differential equation, choose the correct exact or numerical method, and interpret solutions in mathematical and real-world contexts.

AA HL · AHL 5.18

Learning goal

Solve separable, homogeneous and linear first-order equations, then approximate solutions numerically with Euler’s method.

Syllabus link

AHL 5.18 Separable and homogeneous equations, integrating factors, logistic growth and Euler’s method.

Big idea

A differential equation gives a rule for change. Its structure tells you which method will turn that rule into a usable solution.

Key relationships

\(y=vx\), \(\mu=e^{\int P(x)\,dx}\), and \(y_{n+1}=y_n+h f(x_n,y_n)\).

1

Language and structure of differential equations

A differential equation is an equation whose unknown is a function. It links that unknown function to one or more derivatives, so its solutions are curves rather than isolated numbers.

Differential equationAn equation involving an unknown function and one or more of its derivatives.
OrderDetermined by the highest derivative present.
General solutionA family containing an arbitrary constant, such as \(y=Ce^{2x}\).
Initial conditionA stated value such as \(y(0)=3\), used to determine the arbitrary constant.
Particular solutionThe single member of the family satisfying the initial condition.
Equilibrium solutionA constant solution for which \(y'=0\) everywhere.

Worked example 1: verify a proposed solution

Show that \(y=3e^{2x}-\frac{x}{2}-\frac14\) solves \(y'-2y=x\).

Differentiate:

\[y'=6e^{2x}-\frac12.\]

Now substitute both \(y\) and \(y'\) into the differential equation:

\[\begin{aligned}y'-2y&=\left(6e^{2x}-\frac12\right)-2\left(3e^{2x}-\frac{x}{2}-\frac14\right)\\&=6e^{2x}-\frac12-6e^{2x}+x+\frac12\\&=x.\end{aligned}\]

The left side becomes the right side for every permitted \(x\), so the function is a solution.

Verification means an identity

Checking one numerical value is not enough. Substitute the proposed function and its derivative and show that the differential equation holds throughout the interval.

2

Separable differential equations

An equation is separable when it can be rearranged into \(G(y)\,dy=H(x)\,dx\), after which both sides can be integrated.

Separation method

  1. Move every factor involving \(y\) with \(dy\), and every factor involving \(x\) with \(dx\).
  2. Integrate both sides and include one arbitrary constant.
  3. Use the initial condition when one is given.
  4. Make \(y\) the subject when possible and state relevant domain restrictions.

Separable Differential Equations

The complete separation-of-variables process: rearrange, integrate and use a condition to determine the constant.

Watch on YouTube →

Worked example 2: inverse-trigonometric integral

Solve \(\frac{dy}{dx}=3x^2(1+y^2)\), with \(y(0)=1\).

\[\frac1{1+y^2}\,dy=3x^2\,dx.\]\[\int\frac1{1+y^2}\,dy=\int3x^2\,dx\quad\Longrightarrow\quad\arctan y=x^3+C.\]

From \(y(0)=1\), \(C=\pi/4\). Hence

\[\boxed{y=\tan\!\left(x^3+\frac\pi4\right)}.\]

The formula is valid on any interval containing \(x=0\) on which the tangent expression is defined.

Worked example 3: separation leading to a logarithm

Solve \(\frac{dy}{dx}=(x+1)e^{-y}\), with \(y(0)=0\).

\[e^y\frac{dy}{dx}=x+1\quad\Longrightarrow\quad \int e^y\,dy=\int(x+1)\,dx.\]\[e^y=\frac{x^2}2+x+C.\]

The condition gives \(C=1\), so

\[\boxed{y=\ln\!\left(\frac{x^2}2+x+1\right)}.\]

Since \(\frac12[(x+1)^2+1]>0\), the logarithm is defined for every real \(x\).

Equilibrium solutions can be lost during division

Before dividing by a factor involving the dependent variable, check whether that factor can be zero. Those values can produce constant equilibrium solutions that division would erase.

Worked example 4: complete logistic-type solution set

Find all solutions of \(y'=y(3-y)\).

Step 1 — equilibria: \(y(3-y)=0\) gives \(\boxed{y\equiv0}\) and \(\boxed{y\equiv3}\).
Step 2 — non-equilibrium family: assume \(y\neq0,3\) and separate:
\[\frac1{y(3-y)}\,dy=dx.\]

Partial fractions give \(\frac1{y(3-y)}=\frac13\left(\frac1y+\frac1{3-y}\right)\). Hence

\[\frac13\bigl(\ln|y|-\ln|3-y|\bigr)=x+C\quad\Longrightarrow\quad\frac{y}{3-y}=Ce^{3x}.\]

Solving for \(y\):

\[\boxed{y=\frac{3Ce^{3x}}{1+Ce^{3x}}},\qquad C\neq0.\]

The complete solution set is the two equilibrium solutions together with this non-equilibrium family.

Common separation trap

Always check for constant solutions before dividing by a \(y\)-factor.

The logistic equation

A standard logistic model is

\[\frac{dn}{dt}=kn(a-n),\qquad a>0.\]

The constant \(a\) is the carrying capacity: the population level supported in the long run by the modelled environment. The equilibrium solutions are \(n=0\) and \(n=a\). For non-equilibrium solutions, separation gives

\[\boxed{n(t)=\frac{a}{1+Ce^{-akt}}},\qquad C=\frac{a-n_0}{n_0}\text{ if }n(0)=n_0.\]

Worked example 5: exact logistic model

\(P' =0.0005P(1200-P)\), \(P(0)=100\). Find \(P(t)\), then find when \(P=900\).

Here \(a=1200\), \(k=0.0005\), so \(ak=0.6\), and \(C=(1200-100)/100=11\). Therefore

\[\boxed{P(t)=\frac{1200}{1+11e^{-0.6t}}}.\]

Set \(P=900\):

\[900=\frac{1200}{1+11e^{-0.6t}}\Longrightarrow e^{-0.6t}=\frac1{33}\Longrightarrow \boxed{t=\frac{\ln33}{0.6}\approx5.83}.\]
Logistic population curve approaching carrying capacity 1200, with the point P equals 900 highlighted near t equals 5.83.
The exact logistic model from Worked Example 5. The crop comes directly from the finalized AHL 5.18 handout.
3

Homogeneous differential equations: use \(y=vx\)

In AHL 5.18, a first-order homogeneous differential equation can be written as

\[\frac{dy}{dx}=F\!\left(\frac yx\right).\]

Rewrite the whole right-hand side in terms of \(y/x\). Then set \(v=y/x\), so \(y=vx\) and, crucially,

\[\boxed{\frac{dy}{dx}=v+x\frac{dv}{dx}}.\]

Homogeneous-equation method

  1. Confirm the right-hand side depends only on \(y/x\).
  2. Set \(v=y/x\), so \(y=vx\) and \(y'=v+xv'\).
  3. Substitute and rearrange to obtain a separable equation in \(v\) and \(x\).
  4. Integrate, replace \(v\) by \(y/x\), then apply any condition.

Worked example 6: homogeneous equation with explicit solution

Solve \(y'=y/x+x/y\), \(y(1)=2\), for \(x>0\), \(y>0\).

The right side is \(y/x+1/(y/x)\), so set \(v=y/x\). Then

\[v+x\frac{dv}{dx}=v+\frac1v\quad\Longrightarrow\quad v\,dv=\frac1x\,dx.\]\[\frac{v^2}2=\ln x+C\quad\Longrightarrow\quad v^2=2\ln x+C_1.\]

Replace \(v=y/x\) and use \(y(1)=2\): \(C_1=4\). Thus

\[y^2=x^2(2\ln x+4).\]

Because \(y(1)>0\), choose the positive branch:

\[\boxed{y=x\sqrt{2\ln x+4}}.\]

Worked example 7: implicit homogeneous solution

Solve \(y'=(x+y)/(x-y)\).

Divide numerator and denominator by \(x\), then set \(v=y/x\):

\[v+xv'=\frac{1+v}{1-v}\quad\Longrightarrow\quad xv'=\frac{1+v^2}{1-v}.\]\[\frac{1-v}{1+v^2}\,dv=\frac1x\,dx.\]

Integrating gives

\[\arctan v-\frac12\ln(1+v^2)=\ln|x|+C.\]

After substituting \(v=y/x\) and simplifying the logarithms, the \(\ln|x|\) terms cancel:

\[\boxed{\arctan\!\left(\frac yx\right)-\frac12\ln(x^2+y^2)=C}.\]
Geometric interpretation of v equals y over x as the slope of a ray from the origin to a point P x y.
Why \(v=y/x\) is natural: points on the same ray from the origin have the same ratio \(y/x\).

The product-rule term is essential

Because \(v\) changes with \(x\), differentiating \(y=vx\) gives \(y'=v+xv'\), not \(y'=xv'\).

Homogeneous Differential Equations

Recognise dependence on y/x, use y=vx, apply the product rule and reduce the equation to a separable form.

Watch on YouTube →

4

Linear first-order equations and integrating factors

Write a linear first-order equation in standard form

\[\boxed{y'+P(x)y=Q(x)}.\]

The coefficient of \(y'\) must be 1. Then use

\[\boxed{\mu(x)=e^{\int P(x)\,dx}},\qquad \boxed{(\mu y)'=\mu Q},\qquad \boxed{y=\frac1\mu\left(\int\mu Q\,dx+C\right)}.\]
Integrating factor workflow from standard linear form through mu, product derivative and integration.
The integrating-factor workflow, cropped from the finalized handout.

Five-step method

  1. Put the equation into \(y'+P(x)y=Q(x)\).
  2. Find \(\mu=e^{\int P(x)dx}\).
  3. Multiply every term by \(\mu\).
  4. Replace the left side by \((\mu y)'\).
  5. Integrate, solve for \(y\), then use any initial condition.

Linear Differential Equation 1

Introduce the standard linear form and the integrating-factor method before the first complete example.

Watch on YouTube →

Worked example 8: constant coefficient

Solve \(y'+2y=e^x\), \(y(0)=3\).

Here \(P(x)=2\), so \(\mu=e^{2x}\). Multiply by \(e^{2x}\):

\[e^{2x}y'+2e^{2x}y=e^{3x}\quad\Longrightarrow\quad(e^{2x}y)'=e^{3x}.\]\[e^{2x}y=\frac13e^{3x}+C\quad\Longrightarrow\quad y=\frac13e^x+Ce^{-2x}.\]

Using \(y(0)=3\) gives \(C=8/3\):

\[\boxed{y=\frac13e^x+\frac83e^{-2x}}.\]

Linear Differential Equation 2

A second guided example reinforcing P(x), the integrating factor, the product derivative and the initial condition.

Watch on YouTube →

Worked example 9: first put the equation in standard form

Solve \(xy'-2y=x^3\), \(y(1)=4\), for \(x>0\).

Divide the entire equation by \(x\): \(y'-\frac2x y=x^2\). Therefore

\[\mu=e^{\int-2/x\,dx}=e^{-2\ln x}=x^{-2}.\]

Multiplying through gives \((x^{-2}y)'=1\), so

\[x^{-2}y=x+C\quad\Longrightarrow\quad y=x^3+Cx^2.\]

Use \(y(1)=4\): \(C=3\). Hence

\[\boxed{y=x^3+3x^2}.\]

Linear Differential Equation 3

Consolidate the full method after an equation whose y-prime coefficient was not initially 1.

Watch on YouTube →

Newton’s law of cooling

If the ambient temperature \(T_a\) is constant,

\[\frac{dT}{dt}=-k(T-T_a),\qquad k>0,\]

with solution

\[\boxed{T(t)=T_a+(T_0-T_a)e^{-kt}}.\]

Worked example 10: cooling model

A drink is initially \(90^\circ\mathrm C\) in a \(20^\circ\mathrm C\) room. After 10 minutes it is \(55^\circ\mathrm C\). When does it reach \(30^\circ\mathrm C\)?

The model is \(T=20+70e^{-kt}\). From \(T(10)=55\):

\[35=70e^{-10k}\Longrightarrow e^{-10k}=\frac12\Longrightarrow k=\frac{\ln2}{10}.\]

Now set \(T=30\):

\[10=70e^{-kt}\Longrightarrow e^{-kt}=\frac17\Longrightarrow \boxed{t=\frac{10\ln7}{\ln2}\approx28.1\text{ min}}.\]
Newton cooling curve from 90 degrees Celsius toward an ambient temperature of 20 degrees, marking 30 degrees at about 28.1 minutes.
The cooling curve from Worked Example 10.

Why the integrating factor works

After multiplying \(y'+Py=Q\) by an unknown \(\mu\), the left side is \(\mu y'+\mu Py\). To make this exactly \((\mu y)'=\mu y'+\mu' y\), require \(\mu'=P\mu\). Therefore \(\mu'/\mu=P\), so \(\ln|\mu|=\int P\,dx\) and the convenient choice is \(\mu=e^{\int Pdx}\).

Derivation chain showing why the integrating factor mu equals e to the integral of P dx.
The finalized handout’s derivation chain: the integrating factor is chosen so that the product rule appears exactly.
5

Euler’s method

Euler’s method builds an approximate solution to \(y'=f(x,y)\) from an initial point \((x_0,y_0)\) and a fixed step size \(h\).

\[\boxed{x_{n+1}=x_n+h},\qquad\boxed{y_{n+1}=y_n+h f(x_n,y_n)}.\]

At the current point \(P_n=(x_n,y_n)\), the differential equation gives the tangent gradient \(f(x_n,y_n)\). Moving horizontally by \(h\), the tangent predicts a vertical change \(h f(x_n,y_n)\). That tangent step is used as the next approximate point.

The most important Euler rule

Evaluate the gradient at the current point first. Do not update \(y\) and then use the new value in the slope for the same step.

Euler method diagram showing a tangent step from P sub n with horizontal step h and vertical change h times f of x n y n.
A single Euler tangent step from the finalized handout.

Worked example 11: build \(P_1,P_2,P_3\) step by step

Use Euler’s method with \(h=0.2\) to estimate \(y(0.6)\) for \(y'=x+y\), \(y(0)=1\).

From \(P_0=(0,1)\): slope \(=0+1=1\). Therefore \(y_1=1+0.2(1)=1.2\), so \(P_1=(0.2,1.2)\).
From \(P_1=(0.2,1.2)\): slope \(=0.2+1.2=1.4\). Therefore \(y_2=1.2+0.2(1.4)=1.48\), so \(P_2=(0.4,1.48)\).
From \(P_2=(0.4,1.48)\): slope \(=0.4+1.48=1.88\). Therefore \(y_3=1.48+0.2(1.88)=1.856\), so \(P_3=(0.6,1.856)\).

Hence

\[\boxed{y(0.6)\approx1.856}.\]

The exact solution is \(y=2e^x-x-1\), giving \(y(0.6)\approx2.044\). The Euler estimate is lower because the solution curve bends upward while each tangent segment lies below it after the point of contact.

Euler polygon compared with the exact solution curve for y prime equals x plus y.
The Euler polygon and exact curve after three steps.
\(n\)\(x_n\)\(y_n\)Current slope \(x_n+y_n\)Updated \(y_{n+1}\)
00.01.0001.0001.200
10.21.2001.4001.480
20.41.4801.8801.856

Worked example 12: numerical logistic growth

\(P\), measured in thousands, satisfies \(P'=0.4P(1-P/10)\), \(P(0)=2\). Use Euler’s method with \(h=0.5\) to estimate \(P(1.5)\).

\(n\)\(t_n\)\(P_n\)\(f(t_n,P_n)\)\(P_{n+1}\)
00.02.00000.64002.3200
10.52.32000.7127042.676352
21.02.676352≈0.7840263.068365

Thus \(\boxed{P(1.5)\approx3.07\text{ thousand}}\), approximately 3070 people.

Technology note

A spreadsheet can generate an Euler table efficiently: enter \(x_n\), \(y_n\), the current slope \(f(x_n,y_n)\), then the update formula in the next row. Keep the initial value, step size, current slope and new value clearly visible.

Euler’s Method for Differential Equations — TI-Nspire CX

Connect the hand-built Euler table to an efficient graphical-calculator implementation.

Watch on YouTube →

6

Choosing the correct method

Flowchart for choosing Euler, separable, homogeneous or integrating factor methods for first-order differential equations.
Start with the kind of answer requested, then recognise the equation’s structure.

Four high-frequency errors

  • Euler: using the updated \(y\) too early or taking the wrong number of steps.
  • Separable: losing equilibrium solutions by division or forgetting the constant of integration.
  • Homogeneous: writing \(y'=xv'\) instead of \(y'=v+xv'\).
  • Linear: finding the integrating factor before first making the coefficient of \(y'\) equal to 1.
7

Practice questions

A. Core skills

  1. Verify that \(y=Ce^{3x}-\frac23\) satisfies \(y'-3y=2\).
  2. Use Euler’s method with \(h=0.25\) to estimate \(y(0.5)\), given \(y'=x-y\), \(y(0)=2\).
  3. Use Euler’s method with \(h=0.5\) to estimate \(y(2)\), given \(y'=y/x\), \(y(1)=2\).
  4. Solve \(y'=4x/y\), given \(y(0)=3\), \(y>0\).
  5. Find an implicit solution of \(y'=(1+x^2)/(1+y^2)\), given \(y(0)=0\).
  6. \(N'=0.0004N(1000-N)\), \(N(0)=200\). Find \(N(t)\), then find when \(N=800\).
  7. Solve \(y'=y/x+x/y\), given \(y(1)=1\), \(x>0,y>0\).
  8. Solve \(y'=1+y/x\), given \(y(1)=2\), \(x>0\).
  9. Solve \(y'+3y=6\), given \(y(0)=5\).
  10. Solve \(xy'+y=x^2\), given \(y(1)=2\), \(x>0\).
  11. An object at \(80^\circ C\) is placed in a room at \(18^\circ C\). After five minutes it is \(49^\circ C\). When will it reach \(25^\circ C\)?
  12. State the most appropriate syllabus method for: (a) \(y'=x^2(1-y)\); (b) \(y'=(x+y)/(x-y)\); (c) \(y'+(2/x)y=\sin x\); (d) estimate \(y(1.2)\) from \(y'=x+y^2\), \(y(1)=0.4\), \(h=0.05\).

B. IB-style extended response

  1. For \(y'=y-x^2\), \(y(0)=0.5\): (a) use Euler with \(h=0.2\) to estimate \(y(0.4)\); (b) repeat with \(h=0.1\); (c) comment on the two estimates.
  2. \(P'=0.0003P(2000-P)\), \(P(0)=200\): (a) find \(P(t)\); (b) find when \(P=1500\); (c) determine the population at which growth is greatest and the maximum rate.
  3. Solve \(y'=y/x+x/y\), \(y(1)=2\), \(x>0,y>0\). Hence find \(y(e)\).
  4. Solve \(y'-2y=xe^{2x}\), \(y(0)=1\).
  5. A body at \(95^\circ C\) is placed in a \(22^\circ C\) room. After 12 minutes it is \(58.5^\circ C\). Find a model, find \(T(30)\), and find when it reaches \(30^\circ C\).
  6. Carbon-14 has half-life 5730 years. A sample contains 35% of the carbon-14 present in a living organism. Form and solve a model and estimate the sample’s age.
8

Answer key

Core skills 1–6
  1. \(y'=3Ce^{3x}\), hence \(y'-3y=2\).
  2. \(y_1=1.5\), \(y_2=1.1875\), so \(y(0.5)\approx1.1875\).
  3. \((1,2)\to(1.5,3)\to(2,4)\), so \(y(2)\approx4\).
  4. \(y\,dy=4x\,dx\Rightarrow y^2=4x^2+9\); since \(y>0\), \(\boxed{y=\sqrt{4x^2+9}}\).
  5. \(\boxed{y+y^3/3=x+x^3/3}\).
  6. \(\boxed{N=1000/(1+4e^{-0.4t})}\), and \(\boxed{t=\ln16/0.4\approx6.93}\).
Core skills 7–12
  1. \(\boxed{y=x\sqrt{2\ln x+1}}\).
  2. \(xv'=1\Rightarrow v=\ln x+C\), and \(\boxed{y=x(\ln x+2)}\).
  3. \(\boxed{y=2+3e^{-3x}}\).
  4. \(\mu=x\), so \((xy)'=x^2\); \(\boxed{y=x^2/3+5/(3x)}\).
  5. \(T=18+62e^{-kt}\), \(k=\ln2/5\), and \(\boxed{t=5\ln(62/7)/\ln2\approx15.7\text{ min}}\).
  6. (a) separable; (b) homogeneous \(y=vx\); (c) linear, integrating factor; (d) Euler’s method.
IB-style extended response
  1. (a) \(y(0.4)\approx0.712\); (b) with \(h=0.1\), \(y(0.4)\approx0.71744\); (c) the smaller step recalculates the tangent more frequently and is usually more accurate.
  2. (a) \(\boxed{P=2000/(1+9e^{-0.6t})}\); (b) \(\boxed{t=\ln27/0.6\approx5.49}\); (c) maximum growth occurs at \(P=1000\), with rate \(\boxed{300}\) population units per unit time.
  3. \(\boxed{y=x\sqrt{2\ln x+4}}\), so \(\boxed{y(e)=e\sqrt6}\).
  4. \(\mu=e^{-2x}\), so \((e^{-2x}y)'=x\); therefore \(\boxed{y=e^{2x}(x^2/2+1)}\).
  5. \(\boxed{T=22+73e^{-(\ln2/12)t}}\); \(T(30)\approx34.9^\circ C\); it reaches \(30^\circ C\) at \(\boxed{t\approx38.3\text{ min}}\).
  6. \(R'=-kR\), \(k=\ln2/5730\), so \(\boxed{R(t)=e^{-(\ln2/5730)t}}\). Setting \(R=0.35\) gives about \(\boxed{8680\text{ years}}\).

What to remember

  • Initial conditions select one solution curve from a family.
  • Check equilibrium solutions before dividing during separation.
  • For homogeneous equations use \(y=vx\) and \(y'=v+xv'\).
  • For linear equations make the coefficient of \(y'\) equal to 1 before finding \(\mu\).
  • For Euler’s method count the required steps and use the current row’s slope.

Premium printable resource

This free web lesson follows the finalized Radford Mathematics AHL 5.18 teaching sequence. The polished printable handout and Topic 5 resource pack are premium resources; the protected PDF is not linked from this page.

Visit the Radford Mathematics Store →