Clastify logo
Clastify logo
Exam prep
Exemplars
Review
HOT

Differential Equations

Master IB Math AI Differential Equations with notes created by examiners and strictly aligned with the syllabus.

IB Syllabus Requirements for Differential Equations

5.14

Modelling and separation of variables

HL

5.15

Slope fields

HL

5.16

Euler’s method and numerical solutions

HL

5.17

Phase portraits of coupled systems

HL

5.14

MODELLING AND SEPARATION OF VARIABLES

HL

From a context to an equation

A differential equation links an unknown function to one or more of its derivatives. Instead of giving the quantity directly, it describes how that quantity changes.

When building one from a context, identify:

  • the dependent quantity;
  • the independent quantity, often time;
  • the rate being described;
  • words such as “proportional to”, “inversely proportional to” or “at a constant rate”.

Suppose, for example, that the rate at which a medicine leaves the bloodstream is proportional to the amount present:

dQdt=kQ\frac{dQ}{dt}=-kQ

The negative sign is essential because the amount is decreasing. Also, “proportional to” introduces a constant; it doesn’t mean that the two quantities are equal without one.

Check the units. Here dQ/dtdQ/dt has units kg s1\text{kg s}^{-1}, as does kQkQ. This quick check often reveals an incorrect model.

Separation of variables

A separable differential equation is a first-order differential equation that can be rearranged so every expression involving the dependent variable sits with its differential, while every expression involving the independent variable is placed on the other side.

Consider the general equation

dydx=g(x)r(y)\frac{dy}{dx}=g(x)r(y)

Separate the variables before integrating:

1r(y)dy=g(x)dx\frac{1}{r(y)}\,dy=g(x)\,dx

Now integrate both sides. Include a constant of integration. Only one is needed, since two arbitrary constants can be combined.

For the important proportional-growth model

dydx=ay\frac{dy}{dx}=ay

separating the variables gives

1ydy=adx\frac{1}{y}\,dy=a\,dx

Therefore,

lny=ax+C\ln|y|=ax+C

After exponentiating, absorb the sign into a new arbitrary constant:

y=Aeaxy=Ae^{ax}

The result is an exponential family of solutions.

A general solution is a family of functions with enough arbitrary constants to represent all solutions admitted by the differential equation on the interval being considered. A first-order equation normally gives one arbitrary constant. If an initial condition such as y(x0)=y0y(x_0)=y_0 is provided, substitute it to find the constant and obtain a particular solution. This is one member of the family that satisfies the given condition; x0x_0 is the specified initial value of xx and y0y_0 is the corresponding specified value of yy, with their respective context-dependent units.

Take care when dividing by an expression involving yy. If the expression can equal zero, test the resulting constant function separately. Otherwise, the division may discard a valid equilibrium solution.

5.15

SLOPE FIELDS

HL

Reading the local slopes

A slope field is a diagram made up of short line segments. At each plotted point, the segment’s gradient matches the derivative given by a first-order differential equation. For

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

The field doesn’t show a single solution. Instead, it gives the local direction that every solution must follow. To sketch a solution curve, move smoothly through the field and keep the curve tangent to the segments. Different initial conditions can be traced without solving the equation algebraically.

Image

When reading a field, look for:

  • horizontal segments, where f(x,y)=0f(x,y)=0;
  • regions with positive or negative gradient;
  • places where the magnitude of the gradient becomes large;
  • horizontal solution curves that act as equilibrium solutions;
  • repeated slope patterns along horizontal, vertical or diagonal bands.

In a well-behaved first-order model, solution curves through different initial points don’t normally cross. If they crossed, the equation would assign two different solution directions to the same point.

Representation and choice

A slope field is one chosen representation of a differential equation, not the equation itself. What the viewer notices depends on the window, scale, density of segments and chosen sample points. A coarse field might hide an equilibrium or make rapid change look mild. This shows how values and choices influence mathematical representations of the world: the underlying rule may stay fixed, but the diagram still reflects human decisions about what to display.

5.16

EULER’S METHOD AND NUMERICAL SOLUTIONS

HL

One first-order equation

A numerical solution gives a sequence of approximate values from a differential equation and initial data when an exact formula is unavailable or not needed. In Euler’s method, the solution follows a tangent line for one short step. The slope is then recalculated.

For dy/dx=f(x,y)dy/dx=f(x,y), the Euler update is

xn+1=xn+h,yn+1=yn+hf(xn,yn),\begin{aligned} x_{n+1}&=x_n+h,\\ y_{n+1}&=y_n+h f(x_n,y_n), \end{aligned}

The rule is

new value=old value+(step size)(current rate)\text{new value}=\text{old value}+(\text{step size})(\text{current rate})

For each row, use the current row to calculate the slope—not the new row. That detail defines Euler’s method.

Image

Using a smaller h|h| usually improves the approximation because the tangent line is followed across a shorter interval. It also requires more steps and still doesn’t make the result exact. A positive hh moves forward in xx; a negative hh gives a backward approximation. Error builds up through the local straight-line approximation and numerical rounding.

A spreadsheet handles this recurrence well. Put xnx_n, yny_n, f(xn,yn)f(x_n,y_n), xn+1x_{n+1} and yn+1y_{n+1} in columns, enter the initial row, then fill the formulas downward. In an examination, permissible technology may generate the values directly, but the recurrence shows what the technology is doing.

Coupled first-order systems

A coupled differential system contains differential equations in which each state variable’s rate can depend on several state variables at the same time. For example,

dxdt=f1(x,y,t),dydt=f2(x,y,t)\frac{dx}{dt}=f_1(x,y,t),\qquad \frac{dy}{dt}=f_2(x,y,t)

Euler’s method updates both variables using the same current state:

tn+1=tn+h,xn+1=xn+hf1(xn,yn,tn),yn+1=yn+hf2(xn,yn,tn),\begin{aligned} t_{n+1}&=t_n+h,\\ x_{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), \end{aligned}

Spreadsheet-style Euler updates for a coupled system.

tnt_n [s]xnx_n [arb.]yny_n [arb.]f1f_1 [arb. s1^{-1}]f2f_2 [arb. s1^{-1}]tn+1t_{n+1} [s]xn+1x_{n+1} [arb.]yn+1y_{n+1} [arb.]
0.00010.0008.0002.200-0.4000.50011.1007.800
0.50011.1007.8002.010-0.1201.00012.1057.740
1.00012.1057.7401.8860.0991.50013.0487.790
1.50013.0487.7901.8110.2732.00013.9537.926

Coupled models can describe two interacting populations, such as a consumer population and its food source. Lotka–Volterra models form a standard family of these interaction models. The same numerical method also applies to an SIR infection model, where susceptible, infectious and recovered groups are updated together.

Once the initial conditions, model, step size and rounding rules have been fixed, the Euler values are mathematically determined. Certainty about the calculated values, though, doesn’t guarantee certainty about the real system. Parameters may be estimated, assumptions may be unrealistic, and discretization introduces approximation. More advanced schemes, including Runge–Kutta methods, usually achieve greater accuracy per step by sampling rates more carefully.

5.17

PHASE PORTRAITS OF COUPLED SYSTEMS

HL

Linear systems in the phase plane

Consider the linear autonomous system

dxdt=ax+by,dydt=cx+dy,\begin{aligned} \frac{dx}{dt}&=ax+by,\\ \frac{dy}{dt}&=cx+dy, \end{aligned}

The matrix form is

dXdt=MX\frac{d\mathbf{X}}{dt}=M\mathbf{X}

The notation T{}^{\mathsf T} denotes transpose.

A phase plane is a coordinate plane with the state variables on its axes instead of time. One solution traces out a curve in this plane as time changes; this curve is called a trajectory. A phase portrait shows a collection of representative trajectories, with arrows indicating the direction of increasing time.

Because time isn’t an axis, these direction arrows matter. At any point (x,y)(x,y), the system gives the velocity vector (dx/dt,dy/dt)(dx/dt,dy/dt), which determines the local direction of travel.

An equilibrium point is a state where all rates of change are zero. Find it by solving

ax+by=0,cx+dy=0ax+by=0,\qquad cx+dy=0

The eigenvalues in the systems considered here are distinct and non-zero, making the origin the relevant isolated equilibrium. In a population model, a different translated equilibrium could represent stable population levels.

Eigenvalues and long-term behaviour

An eigenvector is a non-zero vector whose direction stays unchanged when it is multiplied by a matrix. The scalar factor by which that vector is multiplied is its eigenvalue. The relationship is

Mv=λvM\mathbf{v}=\lambda\mathbf{v}

The type and sign of the eigenvalues determine how paths behave in the future:

Eigenvalue patternPhase portrait near the originStability
Two positive real eigenvaluesPaths move outwardUnstable node
Two negative real eigenvaluesPaths move inwardStable node
Real eigenvalues of opposite signsInward in one eigendirection and outward in the otherSaddle point
Complex eigenvalues with positive real partOutward spiralUnstable spiral
Complex eigenvalues with negative real partInward spiralStable spiral
Purely imaginary eigenvaluesClosed circles or ellipsesCentre; neither inward nor outward

Positive real parts lead to motion away from the origin; negative real parts lead to motion towards it. Complex eigenvalues give spiralling paths unless the real part is zero. If the real eigenvalues have opposite signs, the result is a saddle point: an equilibrium approached along one characteristic direction and left along another.

Phase-portrait types matched to eigenvalue patterns.

Eigenvalue patternTypical phase portraitStability
Two positive real eigenvaluesTrajectories move outward along real eigendirectionsUnstable node
Two negative real eigenvaluesTrajectories move inward along real eigendirectionsStable node
Real eigenvalues of opposite signsInward on one eigendirection and outward on the otherSaddle point
Complex eigenvalues with positive real partOutward spiralUnstable spiral
Complex eigenvalues with negative real partInward spiralStable spiral
Purely imaginary eigenvaluesClosed circles or ellipsesCentre

To sketch a phase portrait, mark the equilibria first. Use the eigenvalues to determine the shape and stability, then add arrows. For real eigenvalues, draw the eigendirections accurately, since they guide the trajectories. Context also matters. In population models, for example, negative coordinates may be mathematically valid but have no meaning.

Exact solutions for distinct real eigenvalues

Exact calculation is required only when the eigenvalues are real and distinct. If they are λ1\lambda_1 and λ2\lambda_2, with corresponding eigenvectors v1\mathbf{v}_1 and v2\mathbf{v}_2, then

X(t)=C1eλ1tv1+C2eλ2tv2\mathbf{X}(t)=C_1e^{\lambda_1t}\mathbf{v}_1+C_2e^{\lambda_2t}\mathbf{v}_2

The initial conditions determine C1C_1 and C2C_2.

For a non-linear system, a Jacobian matrix provides a local linear approximation near an equilibrium and can be used to investigate its stability. This gives useful wider context, although the systems considered here are already linear.

5.18

SECOND-ORDER DIFFERENTIAL EQUATIONS

HL

Converting to a first-order system

A second-order differential equation has a second derivative as its highest derivative. Its general time-dependent form is

d2xdt2=F(x,dxdt,t)\frac{d^2x}{dt^2}=F\left(x,\frac{dx}{dt},t\right)

Now introduce the velocity variable

v=dxdtv=\frac{dx}{dt}

The original equation can then be written as the coupled first-order system

dxdt=v,dvdt=F(x,v,t).\begin{aligned} \frac{dx}{dt}&=v,\\ \frac{dv}{dt}&=F(x,v,t). \end{aligned}

Once the equation has been converted, Euler’s method for coupled equations applies directly.

For time step hh, use

Xn+1=Xn+hVn,Vn+1=Vn+hF(Xn,Vn,tn),\begin{aligned} X_{n+1}&=X_n+hV_n,\\ V_{n+1}&=V_n+hF(X_n,V_n,t_n), \end{aligned}

The values Xn+1X_{n+1} and Vn+1V_{n+1} are the next approximate position and velocity. Both updates must use the old row. A spreadsheet can generate the successive values efficiently.

Linear homogeneous equations

One common form is

d2xdt2+pdxdt+qx=0\frac{d^2x}{dt^2}+p\frac{dx}{dt}+qx=0

The same structure is often written with other constant letters, such as aa and bb.

Setting v=dx/dtv=dx/dt gives

ddt(xv)=(01qp)(xv)\frac{d}{dt} \begin{pmatrix} x\\v \end{pmatrix} = \begin{pmatrix} 0&1\\-q&-p \end{pmatrix} \begin{pmatrix} x\\v \end{pmatrix}

The equation can now be studied using the eigenvalue and phase-portrait methods for coupled systems. If the eigenvalues are distinct and real, the exact solution comes from the two corresponding eigenvectors and exponential terms. The initial position and initial velocity determine the two arbitrary constants.

Image

In the phase plane, one axis represents position and the other represents velocity. Inward trajectories show damping. Closed loops show sustained periodic motion in an idealized undamped model, while outward trajectories show growing oscillations or instability.

Second-order equations arise naturally in physical phenomena because acceleration is the second derivative of position. They can model motion with restoring forces, resistance or both. In an examination, the physical equation will be supplied. The task is to convert, approximate, solve or interpret it, rather than derive the governing law from physics.

Euler’s historical influence shows how individuals can shape mathematical knowledge. His named method turns a geometric tangent idea into a repeatable numerical procedure. However, the result doesn’t depend on authority: the recurrence can be justified, tested and improved independently of its name.

Were those notes helpful?

differentiation Differentiation