Skip to main content

Differential Equations

First Order Differential Equations

Terminology

A differential equation (DE) is an equation involving derivatives of an unknown function. A first order DE involves only the first derivative. A DE is ordinary (ODE) if all derivatives are with respect to a single variable.

The order of a DE is the highest derivative that appears. The general solution of an nn-th order DE contains nn arbitrary constants. A particular solution is obtained by imposing initial or boundary conditions.


Separable First Order Equations

Form and Method

A first order ODE is separable if it can be written in the form:

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

Equivalently:

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

Integrate both sides:

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

Worked Examples

Example. Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} with y(0)=2y(0) = 2.

Separate: ydy=xdxy\,dy = x\,dx.

ydy=xdx    y22=x22+C\int y\,dy = \int x\,dx \implies \frac{y^2}{2} = \frac{x^2}{2} + C

Apply y(0)=2y(0) = 2: 42=0+C    C=2\dfrac{4}{2} = 0 + C \implies C = 2.

y2=x2+4    y=x2+4y^2 = x^2 + 4 \implies y = \sqrt{x^2 + 4}

(We take the positive root since y(0)=2>0y(0) = 2 \gt 0.)

Example. Solve dydx=xy\dfrac{dy}{dx} = xy.

dyy=xdx    lny=x22+C    y=Aex2/2\frac{dy}{y} = x\,dx \implies \ln|y| = \frac{x^2}{2} + C \implies y = Ae^{x^2/2}

where A=±eCA = \pm e^C.

Example. Solve dydx=y+1x\dfrac{dy}{dx} = \dfrac{y + 1}{x}, x>0x \gt 0.

dyy+1=dxx    lny+1=lnx+C    y+1=eCx\frac{dy}{y + 1} = \frac{dx}{x} \implies \ln|y + 1| = \ln x + C \implies |y + 1| = e^C \cdot x

y+1=Ax    y=Ax1y + 1 = Ax \implies y = Ax - 1


First Order Linear Equations and Integrating Factors

Standard Form

A first order linear ODE has the form:

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

The Integrating Factor

Multiply through by the integrating factor:

μ(x)=exp ⁣(P(x)dx)\mu(x) = \exp\!\left(\int P(x)\,dx\right)

This transforms the equation into:

ddx[μ(x)y]=μ(x)Q(x)\frac{d}{dx}\bigl[\mu(x) \cdot y\bigr] = \mu(x) \cdot Q(x)

Integrate both sides:

y=1μ(x)μ(x)Q(x)dxy = \frac{1}{\mu(x)} \int \mu(x) \cdot Q(x)\,dx

Derivation. By the product rule:

ddx(μy)=μdydx+ydμdx\frac{d}{dx}(\mu y) = \mu\frac{dy}{dx} + y\frac{d\mu}{dx}

We need dμdx=μP(x)\dfrac{d\mu}{dx} = \mu P(x), which gives 1μdμdx=P(x)\dfrac{1}{\mu}\dfrac{d\mu}{dx} = P(x), hence μ=exp ⁣(P(x)dx)\mu = \exp\!\left(\displaystyle\int P(x)\,dx\right).

Worked Examples

Example. Solve dydx+yx=x2\dfrac{dy}{dx} + \dfrac{y}{x} = x^2, x>0x \gt 0.

Here P(x)=1xP(x) = \dfrac{1}{x}, so:

μ(x)=exp ⁣(1xdx)=elnx=x\mu(x) = \exp\!\left(\int \frac{1}{x}\,dx\right) = e^{\ln x} = x

Multiply through: xdydx+y=x3x\dfrac{dy}{dx} + y = x^3, i.e. ddx(xy)=x3\dfrac{d}{dx}(xy) = x^3.

xy=x3dx=x44+C    y=x34+Cxxy = \int x^3\,dx = \frac{x^4}{4} + C \implies y = \frac{x^3}{4} + \frac{C}{x}

Example. Solve dydx+2y=ex\dfrac{dy}{dx} + 2y = e^{-x}.

μ(x)=e2x\mu(x) = e^{2x}.

ddx(e2xy)=e2xex=ex\frac{d}{dx}\bigl(e^{2x} y\bigr) = e^{2x} \cdot e^{-x} = e^x

e2xy=ex+C    y=ex+Ce2xe^{2x} y = e^x + C \implies y = e^{-x} + Ce^{-2x}

Example. Solve dydx3y=6\dfrac{dy}{dx} - 3y = 6, given y(0)=1y(0) = 1.

μ(x)=e3x\mu(x) = e^{-3x}.

ddx(e3xy)=6e3x\frac{d}{dx}\bigl(e^{-3x} y\bigr) = 6e^{-3x}

e3xy=2e3x+C    y=2+Ce3xe^{-3x} y = -2e^{-3x} + C \implies y = -2 + Ce^{3x}

Using y(0)=1y(0) = 1: 1=2+C    C=31 = -2 + C \implies C = 3. Hence y=3e3x2y = 3e^{3x} - 2.


Second Order Homogeneous Equations

Form

ad2ydx2+bdydx+cy=0a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = 0

where a,b,ca, b, c are constants and a0a \ne 0.

The Characteristic Equation

Substitute y=eλxy = e^{\lambda x}:

aλ2+bλ+c=0a\lambda^2 + b\lambda + c = 0

This quadratic in λ\lambda is the auxiliary (or characteristic) equation.

Three Cases

Case 1: Two distinct real roots λ1λ2\lambda_1 \ne \lambda_2.

y=Aeλ1x+Beλ2xy = Ae^{\lambda_1 x} + Be^{\lambda_2 x}

Case 2: Repeated real root λ\lambda.

y=(A+Bx)eλxy = (A + Bx)e^{\lambda x}

Case 3: Complex conjugate roots λ=α±iβ\lambda = \alpha \pm i\beta.

y=eαx(Acosβx+Bsinβx)y = e^{\alpha x}\bigl(A\cos\beta x + B\sin\beta x\bigr)

Worked Examples

Example. Solve y5y+6y=0y'' - 5y' + 6y = 0.

Characteristic equation: λ25λ+6=0    (λ2)(λ3)=0\lambda^2 - 5\lambda + 6 = 0 \implies (\lambda - 2)(\lambda - 3) = 0.

Roots: λ1=2\lambda_1 = 2, λ2=3\lambda_2 = 3 (distinct real).

y=Ae2x+Be3xy = Ae^{2x} + Be^{3x}

Example. Solve y+4y+4y=0y'' + 4y' + 4y = 0.

Characteristic equation: λ2+4λ+4=0    (λ+2)2=0\lambda^2 + 4\lambda + 4 = 0 \implies (\lambda + 2)^2 = 0.

Repeated root: λ=2\lambda = -2.

y=(A+Bx)e2xy = (A + Bx)e^{-2x}

Example. Solve y+2y+5y=0y'' + 2y' + 5y = 0.

Characteristic equation: λ2+2λ+5=0\lambda^2 + 2\lambda + 5 = 0.

λ=2±4202=1±2i\lambda = \frac{-2 \pm \sqrt{4 - 20}}{2} = -1 \pm 2i

Here α=1\alpha = -1, β=2\beta = 2.

y=ex(Acos2x+Bsin2x)y = e^{-x}(A\cos 2x + B\sin 2x)

With Initial Conditions

Example. Solve yy=0y'' - y = 0 with y(0)=0y(0) = 0 and y(0)=1y'(0) = 1.

Characteristic equation: λ21=0    λ=±1\lambda^2 - 1 = 0 \implies \lambda = \pm 1.

y=Aex+Bex,y=AexBexy = Ae^x + Be^{-x}, \qquad y' = Ae^x - Be^{-x}

y(0)=A+B=0    B=Ay(0) = A + B = 0 \implies B = -A. y(0)=AB=1    2A=1    A=12y'(0) = A - B = 1 \implies 2A = 1 \implies A = \dfrac{1}{2}.

y=12ex12ex=sinhxy = \frac{1}{2}e^x - \frac{1}{2}e^{-x} = \sinh x


Applications

Exponential Growth and Decay

The DE dNdt=kN\dfrac{dN}{dt} = kN has the general solution N=N0ektN = N_0 e^{kt}.

  • Growth: k>0k \gt 0 (e.g. population, compound interest).
  • Decay: k<0k \lt 0 (e.g. radioactive decay, cooling).

Half-life. For radioactive decay, N=N0eλtN = N_0 e^{-\lambda t} where λ>0\lambda \gt 0 is the decay constant. The half-life t1/2t_{1/2} satisfies:

N0eλt1/2=N02    t1/2=ln2λN_0 e^{-\lambda t_{1/2}} = \frac{N_0}{2} \implies t_{1/2} = \frac{\ln 2}{\lambda}

Example. A substance has a half-life of 55 years. How long until only 10%10\% remains?

λ=ln25\lambda = \frac{\ln 2}{5}

0.1N0=N0eλt    λt=ln0.1    t=ln10ln2516.6years0.1N_0 = N_0 e^{-\lambda t} \implies -\lambda t = \ln 0.1 \implies t = \frac{\ln 10}{\ln 2} \cdot 5 \approx 16.6\,\mathrm{years}

Newton's Law of Cooling

dTdt=k(TTenv)\frac{dT}{dt} = -k(T - T_{\mathrm{env}})

where TT is the temperature of the object, TenvT_{\mathrm{env}} is the ambient temperature, and k>0k \gt 0.

Solution: T(t)=Tenv+(T0Tenv)ektT(t) = T_{\mathrm{env}} + (T_0 - T_{\mathrm{env}})e^{-kt}.

Example. A body at 90C90\,{}^{\circ}\mathrm{C} is placed in a room at 20C20\,{}^{\circ}\mathrm{C}. After 1010 minutes, its temperature is 60C60\,{}^{\circ}\mathrm{C}. Find its temperature after 3030 minutes.

60=20+70e10k    e10k=4070=4760 = 20 + 70e^{-10k} \implies e^{-10k} = \frac{40}{70} = \frac{4}{7}

T(30)=20+70(47)3=20+7064343=20+448034333.1CT(30) = 20 + 70\left(\frac{4}{7}\right)^3 = 20 + 70 \cdot \frac{64}{343} = 20 + \frac{4480}{343} \approx 33.1\,{}^{\circ}\mathrm{C}

Simple Harmonic Motion (SHM)

The equation of SHM is:

d2xdt2=ω2x\frac{d^2x}{dt^2} = -\omega^2 x

Characteristic equation: λ2+ω2=0    λ=±iω\lambda^2 + \omega^2 = 0 \implies \lambda = \pm i\omega.

x(t)=Acosωt+Bsinωtx(t) = A\cos\omega t + B\sin\omega t

This can also be written as x(t)=Rcos(ωt+ϕ)x(t) = R\cos(\omega t + \phi) where R=A2+B2R = \sqrt{A^2 + B^2} and ϕ=arctan ⁣(BA)\phi = \arctan\!\left(-\dfrac{B}{A}\right).

Key quantities:

QuantityFormula
AmplitudeR=A2+B2R = \sqrt{A^2 + B^2}
PeriodT=2πωT = \dfrac{2\pi}{\omega}
Frequencyf=1T=ω2πf = \dfrac{1}{T} = \dfrac{\omega}{2\pi}
Angular frequencyω=2πf\omega = 2\pi f
Maximum velocityvmax=Rωv_{\max} = R\omega
Maximum accelerationamax=Rω2a_{\max} = R\omega^2

Example. A particle moves with SHM. At t=0t = 0, x=3x = 3 and v=4v = 4. The angular frequency is ω=2\omega = 2. Find x(t)x(t).

x=Acos2t+Bsin2t,v=2Asin2t+2Bcos2tx = A\cos 2t + B\sin 2t, \qquad v = -2A\sin 2t + 2B\cos 2t

x(0)=A=3x(0) = A = 3, v(0)=2B=4    B=2v(0) = 2B = 4 \implies B = 2.

x(t)=3cos2t+2sin2tx(t) = 3\cos 2t + 2\sin 2t

Amplitude: R=9+4=13R = \sqrt{9 + 4} = \sqrt{13}.

Damped Oscillations

With damping proportional to velocity:

d2xdt2+2γdxdt+ω02x=0\frac{d^2x}{dt^2} + 2\gamma\frac{dx}{dt} + \omega_0^2\, x = 0

where γ\gamma is the damping coefficient and ω0\omega_0 is the natural frequency.

Characteristic equation: λ2+2γλ+ω02=0\lambda^2 + 2\gamma\lambda + \omega_0^2 = 0.

λ=γ±γ2ω02\lambda = -\gamma \pm \sqrt{\gamma^2 - \omega_0^2}

ConditionType of dampingSolution
γ2>ω02\gamma^2 \gt \omega_0^2OverdampedTwo distinct real roots: exponentials
γ2=ω02\gamma^2 = \omega_0^2Critically dampedRepeated root: (A+Bt)eγt(A + Bt)e^{-\gamma t}
γ2<ω02\gamma^2 \lt \omega_0^2Underdampedλ=γ±iωd\lambda = -\gamma \pm i\omega_d: decaying oscillation

where ωd=ω02γ2\omega_d = \sqrt{\omega_0^2 - \gamma^2} is the damped frequency.

Mechanics Applications

Example. A particle of mass mm falls under gravity with air resistance proportional to velocity. Find the velocity as a function of time.

Taking downward as positive, with drag force kv-kv:

mdvdt=mgkvm\frac{dv}{dt} = mg - kv

dvdt+kmv=g\frac{dv}{dt} + \frac{k}{m}v = g

Integrating factor: μ=ekt/m\mu = e^{kt/m}.

ddt ⁣(vekt/m)=gekt/m\frac{d}{dt}\!\left(ve^{kt/m}\right) = ge^{kt/m}

v=mgk+Cekt/mv = \frac{mg}{k} + Ce^{-kt/m}

If v(0)=0v(0) = 0: C=mgkC = -\dfrac{mg}{k}, giving v=mgk ⁣(1ekt/m)v = \dfrac{mg}{k}\!\left(1 - e^{-kt/m}\right).

The terminal velocity is vT=mgkv_T = \dfrac{mg}{k} (as tt \to \infty).


Numerical Methods

Euler's Method

For the initial value problem dydx=f(x,y)\dfrac{dy}{dx} = f(x, y) with y(x0)=y0y(x_0) = y_0, Euler's method generates approximate values using:

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

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

where hh is the step size.

Algorithm:

  1. Set x0,y0x_0, y_0 from the initial condition.
  2. For each step n=0,1,2,n = 0, 1, 2, \ldots:
    • Compute the slope: mn=f(xn,yn)m_n = f(x_n, y_n).
    • Update: yn+1=yn+hmny_{n+1} = y_n + h \cdot m_n.
    • Advance: xn+1=xn+hx_{n+1} = x_n + h.

Example. Use Euler's method with h=0.1h = 0.1 to approximate y(0.5)y(0.5) for dydx=x+y\dfrac{dy}{dx} = x + y, y(0)=1y(0) = 1.

nnxnx_nyny_nf(xn,yn)=xn+ynf(x_n, y_n) = x_n + y_n
00.01.0001.000
10.11.1001.200
20.21.2201.420
30.31.3621.662
40.41.5281.928
50.51.721

Euler's approximation: y(0.5)1.721y(0.5) \approx 1.721.

Exact solution. This is a linear DE: yy=xy' - y = x. Integrating factor exe^{-x}:

ddx(yex)=xex\frac{d}{dx}(ye^{-x}) = xe^{-x}

Integrating by parts: yex=(x+1)ex+Cye^{-x} = -(x+1)e^{-x} + C. With y(0)=1y(0) = 1: C=2C = 2.

y=2exx1y = 2e^x - x - 1

At x=0.5x = 0.5: y=2e0.51.51.797y = 2e^{0.5} - 1.5 \approx 1.797.

The Euler approximation of 1.7211.721 underestimates the true value by about 0.0760.076, a relative error of roughly 4.2%4.2\%.

Error Analysis

Euler's method has local truncation error proportional to h2h^2 and global error proportional to hh. Halving the step size approximately halves the global error.

Improved Euler Method (Heun's Method)

A more accurate variant uses the average of the slopes at the beginning and end of each step:

k1=f(xn,yn)k_1 = f(x_n, y_n) k2=f(xn+h,yn+hk1)k_2 = f(x_n + h, y_n + hk_1) yn+1=yn+h2(k1+k2)y_{n+1} = y_n + \frac{h}{2}(k_1 + k_2)

This is a second order method with global error proportional to h2h^2, offering significantly better accuracy than the basic Euler method for the same step size.

warning

warning

Euler's method can produce wildly inaccurate results for stiff equations or when the step size is too large. Always check whether the approximation is reasonable by comparing with qualitative behaviour of the DE (equilibrium, asymptotes, periodicity).


Additional Worked Examples

Worked Example: Separable Equation with Partial Fractions

Solve dydx=y21x\dfrac{dy}{dx} = \dfrac{y^2 - 1}{x} with y(1)=2y(1) = 2, x>0x \gt 0.

Solution

Separate variables:

dyy21=dxx\frac{dy}{y^2 - 1} = \frac{dx}{x}

Apply partial fractions to the left side: 1y21=12(y1)12(y+1)\dfrac{1}{y^2 - 1} = \dfrac{1}{2(y-1)} - \dfrac{1}{2(y+1)}.

12(y1)12(y+1)dy=dxx\int \frac{1}{2(y-1)} - \frac{1}{2(y+1)}\,dy = \int \frac{dx}{x}

12lny112lny+1=lnx+C\frac{1}{2}\ln|y-1| - \frac{1}{2}\ln|y+1| = \ln x + C

lny1y+1=2lnx+2C=ln(x2)+2C\ln\left|\frac{y-1}{y+1}\right| = 2\ln x + 2C = \ln(x^2) + 2C

y1y+1=e2Cx2=Ax2\left|\frac{y-1}{y+1}\right| = e^{2C} x^2 = Ax^2

where A=e2C>0A = e^{2C} \gt 0.

Apply y(1)=2y(1) = 2: 13=A1    A=13\dfrac{1}{3} = A \cdot 1 \implies A = \dfrac{1}{3}.

Since y(1)=2>1y(1) = 2 \gt 1, the numerator y1y - 1 is positive initially. For x>0x \gt 0 near 11:

y1y+1=x23\frac{y-1}{y+1} = \frac{x^2}{3}

3(y1)=x2(y+1)    3y3=x2y+x2    y(3x2)=3+x23(y - 1) = x^2(y + 1) \implies 3y - 3 = x^2 y + x^2 \implies y(3 - x^2) = 3 + x^2

y=3+x23x2y = \frac{3 + x^2}{3 - x^2}

This is valid for 0<x<30 \lt x \lt \sqrt{3}.

Worked Example: Integrating Factor with Trigonometric Coefficients

Solve dydx+ytanx=cosx\dfrac{dy}{dx} + y\tan x = \cos x for π2<x<π2-\dfrac{\pi}{2} \lt x \lt \dfrac{\pi}{2}.

Solution

Here P(x)=tanxP(x) = \tan x, so:

μ(x)=exp ⁣(tanxdx)=exp(lncosx)=1cosx=secx\mu(x) = \exp\!\left(\int \tan x\,dx\right) = \exp(-\ln|\cos x|) = \frac{1}{\cos x} = \sec x

Multiply through: secxdydx+ysecxtanx=secxcosx=1\sec x \dfrac{dy}{dx} + y\sec x \tan x = \sec x \cos x = 1.

The left side is ddx(ysecx)\dfrac{d}{dx}(y \sec x), so:

ddx(ysecx)=1    ysecx=x+C\frac{d}{dx}(y \sec x) = 1 \implies y \sec x = x + C

y=(x+C)cosxy = (x + C)\cos x

Worked Example: Second Order with Complex Roots and Initial Conditions

Solve y4y+13y=0y'' - 4y' + 13y = 0 with y(0)=1y(0) = 1 and y(0)=6y'(0) = 6.

Solution

Characteristic equation: λ24λ+13=0\lambda^2 - 4\lambda + 13 = 0.

λ=4±16522=4±362=2±3i\lambda = \frac{4 \pm \sqrt{16 - 52}}{2} = \frac{4 \pm \sqrt{-36}}{2} = 2 \pm 3i

General solution: y=e2x(Acos3x+Bsin3x)y = e^{2x}(A\cos 3x + B\sin 3x).

Compute yy':

y=2e2x(Acos3x+Bsin3x)+e2x(3Asin3x+3Bcos3x)y' = 2e^{2x}(A\cos 3x + B\sin 3x) + e^{2x}(-3A\sin 3x + 3B\cos 3x)

y=e2x[(2A+3B)cos3x+(2B3A)sin3x]y' = e^{2x}\bigl[(2A + 3B)\cos 3x + (2B - 3A)\sin 3x\bigr]

Apply y(0)=1y(0) = 1: A=1A = 1.

Apply y(0)=6y'(0) = 6: 2(1)+3B=6    3B=4    B=432(1) + 3B = 6 \implies 3B = 4 \implies B = \dfrac{4}{3}.

y=e2x ⁣(cos3x+43sin3x)y = e^{2x}\!\left(\cos 3x + \frac{4}{3}\sin 3x\right)

Worked Example: Newton's Law of Cooling with Two Data Points

A cup of coffee at 85C85\,{}^{\circ}\mathrm{C} is placed in a room at 22C22\,{}^{\circ}\mathrm{C}. After 55 minutes the temperature is 70C70\,{}^{\circ}\mathrm{C}, and after 1010 minutes it is 60C60\,{}^{\circ}\mathrm{C}. Find the temperature after 2020 minutes.

Solution

The model is T(t)=22+(8522)ekt=22+63ektT(t) = 22 + (85 - 22)e^{-kt} = 22 + 63e^{-kt}.

From the first data point: 70=22+63e5k    e5k=4863=162170 = 22 + 63e^{-5k} \implies e^{-5k} = \dfrac{48}{63} = \dfrac{16}{21}.

From the second data point: 60=22+63e10k    e10k=386360 = 22 + 63e^{-10k} \implies e^{-10k} = \dfrac{38}{63}.

Check consistency: (1621)2=2564410.5805\left(\dfrac{16}{21}\right)^2 = \dfrac{256}{441} \approx 0.5805, and 38630.6032\dfrac{38}{63} \approx 0.6032. These are close but not exactly equal, indicating measurement imprecision. Using the 1010-minute data point:

e10k=3863    10k=ln ⁣(3863)    k=110ln ⁣(6338)0.0506e^{-10k} = \frac{38}{63} \implies -10k = \ln\!\left(\frac{38}{63}\right) \implies k = \frac{1}{10}\ln\!\left(\frac{63}{38}\right) \approx 0.0506

T(20)=22+63(3863)2=22+14446322+22.92=44.9CT(20) = 22 + 63\left(\frac{38}{63}\right)^2 = 22 + \frac{1444}{63} \approx 22 + 22.92 = 44.9\,{}^{\circ}\mathrm{C}

Worked Example: Euler's Method with Small Step Size

Use Euler's method with h=0.05h = 0.05 to approximate y(0.3)y(0.3) for dydx=xy\dfrac{dy}{dx} = x - y, y(0)=2y(0) = 2.

Solution
nnxnx_nyny_nf(xn,yn)=xnynf(x_n, y_n) = x_n - y_n
00.002.00002.0000-2.0000
10.051.90001.8500-1.8500
20.101.80751.7075-1.7075
30.151.72211.5721-1.5721
40.201.64351.4435-1.4435
50.251.57131.3213-1.3213
60.301.5053

Euler approximation: y(0.3)1.505y(0.3) \approx 1.505.

The exact solution (integrating factor): y+y=xy' + y = x, μ=ex\mu = e^x.

ddx(yex)=xex    yex=(x1)ex+C\frac{d}{dx}(ye^x) = xe^x \implies ye^x = (x - 1)e^x + C

With y(0)=2y(0) = 2: C=3C = 3. So y=x1+3exy = x - 1 + 3e^{-x}.

At x=0.3x = 0.3: y=0.7+3e0.30.7+3(0.7408)=0.7+2.2225=1.522y = -0.7 + 3e^{-0.3} \approx -0.7 + 3(0.7408) = -0.7 + 2.2225 = 1.522.

Error: 1.5221.5050.017|1.522 - 1.505| \approx 0.017, roughly 1.1%1.1\%.


Common Pitfalls

  1. Forgetting the constant of integration. When solving a separable equation, each side of the separated equation produces its own constant. These combine into a single constant CC, but omitting it entirely loses the generality of the solution.

  2. Losing solutions during separation. Dividing by g(y)g(y) implicitly assumes g(y)0g(y) \ne 0. The equilibrium solution g(y)=0g(y) = 0 must be checked separately. For example, in dydx=y2\dfrac{dy}{dx} = y^2, dividing by y2y^2 loses the solution y=0y = 0.

  3. Incorrect sign in the integrating factor. The standard form is dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x). If the equation is dydx=P(x)y+Q(x)\dfrac{dy}{dx} = P(x)y + Q(x), you must rewrite it as dydxP(x)y=Q(x)\dfrac{dy}{dx} - P(x)y = Q(x) before computing μ=eP(x)dx\mu = e^{\int -P(x)\,dx}.

  4. Misidentifying the discriminant for second order equations. For aλ2+bλ+c=0a\lambda^2 + b\lambda + c = 0, the discriminant is Δ=b24ac\Delta = b^2 - 4ac. If Δ=0\Delta = 0, the repeated root gives (A+Bx)eλx(A + Bx)e^{\lambda x}, not AeλxAe^{\lambda x}.

  5. Confusing the damping cases. In the damped oscillation equation x¨+2γx˙+ω02x=0\ddot{x} + 2\gamma\dot{x} + \omega_0^2 x = 0, it is γ2\gamma^2 that is compared with ω02\omega_0^2. A common error is to compare γ\gamma with ω0\omega_0 directly.

  6. Euler's method sign errors. The update formula is yn+1=yn+hf(xn,yn)y_{n+1} = y_n + h \cdot f(x_n, y_n). A negative sign in ff does not change the formula; it only affects the value of the slope f(xn,yn)f(x_n, y_n) at each step.

  7. Applying initial conditions prematurely. Apply the initial condition only after finding the general solution with the constant CC. Applying it during the separation or integration step leads to incorrect particular solutions.

  8. Ignoring the domain of the solution. Solutions to DEs may only be valid on specific intervals. For example, y=3+x23x2y = \dfrac{3 + x^2}{3 - x^2} blows up at x=3x = \sqrt{3}. Always state the domain on which the solution is defined.


Exam-Style Problems

  1. Solve dydx=ex+yex+1\dfrac{dy}{dx} = \dfrac{e^{x+y}}{e^x + 1} given y(0)=ln3y(0) = \ln 3.

  2. Solve dydx+2yx=x3\dfrac{dy}{dx} + \dfrac{2y}{x} = x^3 for x>0x \gt 0, given y(1)=0y(1) = 0.

  3. Find the general solution of y+6y+9y=0y'' + 6y' + 9y = 0 and identify the type of damping.

  4. A radioactive isotope has a half-life of 88 days. A sample initially contains 200g200\,\mathrm{g}. How long until only 12.5g12.5\,\mathrm{g} remain? Give your answer to the nearest day.

  5. Use Euler's method with h=0.25h = 0.25 to estimate y(1)y(1) for dydx=2xy\dfrac{dy}{dx} = 2x - y, y(0)=0y(0) = 0. Find the exact solution and compute the percentage error.

  6. A particle of mass 2kg2\,\mathrm{kg} falls from rest under gravity with air resistance equal to 0.5v0.5v (where vv is the velocity in m/s\mathrm{m/s}). Find the terminal velocity and the time taken to reach 90%90\% of terminal velocity. Take g=9.8m/s2g = 9.8\,\mathrm{m/s}^2.

  7. Solve dydx=x2+12y\dfrac{dy}{dx} = \dfrac{x^2 + 1}{2y} with y(0)=2y(0) = 2. Find the value of yy when x=2x = 2.

  8. The temperature of an object follows Newton's law of cooling. It cools from 95C95\,{}^{\circ}\mathrm{C} to 75C75\,{}^{\circ}\mathrm{C} in 1515 minutes in a room at 20C20\,{}^{\circ}\mathrm{C}. How long does it take to cool from 95C95\,{}^{\circ}\mathrm{C} to 30C30\,{}^{\circ}\mathrm{C}?


Cross-References

For the A-Level Further Maths treatment of this topic, see Differential Equations.


tip

tip Ready to test your understanding of Differential Equations? The diagnostic test contains the hardest questions within the IB specification for this topic, each with a full worked solution.

Unit tests probe edge cases and common misconceptions. Integration tests combine Differential Equations with other IB mathematics topics to test synthesis under exam conditions.

See Diagnostic Guide for instructions on self-marking and building a personal test matrix.