Differential equations AI HL

A differential equation links a quantity to its rate of change, and the question decides the tool: separate the variables when an exact solution is wanted, use Euler's method when an approximate value is wanted, read a slope field to see the gradient at a point, and use the eigenvalues of a coupled system to describe where its solutions go. The calculator does the arithmetic and finds the eigenvalues, so the marks are for setting the equation up, choosing the method and interpreting the result. Work through the sections in order, because the later sections use the gradient function from the first.

Formulas at a glance

Euler's method (for one equation and for a coupled pair), the exact solution of a coupled linear system and the percentage error formula are in the formula booklet. Separation of variables and the eigenvalue rules for phase portraits are not, so learn them.

Separation of variables

dydx=f(x)g(y) ⇒ ∫1g(y)dy=∫f(x)dx\dfrac{dy}{dx}=f(x)g(y)\ \Rightarrow\ \displaystyle\int\dfrac{1}{g(y)}\,dy=\int f(x)\,dx

Not in the booklet

Growth or decay proportional to the amount

dydx=ky ⇒ y=Aekx\dfrac{dy}{dx}=ky\ \Rightarrow\ y=Ae^{kx}

Not in the booklet

Euler's method, one equation

yn+1=yn+hf(xn,yn),xn+1=xn+hy_{n+1}=y_n+h\,f(x_n,y_n),\quad x_{n+1}=x_n+h

In the booklet

Euler's method, coupled system

xn+1=xn+hf1(xn,yn,tn), yn+1=yn+hf2(xn,yn,tn), tn+1=tn+hx_{n+1}=x_n+h\,f_1(x_n,y_n,t_n),\ y_{n+1}=y_n+h\,f_2(x_n,y_n,t_n),\ t_{n+1}=t_n+h

In the booklet

Percentage error of an estimate

ε=|vA−vEvE|×100%\varepsilon=\left|\dfrac{v_A-v_E}{v_E}\right|\times100\%

In the booklet

Exact solution of a coupled linear system with distinct real eigenvalues

x=Aeλ1tp1+Beλ2tp2\mathbf{x}=Ae^{\lambda_1t}\mathbf{p}_1+Be^{\lambda_2t}\mathbf{p}_2

In the booklet

Which method to use

Look at what the question asks for: an exact formula, an approximate value, the gradient at a point, or the long-term behaviour of a pair of equations.

The question hasUseNotes
A rate of change proportional to a quantity, or an equation where the right side splits into an xx part times a yy part, and an exact solution is wantedSeparate the variables, integrate both sides, then use the starting values to find the constantA general solution has a constant; a starting value turns it into a particular solution
An equation dydx=f(x,y)\dfrac{dy}{dx}=f(x,y), a starting point and a step size, and an approximate value is wantedEuler's method: yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n) and xn+1=xn+hx_{n+1}=x_n+hUse the gradient at the point you are leaving, not the point you are reaching
A pair of equations for dxdt\dfrac{dx}{dt} and dydt\dfrac{dy}{dt} with starting values and a step sizeEuler's method on both variables, adding hh to tt each stepBoth new values come from the old values of xx, yy and tt
A slope field, and the gradient at a point, or whether yy is increasing or decreasingSubstitute the coordinates of the point into f(x,y)f(x,y)The sign of the result gives the direction; no solving is needed
A request for constant solutions or for where the segments are horizontalSolve f(x,y)=0f(x,y)=0, with the calculator's equation solver if neededCheck the sign of the gradient either side to decide whether solutions move towards or away
dxdt=ax+by\dfrac{dx}{dt}=ax+by, dydt=cx+dy\dfrac{dy}{dt}=cx+dy and a question on the type or stability of the equilibriumFind the eigenvalues of the matrix of coefficients with the calculator, then apply the eigenvalue rulesReal with different signs gives a saddle point; complex gives a spiral; imaginary gives a circle or ellipse
The same system with real distinct eigenvalues and a particular solution wantedThe exact solution from the booklet, with the eigenvalues and eigenvectors from the calculatorUse the starting values to find the constants AA and BB

Section 1 of 4 AHL5.14

Separable differential equations

A first-order differential equation is separable when it can be written as dydx=g(x)h(y)\dfrac{dy}{dx}=g(x)h(y), so the yy terms can be moved to one side and the xx terms to the other. Integrate each side, then use an initial condition to find the constant. It covers general and particular solutions and growth models.

The method

There is no formula-booklet entry for this - it's a technique you apply, not a formula you look up.

Separate

dydx=f(x)g(y)⟹∫1g(y)dy=∫f(x)dx\dfrac{dy}{dx} = f(x)g(y) \implies \displaystyle\int \dfrac{1}{g(y)}\,dy = \int f(x)\,dx

Every yy (and dydy) moves to one side, every xx (and dxdx) to the other, before either side is integrated.

Solve for the constant

General solution →\to substitute a given point (x0,y0)(x_0, y_0) →\to particular solution

A general solution has an unknown constant CC. An initial condition such as y(0)=3y(0)=3 turns it into one specific, particular solution.

Key terms

What is a general solution?

A general solution contains an arbitrary constant, so it describes a whole family of curves. Each value of the constant gives one curve in the family.

e.g. The general solution of dydx=2x\dfrac{dy}{dx}=2x is y=x2+Cy=x^2+C.

What is a particular solution?

A particular solution has a specific value of the constant, found by substituting an initial condition into the general solution.

e.g. For y=x2+Cy=x^2+C with y(0)=4y(0)=4, substituting gives C=4C=4, so y=x2+4y=x^2+4.

What does separating the variables mean?

It means rearranging by multiplying and dividing so that every yy term and dydy is on one side, and every xx term and dxdx is on the other.

e.g. dydx=x2y\dfrac{dy}{dx}=\dfrac{x^2}{y} becomes ydy=x2dxy\,dy=x^2\,dx.

How do you write "proportional to" as a differential equation?

If the rate of change of a quantity GG is proportional to GG, then dGdt=kG\dfrac{dG}{dt}=kG, where kk is a constant. The sign of kk shows whether the quantity grows or decays.

e.g. If the growth of algae GG is proportional to GG, then dGdt=kG\dfrac{dG}{dt}=kG with k>0k>0.

Worked example, step by step

The question Calculator needed [6 marks]

The mass MM mg of a drug in a patient's bloodstream, tt hours after an injection, decreases at a rate proportional to MM, so that dMdt=−kM,k>0.\dfrac{dM}{dt}=-kM,\qquad k>0. The mass is 80 mg at t=0t=0 and 50 mg at t=3t=3.

(a) Solve the differential equation to show that M=80e−ktM=80e^{-kt}.

(b) Find the value of kk.

(c) Find the time, in hours, taken for the mass to fall to 20 mg.

Worked solution: worked example

Answer: (a) M=80e−ktM=80e^{-kt} (b) k=0.157k=0.157 (c) 8.858.85 hours

Step 1 - Separate the variables and integrate.

Move every MM term to one side and every tt term to the other: ∫1MdM=∫−kdt⇒ln⁡M=−kt+c.\int\dfrac{1}{M}\,dM=\int -k\,dt\quad\Rightarrow\quad \ln M=-kt+c. The mass is positive, so no modulus is needed. M1 - Separate the variables and integrate both sides to ln⁡M=−kt+c\ln M=-kt+c

Why? The equation has the form "MM terms times dMdM equals tt terms times dtdt", so it is separable. The constant of integration is written in straight away.

Step 2 - Use the starting value.

At t=0t=0, M=80M=80, so c=ln⁡80c=\ln80 and ln⁡M=−kt+ln⁡80\ln M=-kt+\ln80. Then M=e−kt+ln⁡80=80e−kt.M=e^{-kt+\ln80}=80e^{-kt}. A1 - Use M=80M=80 at t=0t=0 to reach M=80e−ktM=80e^{-kt}

Why? The starting value turns the general solution into the particular solution, and this is the form the question asked for.

Step 3 - Find kk.

Substitute t=3t=3 and M=50M=50: 50=80e−3k50=80e^{-3k}, so e−3k=0.625e^{-3k}=0.625 and k=−ln⁡0.6253=0.157.k=-\dfrac{\ln0.625}{3}=0.157. On the calculator, enter −ln⁡(0.625)÷3-\ln(0.625)\div3 on the home screen and store the unrounded result. M1 - Substitute t=3t=3 and M=50M=50 and solve for kk A1 - k=0.157k=0.157

Why? Taking natural logarithms undoes the exponential. Keep the unrounded value of kk for the next part, so that rounding does not build up.

Step 4 - Find the time to reach 20 mg.

Set 80e−kt=2080e^{-kt}=20, so e−kt=0.25e^{-kt}=0.25 and t=ln⁡4k=8.85 hours.t=\dfrac{\ln4}{k}=8.85\text{ hours}. Alternatively, graph y=80e−kxy=80e^{-kx} and y=20y=20 and read the intersection. M1 - Set 80e−kt=2080e^{-kt}=20 with their kk A1 - 8.858.85 hours

Why? Using the stored value of kk gives 8.858.85. The rounded value 0.1570.157 would give 8.838.83, which is why the unrounded value is kept.

Step 5 - Check.

At t=8.85t=8.85, 80e−0.15667×8.85=80×0.25=2080e^{-0.15667\times8.85}=80\times0.25=20 mg, and at t=3t=3 the mass is 80e−0.47=5080e^{-0.47}=50 mg.

Why? Both given values are reproduced, and the mass falls over time, as a model with k>0k>0 should.

Marks (6):
M1 Separate the variables and integrate both sides to ln⁡M=−kt+c\ln M=-kt+c
A1 Use M=80M=80 at t=0t=0 to reach M=80e−ktM=80e^{-kt}
M1 Substitute t=3t=3 and M=50M=50 and solve for kk
A1 k=0.157k=0.157
M1 Set 80e−kt=2080e^{-kt}=20 with their kk
A1 8.858.85 hours

Now you try: enter your answers to be marked

These are real practice questions. Type your answer in each box and press Mark it. The worked solution and mark scheme appear straight away, and your first attempt is the one that counts. Use the keyboard for powers, roots and trig, and the working box for your notes.

1
Medium
Calculator
[4 marks]
Solve dydx=3x22y\dfrac{dy}{dx}=\dfrac{3x^2}{2y}, giving y2y^2 in terms of xx, with y(1)=2.y(1)=2.
[4]
Fractions & powers
Other

Worked solution: practice question 1

2
Hard
Calculator
[5 marks]
Solve dydx=ysin⁡x\dfrac{dy}{dx}=y\sin x, given y=3y=3 when x=0.x=0.
[5]
Fractions & powers
Trig
Logs
Other

Worked solution: practice question 2

3
Medium
Calculator
[5 marks]
Solve dydx=2xy\dfrac{dy}{dx}=\dfrac{2x}{y}, given y=5y=5 when x=0x=0.
[5]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 14 marks

Common mistakes

  • Dropping the constant of integration. Every separable equation needs a +c+c written in as soon as you integrate - without it there's nothing for the initial condition to solve for, and you can't reach a particular solution.
  • Forgetting the modulus in ln⁡|y|\ln|y|. When 1y\tfrac{1}{y} is integrated the result is ln⁡|y|\ln|y|, not ln⁡y\ln y. Dropping the absolute value can quietly produce a solution that's undefined for the values you actually need.
  • Splitting the exponential wrongly. From ln⁡y=kx+c\ln y=kx+c, the next line is y=ekx+c=ecekx=Aekxy=e^{kx+c}=e^{c}e^{kx}=Ae^{kx}, not ekx+ece^{kx}+e^{c}. Substituting the starting value straight after integrating, as in the worked example, finds cc before this step and avoids the slip.

Try some questions on separable differential equations

Section 2 of 4 AHL5.16

Euler's method

Euler's method approximates the solution of dydx=f(x,y)\dfrac{dy}{dx}=f(x,y) by stepping along the tangent line at each point. From a known starting point, increase xx by the step size hh, add hh times the current gradient to yy, and repeat. It covers the update formulas, coupled systems and how the step size affects accuracy.

The update-step formula

Spreadsheets or lists should be used to generate approximate solutions; in exams, values are generated using permitted technology.

Euler update step

yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n)

This is in the formula booklet. hh is the step size and f(xn,yn)f(x_n,y_n) is the gradient at the current point, the one you are stepping from, not the point you are stepping to.

Comparing to an exact solution

% error=|exact−estimate|exact×100\%\text{ error}=\dfrac{|\text{exact}-\text{estimate}|}{\text{exact}}\times100

This formula is in the formula booklet. It is useful when a question asks how good an Euler estimate is, with the exact solution as the true value.

Key terms

What is the step size?

The step size hh is the fixed amount by which xx increases at each step. A smaller hh needs more steps to cover the same interval.

e.g. Going from x=0x=0 to x=1x=1 with h=0.25h=0.25 takes 44 steps.

What is the starting point in Euler's method?

The starting point (x0,y0)(x_0,y_0) comes from the initial condition given in the question. Every later value is built from it.

e.g. The condition y(0)=1y(0)=1 gives x0=0x_0=0 and y0=1y_0=1.

How do you update x at each step?

Add the step size to the previous value: xn+1=xn+hx_{n+1}=x_n+h. This is done alongside the update of yy, and the new xx is used in the next gradient.

e.g. With x0=1x_0=1 and h=0.2h=0.2, the values are x1=1.2x_1=1.2 and x2=1.4x_2=1.4.

How is Euler's method used for a coupled system?

Each variable is updated using its own rate of change, and every rate is calculated from the old values. Time also increases by hh at each step.

e.g. For dxdt=y\dfrac{dx}{dt}=y and dydt=−x\dfrac{dy}{dt}=-x with x0=1x_0=1, y0=0y_0=0, h=0.1h=0.1: x1=1+0.1×0=1x_1=1+0.1\times0=1 and y1=0+0.1×(−1)=−0.1y_1=0+0.1\times(-1)=-0.1.

Worked example, step by step

The question Calculator needed [6 marks]

The populations of rabbits and foxes in a woodland are modelled by dRdt=0.5R−0.2RF,dFdt=0.15RF−0.4F,\dfrac{dR}{dt}=0.5R-0.2RF,\qquad \dfrac{dF}{dt}=0.15RF-0.4F, where RR and FF are the numbers of rabbits and foxes in hundreds and tt is the time in years. At t=0t=0, R=4R=4 and F=2F=2.

Use Euler's method with step size h=0.5h=0.5 to estimate RR and FF when t=1t=1.

Worked solution: worked example

Answer: R≈4.33R\approx4.33 and F≈2.45F\approx2.45

Step 1 - Write the update steps.

For a coupled system both variables are updated from the old values, and tt goes up by hh: Rn+1=Rn+hf1,Fn+1=Fn+hf2,tn+1=tn+h.R_{n+1}=R_n+h\,f_1,\quad F_{n+1}=F_n+h\,f_2,\quad t_{n+1}=t_n+h. Here f1=0.5R−0.2RFf_1=0.5R-0.2RF and f2=0.15RF−0.4Ff_2=0.15RF-0.4F.

Why? The booklet gives these steps. Going from t=0t=0 to t=1t=1 with h=0.5h=0.5 takes 10.5=2\dfrac{1}{0.5}=2 steps.

Step 2 - First step, from t=0t=0 to t=0.5t=0.5.

With R0=4R_0=4 and F0=2F_0=2: f1=0.5(4)−0.2(4)(2)=0.4,f2=0.15(4)(2)−0.4(2)=0.4.f_1=0.5(4)-0.2(4)(2)=0.4,\qquad f_2=0.15(4)(2)-0.4(2)=0.4. So R1=4+0.5(0.4)=4.2,F1=2+0.5(0.4)=2.2.R_1=4+0.5(0.4)=4.2,\qquad F_1=2+0.5(0.4)=2.2. M1 - Substitute R0=4R_0=4 and F0=2F_0=2 into both Euler updates A1 - R1=4.2R_1=4.2 A1 - F1=2.2F_1=2.2

Why? Both gradients use R0R_0 and F0F_0. Neither new value is used until the step is complete.

Step 3 - Second step, from t=0.5t=0.5 to t=1t=1.

With R1=4.2R_1=4.2 and F1=2.2F_1=2.2: f1=0.5(4.2)−0.2(4.2)(2.2)=0.252,f2=0.15(4.2)(2.2)−0.4(2.2)=0.506.f_1=0.5(4.2)-0.2(4.2)(2.2)=0.252,\qquad f_2=0.15(4.2)(2.2)-0.4(2.2)=0.506. So R2=4.2+0.5(0.252)=4.326,F2=2.2+0.5(0.506)=2.453.R_2=4.2+0.5(0.252)=4.326,\qquad F_2=2.2+0.5(0.506)=2.453. On the calculator, enter each right-hand side on the home screen using the stored values, or fill a list or spreadsheet row by row. M1 - Use R1R_1 and F1F_1 in both updates for the second step A1 - R≈4.33R\approx4.33 A1 - F≈2.45F\approx2.45

Why? The second step starts from the values just found. Using R0R_0 and F0F_0 again is the commonest mistake in a coupled system.

Step 4 - State the estimates.

At t=1t=1, R≈4.33R\approx4.33 (about 433 rabbits) and F≈2.45F\approx2.45 (about 245 foxes). Both populations are rising, which agrees with both gradients being positive at the start.

Why? Euler's method is an approximation, because each gradient is treated as constant across a whole step. A smaller step size would give a closer estimate.

Marks (6):
M1 Substitute R0=4R_0=4 and F0=2F_0=2 into both Euler updates
A1 R1=4.2R_1=4.2
A1 F1=2.2F_1=2.2
M1 Use R1R_1 and F1F_1 in both updates for the second step
A1 R≈4.33R\approx4.33
A1 F≈2.45F\approx2.45

Now you try: enter your answers to be marked

1
Easy
Calculator
[2 marks]
Euler's method is used to approximate the solution of dydx=x+y\dfrac{dy}{dx} = x + y with step size h=0.1h = 0.1, starting at (0,1)(0, 1).

Find the approximate value of yy after one step.
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
Calculator
[4 marks]
Use Euler's method with step h=0.25h = 0.25 to estimate y(0.5)y(0.5) given dydx=2x−y\dfrac{dy}{dx} = 2x - y, y(0)=1.y(0) = 1.
[4]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[3 marks]
Use Euler's method with step h=0.5h=0.5 to estimate y(1)y(1) given dydx=x+y\tfrac{dy}{dx} = x + y, y(0)=1y(0)=1.
[3]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 9 marks

Common mistakes

  • Using the updated yy-value too early. Each step evaluates f(xn,yn)f(x_n,y_n) using the value from the previous step, not a value you've already updated within the same step.
  • Losing track of xnx_n as well as yny_n. xx increases by hh at every step too - forgetting to update it means you evaluate the gradient at the wrong point on the second and later iterations.
  • Rounding intermediate values too early. Carry full precision through each step and only round the final answer - rounding y1y_1 before computing y2y_2 compounds the error over multiple steps.

Try some questions on Euler's method

Section 3 of 4 AHL5.15

Slope fields

A slope field is a diagram of short line segments, each showing the gradient dydx=f(x,y)\dfrac{dy}{dx}=f(x,y) at one point of a grid. Substitute the coordinates of a point into f(x,y)f(x,y) to get the gradient there, then follow the segments to see where a solution goes. It covers reading and interpreting slope fields.

Reading a slope field

Students will be required to use and interpret slope fields. There's no booklet formula to learn here - the skill is substitution and reading a diagram.

Gradient at a point

dydx=f(x,y)\dfrac{dy}{dx} = f(x,y)

Substitute the coordinates of any point into f(x,y)f(x,y) - the result is the gradient of the tangent segment drawn there, whether or not you can solve the equation itself.

Following a solution curve

Start at the given initial point and move along the segments, so that the path stays tangent to the local segments at every point it passes through.

The path flows with the direction of the segments and never cuts across one at an angle.

Key terms

What is a solution curve?

A solution curve is a curve that touches the segments of the slope field along its whole length. Different starting points give different solution curves.

e.g. For dydx=2x\dfrac{dy}{dx}=2x, both y=x2y=x^2 and y=x2+3y=x^2+3 follow the same slope field.

What does a horizontal segment mean?

A horizontal segment means the gradient is zero, so f(x,y)=0f(x,y)=0 at that point. Solving f(x,y)=0f(x,y)=0 locates all such points.

e.g. For dydx=x−2y\dfrac{dy}{dx}=x-2y, the segments are horizontal where y=12xy=\tfrac12x, such as at (4,2)(4,2).

What is an equilibrium solution?

An equilibrium solution is a constant solution y=ky=k for which dydx=0\dfrac{dy}{dx}=0 at every xx. In the slope field it is a horizontal line of horizontal segments.

e.g. For dydx=y(y−3)\dfrac{dy}{dx}=y(y-3), the equilibrium solutions are y=0y=0 and y=3y=3.

How do you draw a slope field?

Choose a grid of points, substitute each into f(x,y)f(x,y), and draw a short segment with that gradient. Large positive values give steep upward segments, and negative values slope downwards.

e.g. For dydx=x+2y\dfrac{dy}{dx}=x+2y, the gradient is 55 at (1,2)(1,2), 00 at (−2,1)(-2,1) and −4-4 at (0,−2)(0,-2).

Worked example, step by step

The question Calculator needed [6 marks]

The population PP thousand of a species in a reserve, tt years after monitoring begins, satisfies dPdt=0.1P(6−P),P≥0.\dfrac{dP}{dt}=0.1P(6-P),\qquad P\ge0. A slope field for this equation has a short segment at each grid point (t,P)(t,P), with gradient 0.1P(6−P)0.1P(6-P).

(a) Find the gradient of the segment at the point where t=2t=2 and P=4.5P=4.5.

(b) Find the values of PP for which every segment is horizontal.

(c) At t=0t=0, P=2P=2. Describe how PP changes as tt increases, giving a reason.

Worked solution: worked example

Answer: (a) 0.6750.675 (b) P=0P=0 and P=6P=6 (c) PP increases towards 66 thousand

Step 1 - Find the gradient at the point.

The gradient depends only on PP, so substitute P=4.5P=4.5: 0.1(4.5)(6−4.5)=0.1(4.5)(1.5)=0.675.0.1(4.5)(6-4.5)=0.1(4.5)(1.5)=0.675. The value of tt is not needed. M1 - Substitute P=4.5P=4.5 into 0.1P(6−P)0.1P(6-P) A1 - 0.6750.675

Why? The segment at a point has the gradient f(x,y)f(x,y) of the equation at that point. Every segment on the same horizontal line of the grid is parallel, because tt does not appear.

Step 2 - Find where the segments are horizontal.

A horizontal segment has gradient zero, so solve 0.1P(6−P)=00.1P(6-P)=0, which gives P=0orP=6.P=0\quad\text{or}\quad P=6. The calculator's equation solver gives the same two values. M1 - Set the gradient equal to zero A1 - P=0P=0 and P=6P=6

Why? The product is zero when a factor is zero. These two values of PP are the constant solutions, where the population does not change.

Step 3 - Decide the direction of change.

For 0<P<60<P<6, both PP and 6−P6-P are positive, so the gradient is positive. At P=2P=2 the gradient is 0.1(2)(4)=0.80.1(2)(4)=0.8, so PP is increasing. R1 - The gradient is positive for 0<P<60<P<6, so PP increases

Why? The sign of the gradient on the row of the grid where the solution starts shows whether the solution rises or falls.

Step 4 - Describe the long-term behaviour.

The segments are horizontal at P=6P=6, so the solution cannot cross that row. It rises, with a gradient that shrinks as PP approaches 6, and so PP increases towards 6 thousand without exceeding it. A1 - PP increases towards 66 thousand and does not exceed it

Why? Solutions follow the segments, and a solution cannot cut across a row of horizontal segments. The population levels off at the constant solution above its starting value.

Marks (6):
M1 Substitute P=4.5P=4.5 into 0.1P(6−P)0.1P(6-P)
A1 0.6750.675
M1 Set the gradient equal to zero
A1 P=0P=0 and P=6P=6
R1 The gradient is positive for 0<P<60<P<6, so PP increases
A1 PP increases towards 66 thousand and does not exceed it

Now you try: enter your answers to be marked

1
Easy
No calc
[2 marks]
The slope field for dydx=x−y\dfrac{dy}{dx} = x - y is shown.
dydx = x - y-3-2-1123-3-2-11230(2, -1)xy

Find the value of dydx\dfrac{dy}{dx} at the point (2,−1)(2, -1).
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[3 marks]
The slope field for dydx=x2−y\dfrac{dy}{dx} = x^2 - y is shown.
dydx = x^2 - y-3-2-1123-3-2-11230(-1, 2)xy
(a) Find the value of dydx\dfrac{dy}{dx} at the point (−1,2)(-1, 2).
[2]
(b) State whether yy is increasing or decreasing at this point.
[1]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[4 marks]
A differential equation satisfies dydx=y−x2,\dfrac{dy}{dx} = y-x^2, with y=3y=3 when x=1.x=1.

Use Euler's method with step size h=0.1h=0.1.
(a) Find the approximate value of yy at x=1.1.x=1.1.
[2]
(b) Find the approximate value of yy at x=1.2,x=1.2, to 3 decimal places.
[2]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 9 marks

Common mistakes

  • Substituting xx and yy the wrong way round. A point is written (x,y)(x,y) - swapping the coordinates before substituting into f(x,y)f(x,y) gives a gradient for the wrong point entirely.
  • Treating the slope field as the solution curve itself. The diagram only shows local gradients; the actual solution through a given point is the path you get by following those segments, and different starting points give different paths.
  • Ignoring the sign of the gradient. A positive gradient segment slopes up to the right and a negative one slopes down to the right, so the sign tells you whether yy is increasing or decreasing at that point, not just how steep the segment is.

Try some questions on slope fields

Section 4 of 4 AHL5.17

Phase portraits and coupled differential equations

A phase portrait is a diagram in the xyxy-plane showing the paths followed by a coupled linear system dxdt=ax+by\dfrac{dx}{dt}=ax+by, dydt=cx+dy\dfrac{dy}{dt}=cx+dy as time passes. The eigenvalues of the coefficient matrix decide whether paths move towards the origin, away from it, or loop around it. It covers classifying the equilibrium and describing the paths that solutions follow.

Reading stability from eigenvalues

These rules are not booklet entries: you apply them after finding the eigenvalues of the coefficient matrix. For real distinct eigenvalues the booklet does give the exact solution, in the formulas at the top of the page.

The system

dxdt=ax+by,dydt=cx+dy\dfrac{dx}{dt}=ax+by,\quad\dfrac{dy}{dt}=cx+dy

Write the coefficients as a matrix and find its eigenvalues - they alone determine the shape and stability of the origin's equilibrium.

Stability rules

Positive, or complex with positive real part: all solutions move away from the origin. Negative, or complex with negative real part: all solutions move towards the origin. Complex: the solutions form a spiral. Imaginary: the solutions form a circle or ellipse, and the origin is then called a centre. Real with different signs (one positive, one negative): the origin is a saddle point.

Only the sign of a real eigenvalue, or of the real part of a complex one, decides whether solutions move towards the origin or away from it. The systems in the syllabus have distinct, non-zero eigenvalues.

Key terms

What is a phase portrait?

A phase portrait draws trajectories, the paths traced by the point (x,y)(x,y) as tt increases. Arrows show the direction of motion along each path.

e.g. The solution x=e−tx=e^{-t}, y=2e−ty=2e^{-t} traces a straight path towards the origin.

What is an equilibrium point?

An equilibrium point is a point where both rates of change are zero, so the system stays there. For a linear system of this form, the origin is an equilibrium point.

e.g. For dxdt=3x\dfrac{dx}{dt}=3x and dydt=−y\dfrac{dy}{dt}=-y, the origin (0,0)(0,0) is an equilibrium because both rates are 00 there.

What does stable mean?

An equilibrium is stable if trajectories move towards it as tt increases, and unstable if they move away from it. The signs of the eigenvalues, or of their real parts, decide which.

e.g. Eigenvalues −1-1 and −3-3 are both negative, so trajectories approach the origin and it is stable.

What is a saddle point?

A saddle point occurs when the eigenvalues are real with opposite signs. Trajectories approach along one direction and leave along another, so a saddle point is unstable.

e.g. Eigenvalues 55 and −1-1 give a saddle point at the origin.

Worked example, step by step

The question Calculator needed [6 marks]

Two quantities xx and yy, measured as differences from an equilibrium level, change with time tt according to dxdt=x+3y,dydt=2x.\dfrac{dx}{dt}=x+3y,\qquad \dfrac{dy}{dt}=2x.
(a) Write the system in the form x˙=Ax\dot{\mathbf{x}}=A\mathbf{x} and find the eigenvalues of AA.

(b) Classify the equilibrium at the origin and state whether it is stable.

(c) The system has two straight-line trajectories through the origin. Find the gradient of the one along which solutions move away from the origin.

Worked solution: worked example

Answer: (a) λ=3\lambda=3 and λ=−2\lambda=-2 (b) saddle point, unstable (c) gradient 23\dfrac{2}{3}

Step 1 - Write the matrix.

The coefficients give A=(1320).A=\begin{pmatrix}1 & 3 \\ 2 & 0\end{pmatrix}. The rows come from the equations for dxdt\dfrac{dx}{dt} and dydt\dfrac{dy}{dt}, and the columns from xx and yy.

Why? The eigenvalues of this matrix decide the behaviour of the origin. Entering the matrix on the calculator is the first step.

Step 2 - Find the eigenvalues.

Use the calculator's eigenvalue function on AA, or solve λ2−λ−6=0\lambda^2-\lambda-6=0. The eigenvalues are λ=3andλ=−2.\lambda=3\quad\text{and}\quad\lambda=-2. M1 - Use the matrix (1320)\begin{pmatrix}1 & 3 \\ 2 & 0\end{pmatrix} to find the eigenvalues A1 - λ=3\lambda=3 and λ=−2\lambda=-2

Why? The trace is 11 and the determinant is −6-6, so the equation is λ2−λ−6=0\lambda^2-\lambda-6=0, which gives the same two values and so checks the calculator.

Step 3 - Classify the equilibrium.

The eigenvalues are real with different signs, one positive and one negative, so the origin is a saddle point. It is unstable, because the solutions along the direction of the positive eigenvalue move away from the origin. R1 - The eigenvalues are real and of opposite signs A1 - Saddle point, unstable

Why? Real eigenvalues of opposite signs give a saddle point. A saddle point is always unstable, because one eigenvalue is positive.

Step 4 - Find the direction for λ=3\lambda=3.

Solve (A−3I)p=0(A-3I)\mathbf{p}=\mathbf{0}, or read the eigenvector from the calculator. The first row gives −2p1+3p2=0-2p_1+3p_2=0, so an eigenvector is p=(32)\mathbf{p}=\begin{pmatrix}3 \\ 2\end{pmatrix}. The gradient of the line is 23.\dfrac{2}{3}. M1 - Find the eigenvector for λ=3\lambda=3 A1 - Gradient 23\dfrac{2}{3}

Why? Along the eigenvector for λ=3\lambda=3 the solutions grow like e3te^{3t}, so this is the line the solutions leave along. The second row, 2p1−3p2=02p_1-3p_2=0, gives the same direction, which checks the calculation.

Marks (6):
M1 Use the matrix (1320)\begin{pmatrix}1 & 3 \\ 2 & 0\end{pmatrix} to find the eigenvalues
A1 λ=3\lambda=3 and λ=−2\lambda=-2
R1 The eigenvalues are real and of opposite signs
A1 Saddle point, unstable
M1 Find the eigenvector for λ=3\lambda=3
A1 Gradient 23\dfrac{2}{3}

Now you try: enter your answers to be marked

1
Easy
No calc
[2 marks]
State the condition on the real parts of the eigenvalues of AA for the origin to be:
(a) an equilibrium that solutions move towards;
[1]
(b) an unstable equilibrium.
[1]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[2 marks]
A system has eigenvalues ±2i.\pm 2i.
(a) State the type of the equilibrium.
[1]
(b) Describe the phase-portrait trajectories.
[1]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[4 marks]
A system x˙=Ax\dot{\mathbf{x}} = A\mathbf{x} has A=(1−221).A = \begin{pmatrix}1 & -2 \\ 2 & 1\end{pmatrix}.
(a) Find the eigenvalues of A.A.
[2]
(b) Classify the equilibrium and state its stability.
[2]
Fractions & powers
Other

Worked solution: practice question 3

Your score so far: 0 out of 8 marks

Common mistakes

  • Judging stability from the eigenvalues themselves, not their sign. A larger-magnitude eigenvalue doesn't mean "more unstable" - only the sign (or, for complex pairs, the sign of the real part) decides stable versus unstable.
  • Forgetting the imaginary case. Imaginary eigenvalues give a circle or ellipse round a centre at the origin: solutions neither approach the origin nor leave it. Don't lump this in with the spiral case, where the real part is not zero.
  • Mixing up the directions at a saddle point. Solutions move towards the origin along the eigenvector for the negative eigenvalue and away from it along the eigenvector for the positive one. Swapping them reverses the whole picture.

Try some questions on phase portraits and coupled differential equations

Using your GDC

The exact key presses for the TI-84 Plus CE, Casio fx-CG50, Casio fx-CG100 and TI-Nspire CX, with what the screen shows. Pick your calculator.

Enter a calculation on the home screen

Used in: Euler's method

How to enter a calculation on a TI-84 Plus CE

Type a calculation and press enter

Go to the home screen: press 2nd mode (QUIT) from any menu or app. Press clear if the entry line is not empty.

Type the calculation as you would write it, then press enter. For 3(2.4)2−5×1.83(2.4)^2 - 5 \times 1.8 press 3 ( 2 . 4 ) x² − 5 × 1 . 8 enter.

The calculator understands a number next to a bracket as a multiplication, so × is not needed in 3(2.4)3(2.4). If a fraction, square root or power template is on the screen, press ▶ to move out of it before you carry on typing.

8.288.28

3(2.4)²-5*1.8
8.28
Use the last answer in the next calculation

To increase the answer by 15%, press × 1 . 1 5 enter on a blank line. The calculator puts Ans, the last answer, in front of the operator for you.

You can also type Ans yourself, anywhere in a calculation: press 2nd (−) (ANS), for example 2nd (−) (ANS) × 1 . 1 5 enter.

9.5229.522, which is 9.529.52 to 3 significant figures.

Ans*1.15
9.522

To use an earlier entry or answer, press ▲ to move up through the history, then enter to paste the highlighted one on the entry line. Press 2nd enter (ENTRY) to bring back your last entry and change it.

Ans always holds the last answer that was worked out, so if you do a different calculation in between, Ans changes. Type a number you need later, or keep it on the screen, rather than relying on Ans for many steps.

The full guide: Enter a calculation on the home screen

Step a recurrence forward (loans, Markov, growth)

Used in: Euler's method

How to step a recurrence forward on a TI-84 Plus CE

Start value, then a rule in Ans

On the home screen type the first term and press enter. Here, 1 0 0 0 enter. The first term is now the last answer.

1000

Type the rule using Ans for the previous term. Press 2nd (−) (ANS), then × 1 . 0 5 − 1 0 0, and press enter. This is the second term.

u2=950u_2 = 950.

1000
Ans*1.05-100
950

For each further term press 2nd enter (ENTRY) to bring the rule back, then enter. Each time the rule uses the answer just given. Repeat until you have reached the term you need, counting as you go.

u3=897.5u_3 = 897.5, u4=842.375u_4 = 842.375 and u5=784.49375u_5 = 784.49375.

Ans*1.05-100
897.5
Ans*1.05-100
842.375
Ans*1.05-100
784.49375
Keep the full value

Every answer stays at full accuracy inside Ans, even though the screen shows ten digits. Round only the last term you are asked for. To keep a value for later, store it as in store a value and reuse it.

Count the terms. The start value is the first term, so the first time you press enter on the rule gives the second term.

The full guide: Step a recurrence forward (loans, Markov, growth)

Eigenvalues and eigenvectors

Used in: Phase portraits and coupled differential equations

How to find eigenvalues and eigenvectors on a TI-84 Plus CE

No eigenvalue command: characteristic equation and rref

Press 2nd x⁻¹ (MATRIX), press ▶ to the EDIT menu and choose 1:[A]. Enter the size, 2 enter 2 enter, then the entries row by row, pressing enter after each: 6, 2, 1, 5. Press 2nd mode (QUIT) to leave the editor.

MATRIX[A] 2 ×2
[ 6 2 ]
[ 1 5 ]

The manual lists no eigenvalue or eigenvector command for this calculator, so the eigenvalues come from the characteristic equation. For a 2×22\times2 matrix it is λ2−(trace)λ+det=0\lambda^2 - (\text{trace})\lambda + \det = 0. Here the trace is 6+5=116+5 = 11 and the determinant is 6×5−2×1=286\times5 - 2\times1 = 28, so it is λ2−11λ+28=0\lambda^2 - 11\lambda + 28 = 0.

Press apps and choose PlySmlt2, press any key, then choose 1:Polynomial Root Finder. Set ORDER to 2, press graph under NEXT, and enter the coefficients 1 enter, (−) 1 1 enter, 2 8 enter. Press graph under SOLVE.

The eigenvalues are λ=4\lambda = 4 and λ=7\lambda = 7.

X1=4
X2=7

For an eigenvector, row-reduce M−λIM - \lambda I. Quit the app, then on the home screen press 2nd x⁻¹ (MATRIX), ▶ to MATH, and choose B:rref(. Type [A] from 2nd x⁻¹ (MATRIX) 1:[A], then − 7 ×, and choose 5:identity( from the same MATH menu, followed by 2 ) ) and enter. This is rref([A]-7*identity(2)) for λ=7\lambda = 7.

Each row of the result is an equation in xx and yy. (1−200)\begin{pmatrix}1 & -2\\0 & 0\end{pmatrix} means x−2y=0x - 2y = 0, so x=2yx = 2y and an eigenvector for λ=7\lambda = 7 is (21)\begin{pmatrix}2\\1\end{pmatrix}. Repeat with 44 in place of 77: the result (1100)\begin{pmatrix}1 & 1\\0 & 0\end{pmatrix} means x+y=0x + y = 0, so an eigenvector is (1−1)\begin{pmatrix}1\\-1\end{pmatrix}.

rref([A]-7*identity(2))
[[1 -2]
[0 0]]

Any non-zero multiple of an eigenvector is also an eigenvector, so (2, 1) and (4, 2) are equally correct. The identity size must match the matrix: identity(2) for a 2 by 2.

The full guide: Eigenvalues and eigenvectors

Solve an equation numerically (including multiple solutions)

Used in: Separable differential equations, Slope fields

How to solve an equation numerically on a TI-84 Plus CE

Numeric Solver (one solution per starting value)

Press math, then ▲ to jump to the bottom of the menu, and choose C:Numeric Solver.

Enter the equation as E1 = E2. Type X,T,θ,n ^ 3 − 3 X,T,θ,n for E1 and 1 for E2, then choose OK. The equation does not need rearranging to equal zero.

E1=X^3-3X
E2=1

Put the cursor on X and type a number close to the solution you want, for example 2. Leave the bounds as they are ({-1E99,1E99}) unless you want to search only a smaller interval.

X=2
bound={-1E99,1E99}

Press alpha enter (SOLVE). The solution is marked with a small square, and E1-E2 shows how far the two sides are apart: it should be 0 or a very small number.

x=1.879x = 1.879 to 3 decimal places, which is 1.881.88 to 3 significant figures.

X=1.879385
E1-E2=0

The solver finds the solution nearest your starting value. For the others, start again with another value: (−) 1 finds x=−1.53x = -1.53 and 0 finds x=−0.347x = -0.347.

X=-1.532089
X=-0.347296
Another way: from the graph

Graph the left side as Y1 and the right side as Y2, then use 2nd trace 5:intersect at each crossing. The graph also shows how many solutions there are, which tells you how many starting values to try. The steps are in find where two graphs meet.

A starting value near the solution you want is what matters. If the solver gives a different solution from the one you expected, look at the graph and start closer.

The full guide: Solve an equation numerically (including multiple solutions)

See the full list of GDC guides for every calculator task.

Syllabus content covered

CodeSyllabus content
AHL5.14Setting up a model/differential equation from a context. Example: The growth of an algae GG, at time tt, is proportional to GG. Solving by separation of variables. Example: An exponential model as a solution of dydx=ky\dfrac{dy}{dx}=ky. The term general solution.
AHL5.15Slope fields and their diagrams. Students will be required to use and interpret slope fields.
AHL5.16Euler's method for finding the approximate solution to first order differential equations. Numerical solution of dydx=f(x,y)\dfrac{dy}{dx}=f(x,y). Numerical solution of the coupled system dxdt=f1(x,y,t)\dfrac{dx}{dt}=f_1(x,y,t) and dydt=f2(x,y,t)\dfrac{dy}{dt}=f_2(x,y,t). Spreadsheets should be used to find approximate solutions to differential equations. In examinations, values will be generated using permissible technology. Contexts could include predator-prey models.
AHL5.17Phase portrait for the solutions of coupled differential equations of the form dxdt=ax+by\dfrac{dx}{dt}=ax+by, dydt=cx+dy\dfrac{dy}{dt}=cx+dy. Qualitative analysis of future paths for distinct, real, complex and imaginary eigenvalues. Sketching trajectories and using phase portraits to identify key features such as equilibrium points, stable populations and saddle points. Calculation of exact solutions is only required for the case of real distinct eigenvalues. Systems will have distinct, non-zero, eigenvalues. If the eigenvalues are: positive or complex with positive real part, all solutions move away from the origin; negative or complex with negative real part, all solutions move towards the origin; complex, the solutions form a spiral; imaginary, the solutions form a circle or ellipse; real with different signs (one positive, one negative) the origin is a saddle point.

Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).

Quick questions

How do you solve a separable differential equation?

Rearrange the equation so every yy term (including dydy) is on one side and every xx term (including dxdx) is on the other, then integrate both sides separately and add a constant of integration.

What is the formula for Euler's method?

yn+1=yn+hf(xn,yn)y_{n+1} = y_n + h\,f(x_n, y_n), where hh is the step size and f(xn,yn)f(x_n, y_n) is the gradient at the current point.

What does a slope field show?

A slope field draws a short line segment at each grid point with gradient f(x,y)f(x,y), for a differential equation dydx=f(x,y)\dfrac{dy}{dx} = f(x,y). Following the segments from a starting point traces out an approximate solution curve without ever solving the equation algebraically.

How do eigenvalues determine the type of equilibrium?

Positive eigenvalues, or complex ones with positive real part, mean all solutions move away from the origin. Negative eigenvalues, or complex ones with negative real part, mean they move towards it. Complex eigenvalues give a spiral, imaginary eigenvalues give a circle or ellipse, and real eigenvalues of different signs give a saddle point.

How do you find the value of the constant C?

Substitute the given initial condition, such as y(0)=3y(0)=3, into the general solution, either straight after integrating or after rearranging, then solve the resulting equation for CC.

Does a smaller step size always give a better estimate?

Generally yes - a smaller hh reduces the truncation error at each step, giving a more accurate approximation, but it also means many more steps and more accumulated rounding error.

How do I find the gradient at a point on a slope field?

Substitute that point's xx and yy coordinates into f(x,y)f(x,y) from the differential equation dydx=f(x,y)\dfrac{dy}{dx} = f(x,y). The result is the gradient of the tangent segment drawn at that point.

What is the general form of the coupled system?

dxdt=ax+by\dfrac{dx}{dt} = ax + by and dydt=cx+dy\dfrac{dy}{dt} = cx + dy, where the coefficient matrix's eigenvalues determine the equilibrium type and stability at the origin.

Why do I divide by y before integrating?

Dividing moves every yy term to the side with dydy. For dydx=ky\dfrac{dy}{dx}=ky, dividing by yy gives 1ydy=kdx\dfrac{1}{y}\,dy=k\,dx, which can then be integrated to give ln⁡|y|=kx+c\ln|y|=kx+c.

How do I carry out two steps of Euler's method?

Find the gradient at the current point, update yy and xx, then repeat from the new point. For dydx=2x\dfrac{dy}{dx}=2x, y(0)=1y(0)=1, h=0.5h=0.5: the gradient at (0,1)(0,1) is 00, so y1=1y_1=1 at x1=0.5x_1=0.5. The gradient there is 11, so y2=1+0.5×1=1.5y_2=1+0.5\times1=1.5 at x2=1x_2=1.

Ready to practise properly?

Practice questions on every section, marked instantly like the real exam.