Figure 5.4: Euler’s Numerical Step Method vs. Exact Solution Curve
1. Foundational Anatomy of Differential Equations
A first-order ordinary differential equation (ODE) expresses a mathematical relationship between an independent variable $x$, an unknown function $y(x)$, and its first derivative $\frac{dy}{dx}$:
$$\frac{dy}{dx} = f(x, y)$$- General Solution: A family of functions $y = g(x, C)$ containing an arbitrary constant of integration $C$, representing an infinite family of solution curves.
- Particular Solution: A unique curve selected by applying an Initial Value Condition $(x_0, y_0)$ to solve for the specific numerical value of $C$.
2. Analytical Method 1: Separation of Variables (Topic 5.16)
An ODE is separable if the derivative factors into a product of a purely $x$-dependent function and a purely $y$-dependent function:
$$\frac{dy}{dx} = g(x) \, h(y) \quad \iff \quad \frac{1}{h(y)} \, dy = g(x) \, dx$$Integrating both sides with respect to their respective variables yields:
$$\int \frac{1}{h(y)} \, dy = \int g(x) \, dx + C$$Immediate Constant Placement Rule
Always add the constant of integration $+ C$ immediately upon integration. If the left side produces $\ln|y|$, exponentiate the entire sum:
$$\ln|y| = G(x) + C \implies |y| = e^{G(x) + C} = e^C \cdot e^{G(x)} \implies y = A e^{G(x)} \quad (A = \pm e^C)$$Never write $y = e^{G(x)} + C$, which is mathematically invalid!
3. Analytical Method 2: Homogeneous Equations via Substitution $y = vx$ (Topic 5.16 AHL)
A differential equation is homogeneous of degree zero if $\frac{dy}{dx}$ can be written strictly as a function of the ratio $\frac{y}{x}$:
$$\frac{dy}{dx} = F\left(\frac{y}{x}\right)$$The Homogeneous Solution Protocol:
- Substitute: Let $y = v \cdot x$, where $v = v(x)$ is a new dependent variable.
- Differentiate via Product Rule: $\frac{dy}{dx} = v + x\frac{dv}{dx}$.
- Equate and Separate: $$v + x\frac{dv}{dx} = F(v) \implies x\frac{dv}{dx} = F(v) - v \implies \int \frac{1}{F(v) - v}\,dv = \int \frac{1}{x}\,dx$$
- Integrate and Back-Substitute: Evaluate the integrals, then substitute $v = \frac{y}{x}$ to obtain the solution in terms of $x$ and $y$.
4. Analytical Method 3: First-Order Linear ODEs & Integrating Factors (Topic 5.16)
A linear first-order differential equation has the canonical standard form:
$$\frac{dy}{dx} + P(x)\,y = Q(x)$$Critical Requirement: The leading coefficient of $\frac{dy}{dx}$ MUST be equal to $1$. If given $A(x)\frac{dy}{dx} + B(x)y = C(x)$, you must divide the entire equation by $A(x)$ before identifying $P(x)$ and $Q(x)$.
To solve, multiply through by the Integrating Factor $I(x)$ defined as:
$$I(x) = e^{\int P(x) \, dx}$$By the product rule, the left-hand side condenses into the exact derivative of the product $y \cdot I(x)$:
$$\frac{d}{dx}\left[ y \cdot I(x) \right] = Q(x) \cdot I(x)$$Integrating both sides with respect to $x$ yields the complete general solution:
$$y \cdot I(x) = \int Q(x) \, I(x) \, dx + C \implies y = \frac{1}{I(x)}\left( \int Q(x) \, I(x) \, dx + C \right)$$5. Numerical Method: Euler’s Step Method & Error Analysis (Topic 5.17)
When an ODE $\frac{dy}{dx} = f(x, y)$ cannot be solved analytically, Euler’s Method constructs a piecewise-linear approximation over equal increments of step size $h$:
$$\begin{cases} x_{n+1} = x_n + h \\ y_{n+1} = y_n + h \cdot f(x_n, y_n) \end{cases}$$Mathematical Concavity and Under/Over-Estimation
In IB DP AA HL examinations, you are frequently asked whether an Euler approximation represents an overestimate or underestimate. This is determined solely by the second derivative $y''$:
| Second Derivative | Curve Geometry | Tangent Line Placement | Euler’s Estimation Result |
|---|---|---|---|
| $y''(x) > 0$ | Concave Up ($\cup$) | Tangents lie below the true curve | Underestimate |
| $y''(x) < 0$ | Concave Down ($\cap$) | Tangents lie above the true curve | Overestimate |
To evaluate $y''$, differentiate the differential equation implicitly: $\frac{d^2y}{dx^2} = \frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}\frac{dy}{dx}$.
Worked Examples
Worked Example 1: Homogeneous ODE via Substitution $y = vx$ (Paper 1 Standard)
Solve the differential equation $x\frac{dy}{dx} = y + \sqrt{x^2 + y^2}$ for $x > 0$, given that $y(1) = 0$.
Solution:
1. Divide through by $x$ to verify homogeneous form of degree zero: [M1]
$$\frac{dy}{dx} = \frac{y}{x} + \frac{\sqrt{x^2 + y^2}}{x} = \frac{y}{x} + \sqrt{1 + \left(\frac{y}{x}\right)^2}$$2. Substitute $y = vx \implies \frac{dy}{dx} = v + x\frac{dv}{dx}$: [M1]
$$v + x\frac{dv}{dx} = v + \sqrt{1 + v^2}$$3. Subtract $v$ from both sides and separate variables: [A1]
$$x\frac{dv}{dx} = \sqrt{1 + v^2} \implies \frac{1}{\sqrt{1 + v^2}}\,dv = \frac{1}{x}\,dx \quad \text{[M1]}$$4. Integrate both sides (using standard booklet inverse hyperbolic / log antiderivative): [A1]
$$\ln\left( v + \sqrt{1 + v^2} \right) = \ln(x) + C$$5. Apply the initial condition $y(1) = 0 \implies v(1) = \frac{0}{1} = 0$: [M1]
$$\ln\left( 0 + \sqrt{1 + 0} \right) = \ln(1) + C \implies \ln(1) = 0 + C \implies C = 0 \quad \text{[A1]}$$6. Exponentiate and back-substitute $v = \frac{y}{x}$: [M1]
$$v + \sqrt{1 + v^2} = x \implies \frac{y}{x} + \sqrt{1 + \frac{y^2}{x^2}} = x$$ $$y + \sqrt{x^2 + y^2} = x^2 \implies \sqrt{x^2 + y^2} = x^2 - y$$Square both sides: $x^2 + y^2 = x^4 - 2x^2 y + y^2 \implies x^2 = x^4 - 2x^2 y$.
Divide by $x^2$ ($x > 0$): $1 = x^2 - 2y \implies 2y = x^2 - 1 \implies y = \frac{x^2 - 1}{2}$. [A1]
Worked Example 2: Non-Normalized Linear ODE with Integrating Factor (Paper 1 Standard)
Find the particular solution to the differential equation $\cos(x)\frac{dy}{dx} + y\sin(x) = \cos^3(x)$ satisfying $y(0) = 3$, for $-\frac{\pi}{2} < x < \frac{\pi}{2}$.
Solution:
1. Divide by $\cos(x)$ to establish the standard canonical form $\frac{dy}{dx} + P(x)y = Q(x)$: [M1]
$$\frac{dy}{dx} + \tan(x)y = \cos^2(x) \quad \text{[A1]}$$Here $P(x) = \tan(x)$ and $Q(x) = \cos^2(x)$.
2. Calculate the Integrating Factor $I(x)$: [M1]
$$I(x) = e^{\int \tan(x)\,dx} = e^{\ln|\sec(x)|} = \sec(x) \quad \text{[A1]}$$3. Multiply the differential equation by $I(x) = \sec(x)$: [M1]
$$\frac{d}{dx}\left[ y \cdot \sec(x) \right] = \cos^2(x) \cdot \sec(x) = \cos^2(x) \cdot \frac{1}{\cos(x)} = \cos(x)$$4. Integrate with respect to $x$: [A1]
$$y \sec(x) = \int \cos(x)\,dx = \sin(x) + C$$5. Apply the initial condition $x = 0, y = 3$: [M1]
$$3 \sec(0) = \sin(0) + C \implies 3(1) = 0 + C \implies C = 3 \quad \text{[A1]}$$6. Solve explicitly for $y$: [A1]
$$y = \frac{\sin(x) + 3}{\sec(x)} = \sin(x)\cos(x) + 3\cos(x) = \frac{1}{2}\sin(2x) + 3\cos(x)$$Worked Example 3: Euler’s Method Multistep with Concavity Proof (Paper 2 Standard)
Consider the initial value problem $\frac{dy}{dx} = 2x - y$ with $y(0) = 1$.
(a) Use Euler’s method with step size $h = 0.2$ to approximate $y(0.4)$. [4 marks]
(b) By finding an expression for $\frac{d^2y}{dx^2}$, determine whether your approximation is an overestimate or an underestimate. [3 marks]
Solution:
(a) Euler Iterations:
Step 1 ($n = 0$): $x_0 = 0, y_0 = 1$.
$$f(x_0, y_0) = 2(0) - 1 = -1 \quad \text{[M1]}$$ $$y_1 = y_0 + h \cdot f(x_0, y_0) = 1 + 0.2(-1) = 0.8 \quad (x_1 = 0.2) \quad \text{[A1]}$$Step 2 ($n = 1$): $x_1 = 0.2, y_1 = 0.8$.
$$f(x_1, y_1) = 2(0.2) - 0.8 = 0.4 - 0.8 = -0.4 \quad \text{[M1]}$$ $$y_2 = y_1 + h \cdot f(x_1, y_1) = 0.8 + 0.2(-0.4) = 0.8 - 0.08 = 0.72 \quad (x_2 = 0.4) \quad \text{[A1]}$$ $$\implies y(0.4) \approx 0.72$$(b) Concavity Analysis:
Differentiate $\frac{dy}{dx} = 2x - y$ implicitly with respect to $x$: [M1]
$$\frac{d^2y}{dx^2} = \frac{d}{dx}[2x - y] = 2 - \frac{dy}{dx} = 2 - (2x - y) = 2 - 2x + y \quad \text{[A1]}$$On the interval $x \in [0, 0.4]$, $2 - 2x \ge 2 - 2(0.4) = 1.2 > 0$ and $y > 0$.
Therefore, $\frac{d^2y}{dx^2} > 0$ throughout the interval $[0, 0.4]$.
Since the solution curve is concave up, tangent lines lie strictly below the true curve, so Euler’s method yields an underestimate. [R1]
Worked Example 4: Applied Fluid Mixing Tank (Paper 2 Section B Standard)
A tank initially contains $200\text{ litres}$ of water in which $10\text{ kg}$ of salt is dissolved. Brine containing $0.2\text{ kg/L}$ of salt flows into the tank at a rate of $5\text{ L/min}$, and the thoroughly stirred mixture drains out at the same rate.
(a) Set up a differential equation for the mass of salt $S(t)$ in kg at time $t$ minutes. [2 marks]
(b) Solve the differential equation to find $S(t)$. [4 marks]
(c) Find the mass of salt in the tank after $40$ minutes, and state the limiting mass as $t \to \infty$. [3 marks]
Solution:
(a) Rate Equation:
$$\frac{dS}{dt} = \text{Rate In} - \text{Rate Out} \quad \text{[M1]}$$ $$\text{Rate In} = 5\text{ L/min} \times 0.2\text{ kg/L} = 1\text{ kg/min}$$ $$\text{Rate Out} = 5\text{ L/min} \times \frac{S(t)}{200}\text{ kg/L} = \frac{S}{40}\text{ kg/min}$$ $$\frac{dS}{dt} = 1 - \frac{S}{40} = \frac{40 - S}{40} \quad \text{[A1]}$$(b) Solving the ODE:
Separate variables: [M1]
$$\frac{1}{40 - S}\,dS = \frac{1}{40}\,dt \implies -\ln|40 - S| = \frac{t}{40} + C \quad \text{[A1]}$$ $$40 - S = A e^{-t/40} \quad (A = \pm e^{-C})$$Initial condition $S(0) = 10$: $40 - 10 = A e^0 \implies A = 30$. [M1]
$$S(t) = 40 - 30e^{-t/40} \quad \text{[A1]}$$(c) Evaluation & Asymptotic Limit:
At $t = 40$: [M1]
$$S(40) = 40 - 30e^{-40/40} = 40 - 30e^{-1} \approx 40 - 11.036 = 28.96\text{ kg} \approx 29.0\text{ kg} \quad \text{[A1]}$$As $t \to \infty$, $e^{-t/40} \to 0$:
$$\lim_{t \to \infty} S(t) = 40 - 0 = 40\text{ kg} \quad \text{[A1]}$$(Check: Volume $200\text{ L} \times \text{inflow concentration } 0.2\text{ kg/L} = 40\text{ kg}$.)
Worked Example 5: Integrating Factor with Initial Value Problem (Paper 2 Standard)
Solve the initial value problem $x \frac{dy}{dx} + 2y = \cos x$ for $x > 0$, given that $y(\pi) = 0$. [7 marks]
Solution:
Step 1: Standard Linear Form
Divide by $x$ to achieve standard form $\frac{dy}{dx} + P(x)y = Q(x)$:
$$\frac{dy}{dx} + \frac{2}{x}y = \frac{\cos x}{x} \quad [M1]$$Here $P(x) = \frac{2}{x}$ and $Q(x) = \frac{\cos x}{x}$.
Step 2: Integrating Factor $I(x)$
$$I(x) = e^{\int \frac{2}{x}\,dx} = e^{2\ln x} = e^{\ln(x^2)} = x^2 \quad [A1]$$Step 3: Multiply and Integrate Both Sides
$$\frac{d}{dx}\left( x^2 y \right) = x^2 \cdot \frac{\cos x}{x} = x\cos x \quad [M1]$$ $$x^2 y = \int x\cos x\,dx \quad [M1]$$Apply integration by parts with $u = x, dv = \cos x\,dx \implies du = dx, v = \sin x$:
$$\int x\cos x\,dx = x\sin x - \int \sin x\,dx = x\sin x + \cos x + C \quad [A1]$$ $$x^2 y = x\sin x + \cos x + C \implies y = \frac{x\sin x + \cos x + C}{x^2}$$Step 4: Apply Initial Condition $y(\pi) = 0$
$$0 = \frac{\pi\sin\pi + \cos\pi + C}{\pi^2} = \frac{0 - 1 + C}{\pi^2} \implies C - 1 = 0 \implies C = 1 \quad [M1]$$Particular solution:
$$y = \frac{x\sin x + \cos x + 1}{x^2} \quad [A1]$$Examiner Commentary: Candidates often forget to divide by $x$ initially, attempting an integrating factor directly on $x \frac{dy}{dx}$. The standard form requires leading coefficient 1 for $\frac{dy}{dx}$.
Practice Exercises (10 Tiered Questions)
Complete these 10 exam-style questions spanning core techniques to advanced HL challenge problems. Open each question to inspect the full step-by-step IB markscheme.
Find the general solution of the differential equation $\frac{dy}{dx} = 2x(y^2 + 1)$.
Show Full Solution
Separate variables: $\frac{1}{y^2 + 1}\,dy = 2x\,dx$. [M1]
$$\int \frac{1}{y^2 + 1}\,dy = \int 2x\,dx \implies \arctan(y) = x^2 + C \quad \text{[A1]}$$Solve explicitly for $y$: [A1]
$$y = \tan(x^2 + C)$$Solve the initial value problem $\frac{dy}{dx} = \frac{e^{2x}}{y}$, with initial condition $y(0) = -3$.
Show Full Solution
Separate variables: $y\,dy = e^{2x}\,dx$. [M1]
$$\int y\,dy = \int e^{2x}\,dx \implies \frac{1}{2}y^2 = \frac{1}{2}e^{2x} + C \implies y^2 = e^{2x} + K \quad \text{[A1]}$$Apply initial condition $y(0) = -3$: $(-3)^2 = e^0 + K \implies 9 = 1 + K \implies K = 8$. [M1]
Because $y(0) = -3 < 0$, choose the negative root branch: [R1]
$$y = -\sqrt{e^{2x} + 8} \quad \text{[A1]}$$Find the general solution of the linear differential equation $\frac{dy}{dx} + \frac{2}{x}y = 5x^2$, for $x > 0$.
Show Full Solution
Standard form: $P(x) = \frac{2}{x}$, $Q(x) = 5x^2$.
Integrating Factor: $I(x) = e^{\int \frac{2}{x}dx} = e^{2\ln x} = e^{\ln(x^2)} = x^2$. [M1][A1]
Multiply ODE by $x^2$: $\frac{d}{dx}[x^2 y] = 5x^4$. [M1]
$$x^2 y = \int 5x^4\,dx = x^5 + C \quad \text{[A1]}$$ $$y = x^3 + \frac{C}{x^2} \quad \text{[A1]}$$Solve the initial value problem $\frac{dy}{dx} + y\tan x = \cos^2 x$, given that $y(0) = 2$, for $-\frac{\pi}{2} < x < \frac{\pi}{2}$.
Show Full Solution
Integrating factor: $I(x) = e^{\int \tan x\,dx} = e^{\ln|\sec x|} = \sec x$. [M1]
$$\frac{d}{dx}[y\sec x] = \cos^2 x \cdot \sec x = \cos x \quad \text{[M1]}$$ $$y\sec x = \int \cos x\,dx = \sin x + C \quad \text{[A1]}$$Substitute $x=0, y=2$: $2\sec(0) = \sin(0) + C \implies 2(1) = 0 + C \implies C = 2$. [M1]
$$y = \frac{\sin x + 2}{\sec x} = \sin x \cos x + 2\cos x = \frac{1}{2}\sin 2x + 2\cos x \quad \text{[A1]}$$Given the differential equation $\frac{dy}{dx} = x + y^2$ with $y(0) = 1$, use Euler’s method with step size $h = 0.1$ to approximate $y(0.2)$ to 4 decimal places.
Show Full Solution
Step 1 ($x_0 = 0, y_0 = 1$): [M1]
$$f(0, 1) = 0 + 1^2 = 1 \implies y_1 = 1 + 0.1(1) = 1.1 \quad (x_1 = 0.1) \quad \text{[A1]}$$Step 2 ($x_1 = 0.1, y_1 = 1.1$): [M1]
$$f(0.1, 1.1) = 0.1 + (1.1)^2 = 0.1 + 1.21 = 1.31$$ $$y_2 = 1.1 + 0.1(1.31) = 1.1 + 0.131 = 1.2310 \quad (x_2 = 0.2) \quad \text{[A1]}$$$\implies y(0.2) \approx 1.2310$.
A hot cup of coffee with initial temperature $90^\circ\text{C}$ is placed in a room at constant temperature $20^\circ\text{C}$. Newton’s law of cooling gives $\frac{dT}{dt} = -k(T - 20)$. After 5 minutes, $T = 60^\circ\text{C}$. Find the temperature after 15 minutes.
Show Full Solution
Separate variables: $\frac{1}{T - 20}\,dT = -k\,dt \implies T - 20 = A e^{-kt}$. [M1]
Initial condition $T(0) = 90 \implies 70 = A e^0 \implies A = 70$. [A1]
At $t = 5$: $60 = 20 + 70e^{-5k} \implies e^{-5k} = \frac{40}{70} = \frac{4}{7}$. [M1]
At $t = 15$: $e^{-15k} = (e^{-5k})^3 = \left(\frac{4}{7}\right)^3 = \frac{64}{343}$. [M1]
$$T(15) = 20 + 70\left(\frac{64}{343}\right) = 20 + \frac{640}{49} \approx 33.1^\circ\text{C} \quad \text{[A1]}$$Find the particular solution to $x\frac{dy}{dx} - y = x^3 e^x$ satisfying $y(1) = 0$, for $x > 0$.
Show Full Solution
Divide by $x$: $\frac{dy}{dx} - \frac{1}{x}y = x^2 e^x$. [M1]
Integrating factor: $I(x) = e^{\int -1/x dx} = e^{-\ln x} = \frac{1}{x}$. [A1]
$$\frac{d}{dx}\left[ \frac{y}{x} \right] = \frac{1}{x}(x^2 e^x) = x e^x \implies \frac{y}{x} = \int x e^x\,dx \quad \text{[M1]}$$By parts: $\int x e^x dx = (x - 1)e^x + C$. [A1]
Condition $y(1) = 0$: $0 = (1 - 1)e^1 + C \implies C = 0$. [M1]
$$y = x(x - 1)e^x \quad \text{[A1]}$$Consider the differential equation $\frac{dy}{dx} = 2x - y$ with $y(0) = 1$. Use Euler’s method with step $h = 0.5$ to estimate $y(1)$, and prove whether it is an overestimate or underestimate using the second derivative.
Show Full Solution
Step 1 ($x_0 = 0, y_0 = 1$): $y_1 = 1 + 0.5(2(0) - 1) = 0.5$ ($x_1 = 0.5$). [M1]
Step 2 ($x_1 = 0.5, y_1 = 0.5$): $y_2 = 0.5 + 0.5(2(0.5) - 0.5) = 0.5 + 0.5(0.5) = 0.75$ ($x_2 = 1.0$). [A1]
Second derivative: $y'' = \frac{d}{dx}[2x - y] = 2 - y' = 2 - (2x - y) = 2 - 2x + y$. [M1]
On $[0, 1]$, $2 - 2x \ge 0$ and $y > 0$, hence $y''(x) > 0$ (curve is concave up). [R1]
Because the tangent lines lie below the curve, Euler's method gives an underestimate. [A1]
A tank initially contains $100\text{ L}$ of pure water. Brine containing $0.5\text{ kg/L}$ of salt flows in at $4\text{ L/min}$, and the thoroughly mixed solution drains out at $4\text{ L/min}$. Set up and solve the ODE for salt mass $S(t)$, and find $\lim_{t\to\infty} S(t)$.
Show Full Solution
Rate In = $4 \times 0.5 = 2\text{ kg/min}$; Rate Out = $4 \times \frac{S}{100} = \frac{S}{25}\text{ kg/min}$. [M1]
$$\frac{dS}{dt} = 2 - \frac{S}{25} = \frac{50 - S}{25} \implies \frac{1}{50 - S}\,dS = \frac{1}{25}\,dt \quad \text{[A1]}$$ $$-\ln|50 - S| = \frac{t}{25} + C \implies 50 - S = A e^{-t/25} \quad \text{[M1]}$$Pure water at $t = 0 \implies S(0) = 0 \implies 50 = A$. [A1]
$$S(t) = 50(1 - e^{-t/25})\text{ kg} \quad \text{[A1]}$$ $$\lim_{t \to \infty} S(t) = 50(1 - 0) = 50\text{ kg} \quad \text{[A1]}$$A falling object of mass $m$ experiences gravity $mg$ and air drag proportional to velocity $kv$. Starting from rest ($v(0) = 0$), solve $m\frac{dv}{dt} = mg - kv$. Show that the terminal velocity is $v_T = \frac{mg}{k}$.
Show Full Solution
Standard linear ODE form: $\frac{dv}{dt} + \frac{k}{m}v = g$. [M1]
Integrating factor: $I(t) = e^{\int (k/m)dt} = e^{kt/m}$. [A1]
$$\frac{d}{dt}\left[ v e^{kt/m} \right] = g e^{kt/m} \implies v e^{kt/m} = \frac{mg}{k}e^{kt/m} + C \quad \text{[M1]}$$ $$v(t) = \frac{mg}{k} + C e^{-kt/m}$$Condition $v(0) = 0 \implies 0 = \frac{mg}{k} + C \implies C = -\frac{mg}{k}$. [M1]
$$v(t) = \frac{mg}{k}\left(1 - e^{-kt/m}\right) \quad \text{[A1]}$$Since $k, m > 0$, $\lim_{t\to\infty} e^{-kt/m} = 0$, so $v_T = \frac{mg}{k}$. [AG]
Formula Booklet References (Topics 5.16 & 5.17)
Syllabus 5.16: Integrating Factor for Linear First-Order ODEs
$$\frac{dy}{dx} + P(x)y = Q(x) \implies I(x) = e^{\int P(x)\,dx}$$ $$y \cdot I(x) = \int Q(x) \cdot I(x)\,dx + C$$Syllabus 5.17: Euler’s Numerical Step Method
$$x_{n+1} = x_n + h$$ $$y_{n+1} = y_n + h \cdot f(x_n, y_n)$$Key Formulas & Identities
1. Homogeneous Differential Equations ($y = vx$ Substitution)
• Identify: $\frac{dy}{dx} = F\left(\frac{y}{x}\right)$
• Substitute: $y = vx \implies \frac{dy}{dx} = v + x\frac{dv}{dx}$
• Separate: $x\frac{dv}{dx} = F(v) - v \implies \int \frac{1}{F(v) - v}\,dv = \int \frac{1}{x}\,dx$
2. Concavity & Euler Error Determination
• If $\frac{d^2y}{dx^2} > 0$ (Concave up $\cup$): Tangents lie below curve $\implies$ Underestimate
• If $\frac{d^2y}{dx^2} < 0$ (Concave down $\cap$): Tangents lie above curve $\implies$ Overestimate
Common Exam Pitfalls
Premature Exponentiation & Missing $+ C$
When solving $\int \frac{1}{y}dy = \int g(x)dx$, you must write $\ln|y| = G(x) + C$ before exponentiating: $y = A e^{G(x)}$ where $A = \pm e^C$. Writing $y = e^{G(x)} + C$ is an instant method failure.
Forgetting to Normalize Linear ODEs
If given $x\frac{dy}{dx} + 3y = x^2$, students often take $P(x) = 3$. You MUST divide by $x$ first to get $\frac{dy}{dx} + \frac{3}{x}y = x$, so $P(x) = \frac{3}{x}$ and $I(x) = x^3$.
Conflating First and Second Derivatives in Euler Error Analysis
The direction of error (over- or under-estimate) depends solely on the sign of the second derivative $y''$ (concavity), NOT the sign of $y'$ (increasing/decreasing).
Topic Diagnostic Test
Complete this timed test to check your understanding and exam technique.
Section A: Diagnostic Multiple Choice Questions
What is the integrating factor for the linear differential equation $x\frac{dy}{dx} + 3y = \cos x$ (for $x > 0$)?
Given $\frac{dy}{dx} = y - x$ with $y(1) = 2$, what is the Euler approximation for $y(1.2)$ using a single step of $h = 0.2$?
If an analytical solution $y(x)$ satisfies $y''(x) < 0$ on the interval $[a, b]$, Euler’s method produces:
Which substitution converts $\frac{dy}{dx} = f\left(\frac{y}{x}\right)$ into a separable differential equation?
Section B: Examination-Style Free Response Questions
Consider the differential equation $(x + 1)\frac{dy}{dx} + 2y = (x + 1)^3$ for $x > -1$, with $y(0) = 1$.
(a) Show that the integrating factor is $(x + 1)^2$. [2 marks]
(b) Find the explicit particular solution $y(x)$. [5 marks]
View Official IB Markscheme
(a) Standard form and integrating factor:
$$\frac{dy}{dx} + \frac{2}{x + 1}y = (x + 1)^2 \quad \text{[M1]}$$ $$I(x) = e^{\int \frac{2}{x + 1}dx} = e^{2\ln(x + 1)} = (x + 1)^2 \quad \text{[A1]}$$(b) Multiply and integrate:
$$\frac{d}{dx}\left[ (x + 1)^2 y \right] = (x + 1)^2 (x + 1)^2 = (x + 1)^4 \quad \text{[M1]}$$ $$(x + 1)^2 y = \int (x + 1)^4 dx = \frac{1}{5}(x + 1)^5 + C \quad \text{[M1][A1]}$$Apply $x=0, y=1$:
$$(1)^2(1) = \frac{1}{5}(1)^5 + C \implies 1 = \frac{1}{5} + C \implies C = \frac{4}{5} \quad \text{[M1]}$$ $$y = \frac{1}{5}(x + 1)^3 + \frac{4}{5(x + 1)^2} \quad \text{[A1]}$$Consider $\frac{dy}{dx} = 2x - y$ with $y(0) = 2$.
(a) Use Euler’s method with step size $h = 0.1$ to approximate $y(0.2)$. [3 marks]
(b) Solve the ODE analytically to find the exact value of $y(0.2)$. [4 marks]
(c) Calculate the percentage error of the Euler approximation. [2 marks]
View Official IB Markscheme
(a) Euler iterations:
$x_0 = 0, y_0 = 2 \implies f(0, 2) = -2$
$$y_1 = 2 + 0.1(-2) = 1.8 \quad (x_1 = 0.1) \quad \text{[M1]}$$$f(0.1, 1.8) = 2(0.1) - 1.8 = 0.2 - 1.8 = -1.6$
$$y_2 = 1.8 + 0.1(-1.6) = 1.8 - 0.16 = 1.64 \quad \text{[A1]}$$(b) Analytical solution:
$$\frac{dy}{dx} + y = 2x \implies I(x) = e^x \quad \text{[M1]}$$ $$\frac{d}{dx}[y e^x] = 2x e^x \implies y e^x = 2(x e^x - e^x) + C = 2e^x(x - 1) + C \quad \text{[M1]}$$Apply $y(0) = 2 \implies 2 = 2(-1) + C \implies C = 4$
$$y(x) = 2(x - 1) + 4e^{-x} = 2x - 2 + 4e^{-x} \quad \text{[A1]}$$At $x = 0.2$: $y(0.2) = 2(0.2) - 2 + 4e^{-0.2} = -1.6 + 4(0.81873) = 1.6749$ [A1]
(c) Percentage error:
$$\text{Error} = \left|\frac{1.6749 - 1.6400}{1.6749}\right| \times 100\% = \frac{0.0349}{1.6749} \times 100\% \approx 2.08\% \quad \text{[M1][A1]}$$