Differential equations AA HL
A first order differential equation gives the rate of change of a quantity in terms of the variables, and the aim is to find the quantity itself. This page shows how to solve a linear equation with an integrating factor, how to solve a separable equation by splitting the variables, and how to estimate a solution step by step with Euler's method. Start by deciding which type of equation you have, because that decides the method.
Formulas at a glance
The integrating factor and Euler's method are in the formula booklet. The standard form, the rule for separating variables and the step that follows the integrating factor are not, so learn them.
Standard form for an integrating factor
Not in the bookletIntegrating factor
In the bookletAfter multiplying by the integrating factor
Not in the bookletSeparating the variables
Not in the bookletIntegral of one over y
In the bookletEuler's method
In the bookletWhich method to use
Look at how appears in the equation. If the right-hand side factorises into a part in and a part in , separate. If and appear to the first power and are added, use an integrating factor. If the question asks for an estimate with a step length, use Euler's method.
| The question has | Use | Notes |
|---|---|---|
| A linear equation | An integrating factor | Use it when the equation cannot be separated, for example when and are added on one side |
| equal to a product of a function of and a function of | Separate the variables and integrate both sides | Add one constant only, after integrating |
| A coefficient in front of , such as | Divide through to make the coefficient before reading off | Divide every term, including the right-hand side |
| A rate of change proportional to the quantity, or to a product such as | Separate the variables | The logistic form needs partial fractions to integrate the side |
| An initial condition such as | Find the general solution first, then substitute to find the constant | The general solution keeps the constant; the particular solution uses the given pair of values |
| "Estimate", a step length and a starting point | Euler's method | Use a table with columns for , and the gradient |
Section 1 of 3 AHL5.18
Integrating factor
An integrating factor solves a first order linear differential equation by making the left-hand side the derivative of a single product. Multiply the whole equation by , integrate both sides, then divide to find . It covers writing the equation in the correct form, applying the method and using an initial condition.
The integrating factor method
The technique only applies once the equation is arranged into standard form - do that first, then apply the formula mechanically.
Standard form
Rearrange the equation so the coefficient of is exactly 1 before reading off .
Key terms
What form must the equation be in?
The equation must be written as , so that the coefficient of is one. If it is not, divide every term by that coefficient first.
e.g. is divided by to give , so and .
How do you calculate the integrating factor?
Integrate with respect to , then raise to that power. The constant of integration can be left out here.
e.g. For , , so .
Why does the left-hand side become one derivative?
By the product rule, . Since , this equals multiplied by , which is exactly the left-hand side after multiplying by .
e.g. With , .
How do you finish the solution?
Write the left-hand side as , integrate both sides with respect to and include . Then divide by to make the subject.
e.g. gives , so .
Worked example, step by step
The question No calculator needed [6 marks]
Solve the differential equation , given that when .
Worked solution: worked example
Answer:
Step 1 - Find the integrating factor.
The equation is already in the form with and . So A1 -
Why? The coefficient of is already , so can be read straight off. No constant is needed when integrating .
Step 2 - Multiply through and write the left side as one derivative.
M1 - Multiply by the integrating factor to obtain
Why? Multiplying every term by makes the left-hand side the derivative of , by the product rule. The right-hand side is .
Step 3 - Integrate the right-hand side.
Use integration by parts with and : M1 - Integrate by parts
Why? The right-hand side is a product, so this step needs integration by parts. The constant of integration is added in the next step.
Step 4 - Find the general solution.
A1 -
Why? Divide every term, including the constant, by . Dividing only the first terms is a common slip.
Step 5 - Use the initial condition.
When , : M1 - Substitute and to find
Why? Substitute into the general solution, where , and solve for .
Step 6 - State the particular solution.
A1 -
Why? A check: differentiating gives , and then , as required.
A1
M1 Multiply by the integrating factor to obtain
M1 Integrate by parts
A1
M1 Substitute and to find
A1
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.
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 12 marks
Common mistakes
- Forgetting to arrange the equation into standard form first. is only the coefficient of once the coefficient of has been made exactly 1 - dividing through before reading off is essential.
- Multiplying only the left-hand side by the integrating factor. Every term in the equation, including on the right, must be multiplied by - a solution that skips this ends up with the wrong right-hand side to integrate.
- Dropping the constant of integration when applying an initial condition. A "solve given " question needs the general solution with still present before you substitute the given point - skipping straight to a particular solution loses the method mark.
Section 2 of 3 AHL5.18
Separable differential equations
A first order differential equation is separable when it can be written as . Collect all the terms with on one side and all the terms with on the other, then integrate each side. It also covers general and particular solutions, and the logistic equation , where is split into partial fractions before it is integrated.
Separating the variables
This method has no formula booklet entry: it is a skill of rearranging and then integrating, so the working carries the marks.
General separable form
Recognise this shape whenever the right-hand side factorises into a piece depending only on and a piece depending only on .
Solving it
Divide both sides by first, then integrate independently - add a single constant of integration once, on either side.
Key terms
What does separating the variables mean?
It means rearranging so that every term is on one side with and every term is on the other with . Each side can then be integrated separately.
e.g. becomes .
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 a different curve.
e.g. has general solution .
What is a particular solution?
A particular solution is the single curve found by using a given pair of values to work out the constant. Substitute the values into the general solution and solve for the constant.
e.g. If when , then gives , so .
Why is there a modulus when integrating one over ?
The integral is , because the logarithm is only defined for positive values and may be negative. Writing the modulus keeps the working correct.
e.g. gives , so , where is a constant.
Worked example, step by step
The question No calculator needed [5 marks]
Solve the differential equation , given that when . Give in terms of .
Worked solution: worked example
Answer:
Step 1 - Separate the variables.
Divide by and multiply by : M1 - Separate the variables to obtain
Why? The right-hand side of is a function of times a function of , so all the terms can go with and all the terms with .
Step 2 - Integrate both sides.
M1 - Integrate both sides A1 -
Why? Integrate each side with respect to its own variable and add one constant only. The power rule gives on the left.
Step 3 - Use the initial condition.
When , : A1 -
Why? Substitute the given pair of values into the general solution to find the constant.
Step 4 - Make the subject.
A1 -
Why? Take the reciprocal of both sides and then change the signs. A check: when this gives .
M1 Separate the variables to obtain
M1 Integrate both sides
A1
A1
A1
Now you try: enter your answers to be marked
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 11 marks
Common mistakes
- Trying to separate an equation that isn't separable. can't be split into a pure- side and a pure- side - that shape needs the integrating factor instead, not this method.
- Forgetting the constant of integration, or adding one on each side. Only one arbitrary constant is needed once both sides have been integrated - writing on the left and on the right is unnecessary and can lead to confusion later.
- Losing the modulus sign when integrating . , not - dropping the absolute value can cause errors when exponentiating back to find .
Section 3 of 3 AHL5.18
Euler's method
Euler's method estimates the solution of by moving forward in equal steps of length , using . Start from the given initial point and repeat the step until you reach the required -value.
The step formula
The formula is in the booklet, but examiners expect you to apply it in an organised iteration table, not just quote it.
Euler's method
Step forward from a known starting point using the gradient at each step - smaller gives a more accurate estimate, at the cost of more steps.
✓ In the formula bookletx-step
The -value always increases by exactly each step - keep a running column for it alongside so nothing gets muddled.
Key terms
What is the step length?
The step length is the amount that increases by at every step. Each new -value is found using .
e.g. Starting at with , the -values are , , , .
What does the initial condition give you?
It gives the starting point for the iteration. Without it, the method has nothing to start from.
e.g. The condition means and .
What is the gradient used for in each step?
At each point, is the gradient of the solution curve. Euler's method follows a straight line with that gradient across the step, so changes by about the gradient multiplied by .
e.g. For at the gradient is , so with the new value is .
How does a step in the iteration work?
Evaluate the gradient using the current and , multiply by , and add to . Only then move on to the next -value.
e.g. For with and , .
Worked example, step by step
The question No calculator needed [4 marks]
Consider the differential equation , with when . Use Euler's method with step length to estimate the value of when .
Worked solution: worked example
Answer:
Step 1 - Set up the method.
Here , with , and . The formulae are M1 - Use with and
Why? The initial condition gives the starting point. To get from to with a step of takes two steps.
Step 2 - First step.
A1 -
Why? Use the gradient at the old point to move to the new value of .
Step 3 - Second step.
M1 - Apply the formula again at the point
Why? Now use the new point , not the starting point. Work out the gradient before updating .
Step 4 - State the estimate.
When , . A1 -
Why? Since is the required value, no more steps are needed.
M1 Use with and
A1
M1 Apply the formula again at the point
A1
Now you try: enter your answers to be marked
Use Euler's method with step length to estimate
Worked solution: practice question 1
Worked solution: practice question 2
Worked solution: practice question 3
Your score so far: 0 out of 15 marks
Common mistakes
- Using too large a step size without saying so. A bigger means fewer steps but a less accurate estimate - if the question asks for a specific use exactly that value, not a bigger one to save arithmetic.
- Substituting the new -value into before updating . Each step uses the gradient at the old point to find the new - working out at the wrong pair of coordinates throws off every step that follows.
- Rounding too early in a multi-step iteration. Carry full accuracy through each intermediate step and only round the final answer to the number of decimal places the question asks for - early rounding compounds into a noticeably wrong estimate by the last step.
Syllabus content covered
| Code | Syllabus content |
|---|---|
| AHL5.18 | First order differential equations. Numerical solution of using Euler's method. Variables separable, for example the logistic equation Solution of using an integrating factor. |
Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).
Quick questions
What is the integrating factor for a first order linear differential equation?
For an equation written as , the integrating factor is .
What makes a differential equation separable?
A first order equation is separable when it can be written as , so all the terms can be moved to one side and all the terms to the other before integrating.
What is Euler's method?
Euler's method is a numerical way to estimate the solution of : starting from a known point, it steps forward using , where is the chosen step length.
Why does multiplying by the integrating factor work?
Multiplying both sides by turns the left-hand side into the derivative of a single product, , which can then be integrated directly.
How do you solve a separable differential equation?
Rearrange into , integrate both sides separately, then add a single constant of integration and rearrange for if required.
Does a smaller step size in Euler's method make it more accurate?
Yes - a smaller produces an estimate closer to the true solution curve, but requires more steps to reach the same -value, so there is a trade-off between accuracy and workload.
Can I leave out the constant when finding the integrating factor?
Yes, take any antiderivative of , usually with the constant set to zero. A constant would only multiply by a fixed number, which cancels when you divide by at the end.
When should I add the constant of integration?
Add one constant straight after integrating, on one side only. Writing a constant on both sides is unnecessary, because two constants combine into a single one.
How many steps do I need to reach a given x-value?
Divide the distance you need to cover by the step length. Going from to with takes steps.
What is the integrating factor when P(x) is 1/x?
Since for , the integrating factor is .
Ready to practise properly?
Practice questions on every section, marked instantly like the real exam.