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

dydx+P(x)y=Q(x)\dfrac{dy}{dx}+P(x)\,y=Q(x)

Not in the booklet

Integrating factor

I=e∫P(x)dxI=e^{\int P(x)\,dx}

In the booklet

After multiplying by the integrating factor

ddx(Iy)=IQ(x)⇒Iy=∫IQ(x)dx\dfrac{d}{dx}(Iy)=IQ(x)\quad\Rightarrow\quad Iy=\displaystyle\int IQ(x)\,dx

Not in the booklet

Separating the variables

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

Not in the booklet

Integral of one over y

∫1ydy=ln⁡|y|+C\displaystyle\int\dfrac1y\,dy=\ln|y|+C

In the booklet

Euler's method

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

Which method to use

Look at how yy appears in the equation. If the right-hand side factorises into a part in xx and a part in yy, separate. If yy and y′y' 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 hasUseNotes
A linear equation y′+P(x)y=Q(x)y'+P(x)y=Q(x)An integrating factor I=e∫P(x)dxI=e^{\int P(x)\,dx}Use it when the equation cannot be separated, for example when yy and xx are added on one side
dydx\dfrac{dy}{dx} equal to a product of a function of xx and a function of yySeparate the variables and integrate both sidesAdd one constant only, after integrating
A coefficient in front of dydx\dfrac{dy}{dx}, such as xdydxx\dfrac{dy}{dx}Divide through to make the coefficient 11 before reading off P(x)P(x)Divide every term, including the right-hand side
A rate of change proportional to the quantity, or to a product such as n(a−n)n(a-n)Separate the variablesThe logistic form needs partial fractions to integrate the nn side
An initial condition such as y(0)=2y(0)=2Find the general solution first, then substitute to find the constantThe general solution keeps the constant; the particular solution uses the given pair of values
"Estimate", a step length hh and a starting pointEuler's method yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n)Use a table with columns for xnx_n, yny_n and the gradient

Section 1 of 3 AHL5.18

Integrating factor

An integrating factor solves a first order linear differential equation y′+P(x)y=Q(x)y'+P(x)y=Q(x) by making the left-hand side the derivative of a single product. Multiply the whole equation by I=e∫P(x)dxI=e^{\int P(x)\,dx}, integrate both sides, then divide to find yy. 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

y′+P(x)y=Q(x)y' + P(x)y = Q(x)

Rearrange the equation so the coefficient of y′y' is exactly 1 before reading off P(x)P(x).

Key terms

What form must the equation be in?

The equation must be written as y′+P(x)y=Q(x)y'+P(x)y=Q(x), so that the coefficient of y′y' is one. If it is not, divide every term by that coefficient first.

e.g. 2dydx+10y=42\dfrac{dy}{dx}+10y=4 is divided by 22 to give dydx+5y=2\dfrac{dy}{dx}+5y=2, so P=5P=5 and Q=2Q=2.

How do you calculate the integrating factor?

Integrate P(x)P(x) with respect to xx, then raise ee to that power. The constant of integration can be left out here.

e.g. For dydx+5y=10\dfrac{dy}{dx}+5y=10, ∫5dx=5x\int5\,dx=5x, so I=e5xI=e^{5x}.

Why does the left-hand side become one derivative?

By the product rule, ddx(Iy)=Iy′+I′y\dfrac{d}{dx}(Iy)=Iy'+I'y. Since I′=PII'=PI, this equals II multiplied by y′+Pyy'+Py, which is exactly the left-hand side after multiplying by II.

e.g. With I=e5xI=e^{5x}, ddx(e5xy)=e5xy′+5e5xy\dfrac{d}{dx}\left(e^{5x}y\right)=e^{5x}y'+5e^{5x}y.

How do you finish the solution?

Write the left-hand side as ddx(Iy)\dfrac{d}{dx}(Iy), integrate both sides with respect to xx and include +C+C. Then divide by II to make yy the subject.

e.g. ddx(e5xy)=10e5x\dfrac{d}{dx}\left(e^{5x}y\right)=10e^{5x} gives e5xy=2e5x+Ce^{5x}y=2e^{5x}+C, so y=2+Ce−5xy=2+Ce^{-5x}.

Worked example, step by step

The question No calculator needed [6 marks]

Solve the differential equation dydx+2y=x\dfrac{dy}{dx}+2y=x, given that y=1y=1 when x=0x=0.

Worked solution: worked example

Answer: y=12x−14+54e−2xy=\dfrac12x-\dfrac14+\dfrac54e^{-2x}

Step 1 - Find the integrating factor.

The equation is already in the form y′+P(x)y=Q(x)y'+P(x)y=Q(x) with P(x)=2P(x)=2 and Q(x)=xQ(x)=x. So I=e∫2dx=e2x.I=e^{\int2\,dx}=e^{2x}. A1 - I=e2xI=e^{2x}

Why? The coefficient of y′y' is already 11, so P(x)P(x) can be read straight off. No constant is needed when integrating P(x)P(x).

Step 2 - Multiply through and write the left side as one derivative.

ddx(ye2x)=xe2x.\dfrac{d}{dx}\left(ye^{2x}\right)=xe^{2x}. M1 - Multiply by the integrating factor to obtain ddx(ye2x)=xe2x\dfrac{d}{dx}(ye^{2x})=xe^{2x}

Why? Multiplying every term by II makes the left-hand side the derivative of IyIy, by the product rule. The right-hand side is IQ(x)IQ(x).

Step 3 - Integrate the right-hand side.

Use integration by parts with u=xu=x and dvdx=e2x\dfrac{dv}{dx}=e^{2x}: ∫xe2xdx=12xe2x−∫12e2xdx=12xe2x−14e2x.\int xe^{2x}\,dx=\dfrac12xe^{2x}-\int\dfrac12e^{2x}\,dx=\dfrac12xe^{2x}-\dfrac14e^{2x}. M1 - Integrate xe2xxe^{2x} 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.

ye2x=12xe2x−14e2x+C,soy=12x−14+Ce−2x.ye^{2x}=\dfrac12xe^{2x}-\dfrac14e^{2x}+C,\qquad\text{so}\qquad y=\dfrac12x-\dfrac14+Ce^{-2x}. A1 - y=12x−14+Ce−2xy=\dfrac12x-\dfrac14+Ce^{-2x}

Why? Divide every term, including the constant, by e2xe^{2x}. Dividing only the first terms is a common slip.

Step 5 - Use the initial condition.

When x=0x=0, y=1y=1: 1=−14+C,soC=54.1=-\dfrac14+C,\qquad\text{so}\qquad C=\dfrac54. M1 - Substitute x=0x=0 and y=1y=1 to find CC

Why? Substitute into the general solution, where e0=1e^0=1, and solve for CC.

Step 6 - State the particular solution.

y=12x−14+54e−2x.y=\dfrac12x-\dfrac14+\dfrac54e^{-2x}. A1 - y=12x−14+54e−2xy=\dfrac12x-\dfrac14+\dfrac54e^{-2x}

Why? A check: differentiating gives y′=12−52e−2xy'=\dfrac12-\dfrac52e^{-2x}, and then y′+2y=xy'+2y=x, as required.

Marks (6):
A1 I=e2xI=e^{2x}
M1 Multiply by the integrating factor to obtain ddx(ye2x)=xe2x\dfrac{d}{dx}(ye^{2x})=xe^{2x}
M1 Integrate xe2xxe^{2x} by parts
A1 y=12x−14+Ce−2xy=\dfrac12x-\dfrac14+Ce^{-2x}
M1 Substitute x=0x=0 and y=1y=1 to find CC
A1 y=12x−14+54e−2xy=\dfrac12x-\dfrac14+\dfrac54e^{-2x}

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
Easy
No calc
[2 marks]
Find the integrating factor for the differential equation dydx+3y=x.\dfrac{dy}{dx} + 3y = x.
[2]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[5 marks]
Solve xdydx+2y=x3x\dfrac{dy}{dx} + 2y = x^3 for x>0x > 0, using CC for the arbitrary constant.
[5]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[5 marks]
Solve dydx−2y=4e3x\dfrac{dy}{dx} - 2y = 4e^{3x} given y(0)=1.y(0) = 1.
[5]
Fractions & powers
Other

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. P(x)P(x) is only the coefficient of yy once the coefficient of y′y' has been made exactly 1 - dividing through before reading off P(x)P(x) is essential.
  • Multiplying only the left-hand side by the integrating factor. Every term in the equation, including Q(x)Q(x) on the right, must be multiplied by II - 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 y(1)=2y(1)=2" question needs the general solution with CC still present before you substitute the given point - skipping straight to a particular solution loses the method mark.

Try some questions on integrating factor

Section 2 of 3 AHL5.18

Separable differential equations

A first order differential equation is separable when it can be written as dydx=f(x)g(y)\dfrac{dy}{dx}=f(x)g(y). Collect all the yy terms with dydy on one side and all the xx terms with dxdx on the other, then integrate each side. It also covers general and particular solutions, and the logistic equation dndt=kn(a−n)\dfrac{dn}{dt}=kn(a-n), where 1n(a−n)\dfrac{1}{n(a-n)} 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

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

Recognise this shape whenever the right-hand side factorises into a piece depending only on xx and a piece depending only on yy.

Solving it

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

Divide both sides by g(y)g(y) 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 yy term is on one side with dydy and every xx term is on the other with dxdx. Each side can then be integrated separately.

e.g. dydx=xy\dfrac{dy}{dx}=xy becomes 1ydy=xdx\dfrac{1}{y}\,dy=x\,dx.

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. dydx=2x\dfrac{dy}{dx}=2x has general solution y=x2+Cy=x^{2}+C.

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 y=3y=3 when x=0x=0, then y=x2+Cy=x^{2}+C gives C=3C=3, so y=x2+3y=x^{2}+3.

Why is there a modulus when integrating one over yy?

The integral ∫1ydy\int\dfrac{1}{y}\,dy is ln⁡|y|+C\ln|y|+C, because the logarithm is only defined for positive values and yy may be negative. Writing the modulus keeps the working correct.

e.g. dydx=yx2\dfrac{dy}{dx}=\dfrac{y}{x^2} gives ln⁡|y|=−1x+C\ln|y|=-\dfrac1x+C, so y=Ae−1xy=Ae^{-\frac1x}, where AA is a constant.

Worked example, step by step

The question No calculator needed [5 marks]

Solve the differential equation dydx=xy2\dfrac{dy}{dx}=xy^2, given that y=1y=1 when x=0x=0. Give yy in terms of xx.

Worked solution: worked example

Answer: y=22−x2y=\dfrac{2}{2-x^2}

Step 1 - Separate the variables.

Divide by y2y^2 and multiply by dxdx: 1y2dy=xdx.\dfrac{1}{y^2}\,dy=x\,dx. M1 - Separate the variables to obtain ∫1y2dy=∫xdx\int\dfrac{1}{y^2}\,dy=\int x\,dx

Why? The right-hand side of dydx=xy2\dfrac{dy}{dx}=xy^2 is a function of xx times a function of yy, so all the yy terms can go with dydy and all the xx terms with dxdx.

Step 2 - Integrate both sides.

∫y−2dy=∫xdx⇒−1y=x22+C.\int y^{-2}\,dy=\int x\,dx\quad\Rightarrow\quad-\dfrac1y=\dfrac{x^2}{2}+C. M1 - Integrate both sides A1 - −1y=x22+C-\dfrac1y=\dfrac{x^2}{2}+C

Why? Integrate each side with respect to its own variable and add one constant only. The power rule gives y−1−1\dfrac{y^{-1}}{-1} on the left.

Step 3 - Use the initial condition.

When x=0x=0, y=1y=1: −1=0+C,soC=−1.-1=0+C,\qquad\text{so}\qquad C=-1. A1 - C=−1C=-1

Why? Substitute the given pair of values into the general solution to find the constant.

Step 4 - Make yy the subject.

−1y=x22−1=x2−22⇒y=22−x2.-\dfrac1y=\dfrac{x^2}{2}-1=\dfrac{x^2-2}{2}\quad\Rightarrow\quad y=\dfrac{2}{2-x^2}. A1 - y=22−x2y=\dfrac{2}{2-x^2}

Why? Take the reciprocal of both sides and then change the signs. A check: when x=0x=0 this gives y=1y=1.

Marks (5):
M1 Separate the variables to obtain ∫1y2dy=∫xdx\int\dfrac{1}{y^2}\,dy=\int x\,dx
M1 Integrate both sides
A1 −1y=x22+C-\dfrac1y=\dfrac{x^2}{2}+C
A1 C=−1C=-1
A1 y=22−x2y=\dfrac{2}{2-x^2}

Now you try: enter your answers to be marked

1
Easy
No calc
[1 mark]
A quantity satisfies dydt=ky\dfrac{dy}{dt} = ky with k>0.k > 0. Write down the general solution, using AA for the arbitrary constant.
[1]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[4 marks]
Solve dydx=ycos⁡x\dfrac{dy}{dx} = y\cos x given y(0)=2.y(0) = 2.
[4]
Fractions & powers
Trig
Logs
Other

Worked solution: practice question 2

3
Hard
Calculator
[6 marks]
Solve dydx=y(1−y)\dfrac{dy}{dx} = y(1 - y) given y(0)=0.5.y(0) = 0.5.
[6]
Fractions & powers
Logs
Other

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. dydx+4y=x\dfrac{dy}{dx} + 4y = x can't be split into a pure-xx side and a pure-yy 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 +c1+c_1 on the left and +c2+c_2 on the right is unnecessary and can lead to confusion later.
  • Losing the modulus sign when integrating 1y\dfrac{1}{y}. ∫1ydy=ln⁡|y|+c\displaystyle\int \dfrac{1}{y}\,dy = \ln|y| + c, not ln⁡y\ln y - dropping the absolute value can cause errors when exponentiating back to find yy.

Try some questions on separable differential equations

Section 3 of 3 AHL5.18

Euler's method

Euler's method estimates the solution of dydx=f(x,y)\dfrac{dy}{dx}=f(x,y) by moving forward in equal steps of length hh, using yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n). Start from the given initial point and repeat the step until you reach the required xx-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

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

Step forward from a known starting point using the gradient at each step - smaller hh gives a more accurate estimate, at the cost of more steps.

✓ In the formula booklet

x-step

xn+1=xn+hx_{n+1}=x_n+h

The xx-value always increases by exactly hh each step - keep a running column for it alongside yny_n so nothing gets muddled.

Key terms

What is the step length?

The step length hh is the amount that xx increases by at every step. Each new xx-value is found using xn+1=xn+hx_{n+1}=x_n+h.

e.g. Starting at x0=0x_0=0 with h=0.5h=0.5, the xx-values are 00, 0.50.5, 11, 1.51.5.

What does the initial condition give you?

It gives the starting point (x0,y0)(x_0,y_0) for the iteration. Without it, the method has nothing to start from.

e.g. The condition y(2)=3y(2)=3 means x0=2x_0=2 and y0=3y_0=3.

What is the gradient used for in each step?

At each point, f(xn,yn)f(x_n,y_n) is the gradient of the solution curve. Euler's method follows a straight line with that gradient across the step, so yy changes by about the gradient multiplied by hh.

e.g. For dydx=x+y\dfrac{dy}{dx}=x+y at (0,1)(0,1) the gradient is 11, so with h=0.5h=0.5 the new value is y1=1+0.5×1=1.5y_1=1+0.5\times1=1.5.

How does a step in the iteration work?

Evaluate the gradient using the current xnx_n and yny_n, multiply by hh, and add to yny_n. Only then move on to the next xx-value.

e.g. For dydx=2y\dfrac{dy}{dx}=2y with y0=3y_0=3 and h=0.1h=0.1, y1=3+0.1×2×3=3.6y_1=3+0.1\times2\times3=3.6.

Worked example, step by step

The question No calculator needed [4 marks]

Consider the differential equation dydx=x+y2\dfrac{dy}{dx}=x+y^2, with y=1y=1 when x=0x=0. Use Euler's method with step length h=0.5h=0.5 to estimate the value of yy when x=1x=1.

Worked solution: worked example

Answer: y(1)≈2.875y(1)\approx2.875

Step 1 - Set up the method.

Here f(x,y)=x+y2f(x,y)=x+y^2, with x0=0x_0=0, y0=1y_0=1 and h=0.5h=0.5. The formulae are xn+1=xn+h,yn+1=yn+hf(xn,yn).x_{n+1}=x_n+h,\qquad y_{n+1}=y_n+h\,f(x_n,y_n). M1 - Use yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n) with h=0.5h=0.5 and (x0,y0)=(0,1)(x_0,y_0)=(0,1)

Why? The initial condition gives the starting point. To get from x=0x=0 to x=1x=1 with a step of 0.50.5 takes two steps.

Step 2 - First step.

f(0,1)=0+12=1,y1=1+0.5(1)=1.5,x1=0.5.f(0,1)=0+1^2=1,\qquad y_1=1+0.5(1)=1.5,\qquad x_1=0.5. A1 - y1=1.5y_1=1.5

Why? Use the gradient at the old point (x0,y0)(x_0,y_0) to move to the new value of yy.

Step 3 - Second step.

f(0.5,1.5)=0.5+1.52=2.75,y2=1.5+0.5(2.75)=2.875,x2=1.f(0.5,1.5)=0.5+1.5^2=2.75,\qquad y_2=1.5+0.5(2.75)=2.875,\qquad x_2=1. M1 - Apply the formula again at the point (0.5,1.5)(0.5,1.5)

Why? Now use the new point (x1,y1)(x_1,y_1), not the starting point. Work out the gradient before updating yy.

Step 4 - State the estimate.

When x=1x=1, y≈2.875y\approx2.875. A1 - y(1)≈2.875y(1)\approx2.875

Why? Since x2=1x_2=1 is the required value, no more steps are needed.

Marks (4):
M1 Use yn+1=yn+hf(xn,yn)y_{n+1}=y_n+h\,f(x_n,y_n) with h=0.5h=0.5 and (x0,y0)=(0,1)(x_0,y_0)=(0,1)
A1 y1=1.5y_1=1.5
M1 Apply the formula again at the point (0.5,1.5)(0.5,1.5)
A1 y(1)≈2.875y(1)\approx2.875

Now you try: enter your answers to be marked

1
Easy
Calculator
[5 marks]
A hot drink cools according to dθdt=−0.05(θ−20), θ(0)=90,\dfrac{d\theta}{dt}=-0.05(\theta-20),\ \theta(0)=90, where θ\theta is temperature in ∘C^\circ C and tt in minutes.

Use Euler's method with step length h=2h=2 to estimate θ(4).\theta(4).
[5]
Fractions & powers
Other

Worked solution: practice question 1

2
Medium
No calc
[4 marks]
Use Euler's method with step length h=0.25h=0.25 to estimate y(1.5)y(1.5) for dydx=yx, y(1)=2.\dfrac{dy}{dx}=\dfrac{y}{x},\ y(1)=2.
[4]
Fractions & powers
Other

Worked solution: practice question 2

3
Hard
Calculator
[6 marks]
dydx=−2xy, y(0)=1.\dfrac{dy}{dx}=-2xy,\ y(0)=1. The exact solution is y=e−x2.y=e^{-x^2}.
(a) Use Euler's method with h=0.5h=0.5 to estimate y(1).y(1).
[3]
(b) Find the percentage error in this estimate compared to the exact value, to 1 decimal place.
[3]
Fractions & powers
Other

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 hh means fewer steps but a less accurate estimate - if the question asks for a specific h,h, use exactly that value, not a bigger one to save arithmetic.
  • Substituting the new xx-value into f(x,y)f(x,y) before updating yy. Each step uses the gradient at the old point (xn,yn)(x_n,y_n) to find the new yn+1y_{n+1} - working out ff 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.

Try some questions on Euler's method

Syllabus content covered

CodeSyllabus content
AHL5.18First order differential equations. Numerical solution of dydx=f(x,y)\dfrac{dy}{dx}=f(x,y) using Euler's method. Variables separable, for example the logistic equation dndt=kn(a−n).\dfrac{dn}{dt}=kn(a-n). Solution of y′+P(x)y=Q(x)y'+P(x)y=Q(x) 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 y′+P(x)y=Q(x)y' + P(x)y = Q(x), the integrating factor is I=e∫P(x)dxI = e^{\int P(x)\,dx}.

What makes a differential equation separable?

A first order equation is separable when it can be written as dydx=f(x)g(y)\dfrac{dy}{dx} = f(x)g(y), so all the yy terms can be moved to one side and all the xx terms to the other before integrating.

What is Euler's method?

Euler's method is a numerical way to estimate the solution of dydx=f(x,y)\dfrac{dy}{dx}=f(x,y): starting from a known point, it steps forward using yn+1=yn+h⋅f(xn,yn)y_{n+1}=y_n+h\cdot f(x_n,y_n), where hh is the chosen step length.

Why does multiplying by the integrating factor work?

Multiplying both sides by II turns the left-hand side into the derivative of a single product, ddx(Iy)\dfrac{d}{dx}(Iy), which can then be integrated directly.

How do you solve a separable differential equation?

Rearrange into 1g(y)dy=f(x)dx\dfrac{1}{g(y)}\,dy = f(x)\,dx, integrate both sides separately, then add a single constant of integration and rearrange for yy if required.

Does a smaller step size in Euler's method make it more accurate?

Yes - a smaller hh produces an estimate closer to the true solution curve, but requires more steps to reach the same xx-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 P(x)P(x), usually with the constant set to zero. A constant would only multiply II by a fixed number, which cancels when you divide by II 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 x=0x=0 to x=1x=1 with h=0.1h=0.1 takes 1−00.1=10\dfrac{1-0}{0.1}=10 steps.

What is the integrating factor when P(x) is 1/x?

Since ∫1xdx=ln⁡x\int\dfrac{1}{x}\,dx=\ln x for x>0x>0, the integrating factor is I=eln⁡x=xI=e^{\ln x}=x.

Ready to practise properly?

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