Skip to main content

Differential Equations

Differential Equations

Differential equations are equations involving derivatives of an unknown function. They arise naturally whenever a rate of change is related to the current state of a system — from population growth to electrical circuits. This chapter covers first-order equations (separable and integrating factor methods), second-order linear equations with constant coefficients, and modelling applications.

Slope Field Explorer

Adjust the parameters in the graph above to explore the relationships between variables.

Board Coverage

BoardPaperNotes
AQAPaper 1First-order (separable, integrating factor), growth/decay models
EdexcelFP2First-order + second-order linear with constant coefficients
OCR (A)Paper 1First-order + second-order linear with constant coefficients
CIEP2First-order (separable, integrating factor); second-order in P2
All boards examine first-order ODEs. CIE and Edexcel require second-order linear ODEs. AQA

focuses on first-order equations with growth and decay modelling. The formula booklet gives the integrating factor formula on Edexcel; AQA and OCR students must know it. :::


1. First-Order ODEs: Separable Equations

1.1 Definition

Definition. A first-order ordinary differential equation (ODE) is separable if it can be written in the form

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

where the right-hand side is a product of a function of xx alone and a function of yy alone.

1.2 Method

Separate the variables and integrate both sides:

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

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

1.3 Worked example

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

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

Integrate: y22=x22+C\dfrac{y^2}{2} = \dfrac{x^2}{2} + C.

Using 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, \quad y = \sqrt{x^2 + 4}

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

1.4 Domain restrictions

When dividing by g(y)g(y) during separation, we implicitly assume g(y)0g(y) \neq 0. If

g(y0)=0g(y_0) = 0, then y=y0y = y_0 is a constant (equilibrium) solution that may not appear in the general solution. Always check for these. :::

Example. dydx=y(1y)\dfrac{dy}{dx} = y(1-y).

Separating: 1y(1y)dy=dx\displaystyle\int\frac{1}{y(1-y)}\,dy = \int dx.

Partial fractions: 1y(1y)=1y+11y\dfrac{1}{y(1-y)} = \dfrac{1}{y} + \dfrac{1}{1-y}.

lnyln1y=x+C\ln|y| - \ln|1-y| = x + C.

lny1y=x+C\ln\left|\dfrac{y}{1-y}\right| = x + C.

y1y=Aex\dfrac{y}{1-y} = Ae^x where A=±eCA = \pm e^C.

y=Aex1+Aex\boxed{y = \frac{Ae^x}{1 + Ae^x}}

But note y=0y = 0 and y=1y = 1 are also solutions (equilibrium solutions), corresponding to A=0A = 0 and the limiting case AA \to \infty.


2. First-Order ODEs: Integrating Factor Method

2.1 Standard form

Definition. A first-order linear ODE has the form

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

where P(x)P(x) and Q(x)Q(x) are continuous functions of xx.

2.2 The integrating factor

The integrating factor is

μ(x)=eP(x)dx\boxed{\mu(x) = e^{\int P(x)\,dx}}

2.3 Derivation of the method

Proof of the integrating factor technique

Multiply the ODE dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)\,y = Q(x) by μ(x)\mu(x):

μdydx+μPy=μQ\mu\frac{dy}{dx} + \mu P\,y = \mu Q

The left-hand side is the derivative of μy\mu y because:

ddx(μy)=μdydx+yLBdμRB◆◆LBdxRB\frac{d}{dx}(\mu y) = \mu\frac{dy}{dx} + y\frac◆LB◆d\mu◆RB◆◆LB◆dx◆RB◆

Since LBdμRB◆◆LBdxRB=μP(x)\dfrac◆LB◆d\mu◆RB◆◆LB◆dx◆RB◆ = \mu \cdot P(x) (because μ=ePdx\mu = e^{\int P\,dx}, so μ=PePdx=Pμ\mu' = P \cdot e^{\int P\,dx} = P\mu):

ddx(μy)=μdydx+yPμ=μdydx+μPy\frac{d}{dx}(\mu y) = \mu\frac{dy}{dx} + y \cdot P\mu = \mu\frac{dy}{dx} + \mu P\,y

This is exactly the left-hand side. Therefore:

ddx(μy)=μQ\frac{d}{dx}(\mu y) = \mu Q

Integrating both sides:

μy=μQdx+C\boxed{\mu y = \int \mu Q\,dx + C}

y=LB1RB◆◆LBμRB(μQdx+C)\boxed{y = \frac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\left(\int \mu\, Q\,dx + C\right)}

\square

2.4 Worked example

Solve dydx+2xy=x2\dfrac{dy}{dx} + \dfrac{2}{x}\,y = x^2 for x>0x > 0.

Here P(x)=2xP(x) = \dfrac{2}{x}, Q(x)=x2Q(x) = x^2.

μ=e2/xdx=e2lnx=x2\mu = e^{\int 2/x\,dx} = e^{2\ln x} = x^2

Multiply through: x2dydx+2xy=x4x^2\dfrac{dy}{dx} + 2xy = x^4.

Left-hand side is ddx(x2y)=x4\dfrac{d}{dx}(x^2 y) = x^4.

Integrate: x2y=x55+Cx^2 y = \dfrac{x^5}{5} + C.

y=x35+Cx2\boxed{y = \frac{x^3}{5} + \frac{C}{x^2}}

2.5 Worked example with boundary condition

Solve dydx3y=e2x\dfrac{dy}{dx} - 3y = e^{2x}, given y(0)=1y(0) = 1.

P(x)=3P(x) = -3, Q(x)=e2xQ(x) = e^{2x}.

μ=e3dx=e3x\mu = e^{\int -3\,dx} = e^{-3x}

ddx(e3xy)=e3xe2x=ex\frac{d}{dx}(e^{-3x}y) = e^{-3x} \cdot e^{2x} = e^{-x}

e3xy=exdx=ex+Ce^{-3x}y = \int e^{-x}\,dx = -e^{-x} + C

y=e2x+Ce3xy = -e^{2x} + Ce^{3x}

Using y(0)=1y(0) = 1: 1=1+C    C=21 = -1 + C \implies C = 2.

y=2e3xe2x\boxed{y = 2e^{3x} - e^{2x}}

The constant of integration in μ=ePdx\mu = e^{\int P\,dx} can be omitted (absorbed into CC).

Always choose the simplest antiderivative. :::


3. Second-Order Linear ODEs with Constant Coefficients

3.1 General form

Definition. A second-order linear ODE with constant coefficients has the form

ad2ydx2+bdydx+cy=f(x)a\frac{d^2y}{dx^2} + b\frac{dy}{dx} + cy = f(x)

where aa, bb, cc are constants with a0a \neq 0.

The equation is homogeneous when f(x)=0f(x) = 0:

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

3.2 The auxiliary equation

To solve the homogeneous equation, try y=emxy = e^{mx}. Then y=memxy' = me^{mx} and y=m2emxy'' = m^2 e^{mx}.

Substituting: am2emx+bmemx+cemx=0am^2 e^{mx} + bme^{mx} + ce^{mx} = 0.

Since emx0e^{mx} \neq 0 for all xx:

am2+bm+c=0\boxed{am^2 + bm + c = 0}

This is the auxiliary equation (or characteristic equation).

3.3 Three cases

The nature of the roots of am2+bm+c=0am^2 + bm + c = 0 determines the form of the general solution.

Case 1: Two distinct real roots m1m2m_1 \neq m_2 (discriminant Δ=b24ac>0\Delta = b^2 - 4ac > 0):

y=Aem1x+Bem2x\boxed{y = Ae^{m_1 x} + Be^{m_2 x}}

Case 2: Repeated real root mm (discriminant Δ=0\Delta = 0):

y=(A+Bx)emx\boxed{y = (A + Bx)e^{mx}}

Case 3: Complex conjugate roots m=α±βim = \alpha \pm \beta i (discriminant Δ<0\Delta < 0):

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

Proof of the general solution for Case 3 (complex roots)

When m=α+βim = \alpha + \beta i and m=αβi\overline{m} = \alpha - \beta i, the two linearly independent solutions are e(α+βi)xe^{(\alpha+\beta i)x} and e(αβi)xe^{(\alpha-\beta i)x}.

Using Euler's formula eiθ=cosθ+isinθe^{i\theta} = \cos\theta + i\sin\theta:

e(α+βi)x=eαx(cosβx+isinβx)e^{(\alpha+\beta i)x} = e^{\alpha x}(\cos\beta x + i\sin\beta x) e(αβi)x=eαx(cosβxisinβx)e^{(\alpha-\beta i)x} = e^{\alpha x}(\cos\beta x - i\sin\beta x)

Any linear combination C1e(α+βi)x+C2e(αβi)xC_1 e^{(\alpha+\beta i)x} + C_2 e^{(\alpha-\beta i)x} can be rewritten as:

eαx[(C1+C2)cosβx+i(C1C2)sinβx]e^{\alpha x}\left[(C_1+C_2)\cos\beta x + i(C_1-C_2)\sin\beta x\right]

Setting A=C1+C2A = C_1 + C_2 and B=i(C1C2)B = i(C_1 - C_2) (which are real when C1C_1 and C2C_2 are complex conjugates), we obtain:

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

\square

3.4 Worked examples

Example (Case 1). Solve y5y+6y=0y'' - 5y' + 6y = 0.

Auxiliary: m25m+6=0    (m2)(m3)=0    m=2,3m^2 - 5m + 6 = 0 \implies (m-2)(m-3) = 0 \implies m = 2, 3.

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

Example (Case 2). Solve y4y+4y=0y'' - 4y' + 4y = 0.

Auxiliary: m24m+4=0    (m2)2=0    m=2m^2 - 4m + 4 = 0 \implies (m-2)^2 = 0 \implies m = 2 (repeated).

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

Example (Case 3). Solve y+2y+5y=0y'' + 2y' + 5y = 0.

Auxiliary: m2+2m+5=0    m=LB2±420RB◆◆LB2RB=1±2im^2 + 2m + 5 = 0 \implies m = \dfrac◆LB◆-2 \pm \sqrt{4-20}◆RB◆◆LB◆2◆RB◆ = -1 \pm 2i.

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


4. Non-Homogeneous Second-Order ODEs: Particular Solutions

4.1 Structure of the general solution

Theorem (Superposition). If yhy_h is the general solution of the homogeneous equation ay+by+cy=0a y'' + by' + cy = 0 (the complementary function, CF), and ypy_p is any particular solution of ay+by+cy=f(x)a y'' + by' + cy = f(x) (a particular integral, PI), then the general solution is

y=yh+yp\boxed{y = y_h + y_p}

Proof of the superposition principle

Let y1y_1 satisfy ay1+by1+cy1=0a y_1'' + by_1' + cy_1 = 0 and ypy_p satisfy ayp+byp+cyp=f(x)a y_p'' + by_p' + cy_p = f(x).

Define y=y1+ypy = y_1 + y_p. Then:

ay+by+cy=a(y1+yp)+b(y1+yp)+c(y1+yp)ay'' + by' + cy = a(y_1'' + y_p'') + b(y_1' + y_p') + c(y_1 + y_p)

=(ay1+by1+cy1)+(ayp+byp+cyp)=0+f(x)=f(x)= (ay_1'' + by_1' + cy_1) + (ay_p'' + by_p' + cy_p) = 0 + f(x) = f(x)

So y1+ypy_1 + y_p satisfies the non-homogeneous equation. Since y1y_1 contains two arbitrary constants, the general solution y=yh+ypy = y_h + y_p also contains two arbitrary constants. \square

4.2 Method of undetermined coefficients

To find ypy_p, guess the form based on f(x)f(x), then determine coefficients by substitution.

f(x)f(x)Trial ypy_p (if not in CF)If in CF, multiply by xx
kk (constant)cccxcx then cx2cx^2
kx+kx + \ellpx+qpx + qx(px+q)x(px+q) then x2(px+q)x^2(px+q)
keαxke^{\alpha x}ceαxce^{\alpha x}cxeαxcxe^{\alpha x}
kcosωxk\cos\omega xccosωx+dsinωxc\cos\omega x + d\sin\omega xx(ccosωx+dsinωx)x(c\cos\omega x + d\sin\omega x)
ksinωxk\sin\omega xccosωx+dsinωxc\cos\omega x + d\sin\omega xx(ccosωx+dsinωx)x(c\cos\omega x + d\sin\omega x)
PolynomialGeneral polynomial of same degreeMultiply by xx as needed
If any term in your trial ypy_p already appears in the complementary function yhy_h,

multiply the entire trial by xx. If it still appears, multiply by x2x^2. :::

4.3 Worked examples

Example 1. Solve y3y+2y=4e3xy'' - 3y' + 2y = 4e^{3x}.

CF: m23m+2=0    (m1)(m2)=0    m=1,2m^2 - 3m + 2 = 0 \implies (m-1)(m-2) = 0 \implies m = 1, 2. yh=Aex+Be2xy_h = Ae^x + Be^{2x}.

PI: Since f(x)=4e3xf(x) = 4e^{3x} and e3xe^{3x} is not in the CF, try yp=ce3xy_p = ce^{3x}. yp=3ce3xy_p' = 3ce^{3x}, yp=9ce3xy_p'' = 9ce^{3x}.

Substitute: 9ce3x9ce3x+2ce3x=4e3x    2c=4    c=29ce^{3x} - 9ce^{3x} + 2ce^{3x} = 4e^{3x} \implies 2c = 4 \implies c = 2.

y=Aex+Be2x+2e3x\boxed{y = Ae^x + Be^{2x} + 2e^{3x}}

Example 2. Solve y+y=sinxy'' + y = \sin x.

CF: m2+1=0    m=±im^2 + 1 = 0 \implies m = \pm i. yh=Acosx+Bsinxy_h = A\cos x + B\sin x.

PI: f(x)=sinxf(x) = \sin x. The terms cosx\cos x and sinx\sin x are in the CF, so multiply by xx: yp=x(ccosx+dsinx)y_p = x(c\cos x + d\sin x).

yp=(ccosx+dsinx)+x(csinx+dcosx)y_p' = (c\cos x + d\sin x) + x(-c\sin x + d\cos x) yp=2(csinx+dcosx)+x(ccosxdsinx)y_p'' = 2(-c\sin x + d\cos x) + x(-c\cos x - d\sin x)

Substitute into y+y=sinxy'' + y = \sin x:

2(csinx+dcosx)+x(ccosxdsinx)+x(ccosx+dsinx)=sinx2(-c\sin x + d\cos x) + x(-c\cos x - d\sin x) + x(c\cos x + d\sin x) = \sin x

2(csinx+dcosx)=sinx2(-c\sin x + d\cos x) = \sin x

Comparing: 2c=1    c=12-2c = 1 \implies c = -\dfrac{1}{2}, and 2d=0    d=02d = 0 \implies d = 0.

y=Acosx+Bsinx12xcosx\boxed{y = A\cos x + B\sin x - \frac{1}{2}x\cos x}

Example 3. Solve y4y+4y=3x+2y'' - 4y' + 4y = 3x + 2.

CF: m24m+4=0    (m2)2=0m^2 - 4m + 4 = 0 \implies (m-2)^2 = 0. yh=(A+Bx)e2xy_h = (A + Bx)e^{2x}.

PI: Try yp=px+qy_p = px + q. yp=py_p' = p, yp=0y_p'' = 0.

04p+4(px+q)=3x+20 - 4p + 4(px + q) = 3x + 2. 4px+(4q4p)=3x+24px + (4q - 4p) = 3x + 2.

4p=3    p=344p = 3 \implies p = \dfrac{3}{4}. 4q3=2    q=544q - 3 = 2 \implies q = \dfrac{5}{4}.

y=(A+Bx)e2x+34x+54\boxed{y = (A + Bx)e^{2x} + \frac{3}{4}x + \frac{5}{4}}


5. Growth and Decay Models

5.1 Exponential growth and decay

The ODE dydt=ky\dfrac{dy}{dt} = ky (where kk is a constant) has solution

y=y0ekt\boxed{y = y_0 e^{kt}}

where y0=y(0)y_0 = y(0). If k>0k > 0: exponential growth. If k<0k < 0: exponential decay.

Proof. Separable: 1ydydt=k    1ydy=kdt    lny=kt+C\dfrac{1}{y}\dfrac{dy}{dt} = k \implies \displaystyle\int \frac{1}{y}\,dy = \int k\,dt \implies \ln y = kt + C.

y=ekt+C=Aekty = e^{kt+C} = Ae^{kt}. With y(0)=y0y(0) = y_0: A=y0A = y_0. \square

5.2 Newton's law of cooling

Definition. Newton's law of cooling states that the rate of temperature change of a body is proportional to the difference between its temperature TT and the ambient temperature TaT_a:

dTdt=k(TTa)\frac{dT}{dt} = -k(T - T_a)

where k>0k > 0 is the cooling constant.

Solution. Let θ=TTa\theta = T - T_a. Then LBdθRB◆◆LBdtRB=kθ\dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ = -k\theta, giving θ=θ0ekt\theta = \theta_0 e^{-kt}.

T=Ta+(T0Ta)ekt\boxed{T = T_a + (T_0 - T_a)e^{-kt}}

Example. A cup of tea at 90°C90°C is placed in a room at 20°C20°C. After 10 minutes the temperature is 60°C60°C. Find the temperature after 20 minutes.

T0=90T_0 = 90, Ta=20T_a = 20. T(10)=60T(10) = 60:

60=20+70e10k    e10k=4070=47    k=110ln7460 = 20 + 70e^{-10k} \implies e^{-10k} = \dfrac{40}{70} = \dfrac{4}{7} \implies k = \dfrac{1}{10}\ln\dfrac{7}{4}.

T(20)=20+70e20k=20+70(47)2=20+701649=20+160742.9°CT(20) = 20 + 70e^{-20k} = 20 + 70\left(\dfrac{4}{7}\right)^2 = 20 + 70 \cdot \dfrac{16}{49} = 20 + \dfrac{160}{7} \approx 42.9°C.

5.3 Population growth with carrying capacity

The logistic equation models population growth with a carrying capacity MM:

dPdt=kP(1PM)\frac{dP}{dt} = kP\left(1 - \frac{P}{M}\right)

This is separable. The solution is

P(t)=M1+Aekt\boxed{P(t) = \frac{M}{1 + Ae^{-kt}}}

where A=MP0P0A = \dfrac{M - P_0}{P_0}.

5.4 Mixing problems

Example. A tank contains 100 litres of water with 10 kg of salt. Pure water flows in at 5 L/min, and the mixture flows out at 5 L/min. Find the amount of salt after tt minutes.

Let S(t)S(t) be the amount of salt (kg). Rate in = 0. Rate out = concentration ×\times flow rate =S100×5=S20= \dfrac{S}{100} \times 5 = \dfrac{S}{20}.

dSdt=S20\frac{dS}{dt} = -\frac{S}{20}

S=10et/20S = 10e^{-t/20}.

After 20 minutes: S(20)=10e13.68S(20) = 10e^{-1} \approx 3.68 kg.


6. Proof of the General Solution of the Second-Order Homogeneous ODE

Proof that the CF gives the general solution

We must show that for all three cases, the proposed general solution has two arbitrary constants and satisfies the ODE.

Case 1 (m1m2m_1 \neq m_2, real). Let y1=em1xy_1 = e^{m_1 x} and y2=em2xy_2 = e^{m_2 x}.

Substituting y1y_1 into ay+by+cy=0ay'' + by' + cy = 0: am12em1x+bm1em1x+cem1x=(am12+bm1+c)em1x=0am_1^2 e^{m_1 x} + bm_1 e^{m_1 x} + ce^{m_1 x} = (am_1^2 + bm_1 + c)e^{m_1 x} = 0 since m1m_1 is a root. Similarly for y2y_2.

The Wronskian is W=y1y2y1y2=m2e(m1+m2)xm1e(m1+m2)x=(m2m1)e(m1+m2)x0W = y_1 y_2' - y_1' y_2 = m_2 e^{(m_1+m_2)x} - m_1 e^{(m_1+m_2)x} = (m_2 - m_1)e^{(m_1+m_2)x} \neq 0.

Since W0W \neq 0, y1y_1 and y2y_2 are linearly independent, so y=Aem1x+Bem2xy = Ae^{m_1 x} + Be^{m_2 x} is the general solution.

Case 2 (mm repeated). y1=emxy_1 = e^{mx} is one solution. We need a second linearly independent solution. Try y2=xemxy_2 = xe^{mx}.

y2=emx(1+mx)y_2' = e^{mx}(1 + mx), y2=emx(2m+m2x)y_2'' = e^{mx}(2m + m^2 x).

ay2+by2+cy2=emx[a(2m+m2x)+b(1+mx)+cx]ay_2'' + by_2' + cy_2 = e^{mx}\left[a(2m + m^2 x) + b(1 + mx) + cx\right]

=emx[(am2+bm+c)x+(2am+b)]= e^{mx}\left[(am^2 + bm + c)x + (2am + b)\right]

The coefficient of xx is zero since mm satisfies the auxiliary equation. The constant: 2am+b=02am + b = 0 when the root is repeated (since m=b/2am = -b/2a). So y2y_2 is also a solution.

The Wronskian: W=emxemx(1+mx)memxxemx=e2mx0W = e^{mx} \cdot e^{mx}(1+mx) - me^{mx} \cdot xe^{mx} = e^{2mx} \neq 0.

Therefore y=(A+Bx)emxy = (A + Bx)e^{mx} is the general solution.

\square


Problems

Problem 1

Solve dydx=3x2y2\dfrac{dy}{dx} = \dfrac{3x^2}{y^2} given y(1)=2y(1) = 2.

Solution 1

Separate: y2dy=3x2dxy^2\,dy = 3x^2\,dx.

Integrate: y33=x3+C\dfrac{y^3}{3} = x^3 + C.

y(1)=2y(1) = 2: 83=1+C    C=53\dfrac{8}{3} = 1 + C \implies C = \dfrac{5}{3}.

y3=3x3+5    y=3x3+53y^3 = 3x^3 + 5 \implies \boxed{y = \sqrt[3]{3x^3 + 5}}.

If you get this wrong, revise: Separable Equations — Section 1.

Problem 2

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

Solution 2

P(x)=3/xP(x) = 3/x, Q(x)=x2Q(x) = x^2.

μ=e3/xdx=e3lnx=x3\mu = e^{\int 3/x\,dx} = e^{3\ln x} = x^3.

ddx(x3y)=x3x2=x5\dfrac{d}{dx}(x^3 y) = x^3 \cdot x^2 = x^5.

x3y=x66+Cx^3 y = \dfrac{x^6}{6} + C.

y=x36+Cx3y = \dfrac{x^3}{6} + \dfrac{C}{x^3}.

y(1)=0y(1) = 0: 16+C=0    C=16\dfrac{1}{6} + C = 0 \implies C = -\dfrac{1}{6}.

y=x3616x3=x616x3\boxed{y = \dfrac{x^3}{6} - \dfrac{1}{6x^3} = \dfrac{x^6 - 1}{6x^3}}.

If you get this wrong, revise: Integrating Factor — Section 2.

Problem 3

Solve y6y+9y=0y'' - 6y' + 9y = 0 given y(0)=1y(0) = 1 and y(0)=0y'(0) = 0.

Solution 3

Auxiliary: m26m+9=0    (m3)2=0    m=3m^2 - 6m + 9 = 0 \implies (m-3)^2 = 0 \implies m = 3 (repeated).

y=(A+Bx)e3xy = (A + Bx)e^{3x}, y=(B+3A+3Bx)e3xy' = (B + 3A + 3Bx)e^{3x}.

y(0)=1y(0) = 1: A=1A = 1. y(0)=0y'(0) = 0: B+3=0    B=3B + 3 = 0 \implies B = -3.

y=(13x)e3x\boxed{y = (1 - 3x)e^{3x}}.

If you get this wrong, revise: Three Cases — Section 3.3.

Problem 4

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

Solution 4

Auxiliary: m2+4m+13=0    m=LB4±1652RB◆◆LB2RB=2±3im^2 + 4m + 13 = 0 \implies m = \dfrac◆LB◆-4 \pm \sqrt{16-52}◆RB◆◆LB◆2◆RB◆ = -2 \pm 3i.

α=2\alpha = -2, β=3\beta = 3.

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

If you get this wrong, revise: Three Cases — Section 3.3.

Problem 5

Find the general solution of yy=2exy'' - y = 2e^x.

Solution 5

CF: m21=0    m=±1m^2 - 1 = 0 \implies m = \pm 1. yh=Aex+Bexy_h = Ae^x + Be^{-x}.

PI: f(x)=2exf(x) = 2e^x. Since exe^x appears in the CF, try yp=cxexy_p = cxe^x.

yp=c(1+x)exy_p' = c(1+x)e^x, yp=c(2+x)exy_p'' = c(2+x)e^x.

ypyp=c(2+x)excxex=2cex=2ex    c=1y_p'' - y_p = c(2+x)e^x - cxe^x = 2ce^x = 2e^x \implies c = 1.

y=Aex+Bex+xex\boxed{y = Ae^x + Be^{-x} + xe^x}.

If you get this wrong, revise: Undetermined Coefficients — Section 4.2.

Problem 6

Find the general solution of y+2y+y=x2y'' + 2y' + y = x^2.

Solution 6

CF: m2+2m+1=0    (m+1)2=0m^2 + 2m + 1 = 0 \implies (m+1)^2 = 0. yh=(A+Bx)exy_h = (A + Bx)e^{-x}.

PI: Try yp=px2+qx+ry_p = px^2 + qx + r. yp=2px+qy_p' = 2px + q, yp=2py_p'' = 2p.

(2p)+2(2px+q)+(px2+qx+r)=x2(2p) + 2(2px + q) + (px^2 + qx + r) = x^2.

px2+(4p+q)x+(2p+2q+r)=x2px^2 + (4p+q)x + (2p+2q+r) = x^2.

p=1p = 1, 4+q=0    q=44 + q = 0 \implies q = -4, 28+r=0    r=62 - 8 + r = 0 \implies r = 6.

y=(A+Bx)ex+x24x+6\boxed{y = (A + Bx)e^{-x} + x^2 - 4x + 6}.

If you get this wrong, revise: Undetermined Coefficients — Section 4.2.

Problem 7

A body cools from 80°C80°C to 60°C60°C in 10 minutes in surroundings at 20°C20°C. How long does it take to cool to 40°C40°C?

Solution 7

Newton's law: T=20+60ektT = 20 + 60e^{-kt} (since T0=80T_0 = 80, Ta=20T_a = 20).

T(10)=60T(10) = 60: 60=20+60e10k    e10k=2360 = 20 + 60e^{-10k} \implies e^{-10k} = \dfrac{2}{3}.

T(t)=40T(t) = 40: 40=20+60ekt    ekt=1340 = 20 + 60e^{-kt} \implies e^{-kt} = \dfrac{1}{3}.

(23)t/10=13    t10ln23=ln13\left(\dfrac{2}{3}\right)^{t/10} = \dfrac{1}{3} \implies \dfrac{t}{10}\ln\dfrac{2}{3} = \ln\dfrac{1}{3}.

t=LB10ln(1/3)RB◆◆LBln(2/3)RB=LB10ln3RB◆◆LBln(3/2)RBLB10×1.0986RB◆◆LB0.4055RB27.1t = \dfrac◆LB◆10\ln(1/3)◆RB◆◆LB◆\ln(2/3)◆RB◆ = \dfrac◆LB◆10\ln 3◆RB◆◆LB◆\ln(3/2)◆RB◆ \approx \dfrac◆LB◆10 \times 1.0986◆RB◆◆LB◆0.4055◆RB◆ \approx 27.1 minutes.

If you get this wrong, revise: Newton's Law of Cooling — Section 5.2.

Problem 8

Solve dydx=xy\dfrac{dy}{dx} = xy given y(0)=5y(0) = 5.

Solution 8

Separate: 1ydy=xdx\dfrac{1}{y}\,dy = x\,dx.

Integrate: lny=x22+C\ln|y| = \dfrac{x^2}{2} + C.

y(0)=5y(0) = 5: ln5=C\ln 5 = C.

y=ex2/2+ln5=5ex2/2y = e^{x^2/2 + \ln 5} = 5e^{x^2/2}.

y=5ex2/2\boxed{y = 5e^{x^2/2}}.

If you get this wrong, revise: Separable Equations — Section 1.

Problem 9

Solve y+9y=6cos3xy'' + 9y = 6\cos 3x.

Solution 9

CF: m2+9=0    m=±3im^2 + 9 = 0 \implies m = \pm 3i. yh=Acos3x+Bsin3xy_h = A\cos 3x + B\sin 3x.

PI: f(x)=6cos3xf(x) = 6\cos 3x. Since cos3x\cos 3x and sin3x\sin 3x are in the CF, try yp=x(ccos3x+dsin3x)y_p = x(c\cos 3x + d\sin 3x).

yp=(ccos3x+dsin3x)+x(3csin3x+3dcos3x)y_p' = (c\cos 3x + d\sin 3x) + x(-3c\sin 3x + 3d\cos 3x) yp=(6csin3x+6dcos3x)+x(9ccos3x9dsin3x)y_p'' = (-6c\sin 3x + 6d\cos 3x) + x(-9c\cos 3x - 9d\sin 3x)

yp+9yp=6csin3x+6dcos3x=6cos3xy_p'' + 9y_p = -6c\sin 3x + 6d\cos 3x = 6\cos 3x.

d=1d = 1, c=0c = 0.

y=Acos3x+Bsin3x+xsin3x\boxed{y = A\cos 3x + B\sin 3x + x\sin 3x}.

If you get this wrong, revise: Undetermined Coefficients — Section 4.2.

Problem 10

Solve dydxyx=x2\dfrac{dy}{dx} - \dfrac{y}{x} = x^2 for x>0x > 0, given y(1)=3y(1) = 3.

Solution 10

P(x)=1/xP(x) = -1/x, Q(x)=x2Q(x) = x^2.

μ=e1/xdx=elnx=1x\mu = e^{\int -1/x\,dx} = e^{-\ln x} = \dfrac{1}{x}.

ddx ⁣(yx)=1xx2=x\dfrac{d}{dx}\!\left(\dfrac{y}{x}\right) = \dfrac{1}{x} \cdot x^2 = x.

yx=x22+C    y=x32+Cx\dfrac{y}{x} = \dfrac{x^2}{2} + C \implies y = \dfrac{x^3}{2} + Cx.

y(1)=3y(1) = 3: 12+C=3    C=52\dfrac{1}{2} + C = 3 \implies C = \dfrac{5}{2}.

y=x32+5x2=x(x2+5)2\boxed{y = \dfrac{x^3}{2} + \dfrac{5x}{2} = \dfrac{x(x^2 + 5)}{2}}.

If you get this wrong, revise: Integrating Factor — Section 2.


8. Advanced Worked Examples

Example 8.1: Second-order linear ODE with complex roots

Problem. Solve d2ydx2+4dydx+13y=0\dfrac{d^2y}{dx^2} + 4\dfrac{dy}{dx} + 13y = 0 given y(0)=2y(0) = 2 and y(0)=1y'(0) = -1.

Solution. Auxiliary equation: m2+4m+13=0m^2 + 4m + 13 = 0.

m=LB4±1652RB◆◆LB2RB=2±3im = \dfrac◆LB◆-4 \pm \sqrt{16-52}◆RB◆◆LB◆2◆RB◆ = -2 \pm 3i.

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

y(0)=A=2y(0) = A = 2.

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

y(0)=2A+3B=1    4+3B=1    B=1y'(0) = -2A + 3B = -1 \implies -4 + 3B = -1 \implies B = 1.

y=e2x(2cos3x+sin3x)\boxed{y = e^{-2x}(2\cos 3x + \sin 3x)}

Example 8.2: Integrating factor with a tricky integral

Problem. Solve dydx+2yx=x2\dfrac{dy}{dx} + \dfrac{2y}{x} = x^2 for x>0x > 0.

Solution. Integrating factor: μ=exp ⁣(2xdx)=e2lnx=x2\mu = \exp\!\left(\displaystyle\int \frac{2}{x}\,dx\right) = e^{2\ln x} = x^2.

ddx(x2y)=x4\frac{d}{dx}(x^2 y) = x^4

x2y=x55+Cx^2 y = \frac{x^5}{5} + C

y=x35+Cx2\boxed{y = \frac{x^3}{5} + \frac{C}{x^2}}

Example 8.3: Homogeneous equation via substitution

Problem. Solve dydx=x+yxy\dfrac{dy}{dx} = \dfrac{x + y}{x - y}.

Solution. This is a homogeneous equation. Let y=vxy = vx, so dydx=v+xdvdx\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}.

v+xdvdx=1+v1vv + x\frac{dv}{dx} = \frac{1+v}{1-v}

xdvdx=1+v1vv=1+vv+v21v=1+v21vx\frac{dv}{dx} = \frac{1+v}{1-v} - v = \frac{1+v-v+v^2}{1-v} = \frac{1+v^2}{1-v}

1v1+v2dv=1xdx\int \frac{1-v}{1+v^2}\,dv = \int \frac{1}{x}\,dx

11+v2dvv1+v2dv=lnx+C\int \frac{1}{1+v^2}\,dv - \int \frac{v}{1+v^2}\,dv = \ln|x| + C

arctanv12ln(1+v2)=lnx+C\arctan v - \frac{1}{2}\ln(1+v^2) = \ln|x| + C

Substituting v=y/xv = y/x:

arctan ⁣(yx)12ln ⁣(1+y2x2)=lnx+C\arctan\!\left(\frac{y}{x}\right) - \frac{1}{2}\ln\!\left(1+\frac{y^2}{x^2}\right) = \ln|x| + C

Example 8.4: Coupled first-order ODEs

Problem. Solve dxdt=3x+2y\dfrac{dx}{dt} = 3x + 2y, dydt=5xy\dfrac{dy}{dt} = -5x - y.

Solution. From the second equation: y=12 ⁣(dxdt3x)y = \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right).

Differentiating: dydt=12 ⁣(d2xdt23dxdt)\dfrac{dy}{dt} = \dfrac{1}{2}\!\left(\dfrac{d^2x}{dt^2} - 3\dfrac{dx}{dt}\right).

Substituting into the second equation: 12 ⁣(d2xdt23dxdt)=5x12 ⁣(dxdt3x)\dfrac{1}{2}\!\left(\dfrac{d^2x}{dt^2} - 3\dfrac{dx}{dt}\right) = -5x - \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right).

d2xdt23dxdt=10xdxdt+3x\frac{d^2x}{dt^2} - 3\frac{dx}{dt} = -10x - \frac{dx}{dt} + 3x

d2xdt22dxdt+7x=0\frac{d^2x}{dt^2} - 2\frac{dx}{dt} + 7x = 0

Auxiliary: m22m+7=0    m=1±i6m^2 - 2m + 7 = 0 \implies m = 1 \pm i\sqrt{6}.

x=et(Acos6t+Bsin6t)x = e^t(A\cos\sqrt{6}\,t + B\sin\sqrt{6}\,t).

Then y=12 ⁣(dxdt3x)y = \dfrac{1}{2}\!\left(\dfrac{dx}{dt} - 3x\right).

Example 8.5: Exponential growth with harvesting

Problem. A population P(t)P(t) satisfies dPdt=0.1P50\dfrac{dP}{dt} = 0.1P - 50. Find the general solution and interpret.

Solution. This is a first-order linear ODE: dPdt0.1P=50\dfrac{dP}{dt} - 0.1P = -50.

Integrating factor: μ=e0.1t\mu = e^{-0.1t}.

ddt(Pe0.1t)=50e0.1t\frac{d}{dt}(Pe^{-0.1t}) = -50e^{-0.1t}

Pe0.1t=500e0.1t+CPe^{-0.1t} = 500e^{-0.1t} + C

P=500+Ce0.1t\boxed{P = 500 + Ce^{0.1t}}

The equilibrium population is P=500P = 500. If P(0)>500P(0) > 500, the population grows exponentially; if P(0)<500P(0) < 500, it decays to zero (extinction).

Example 8.6: Boundary value problem

Problem. Solve y6y+9y=0y'' - 6y' + 9y = 0 with y(0)=1y(0) = 1 and y(1)=e3y(1) = e^3.

Solution. Auxiliary: m26m+9=0    (m3)2=0m^2 - 6m + 9 = 0 \implies (m-3)^2 = 0. Repeated root m=3m = 3.

General solution: y=(A+Bx)e3xy = (A + Bx)e^{3x}.

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

y(1)=(1+B)e3=e3    1+B=1    B=0y(1) = (1+B)e^3 = e^3 \implies 1+B = 1 \implies B = 0.

y=e3x\boxed{y = e^{3x}}

Example 8.7: Non-homogeneous second-order ODE

Problem. Solve y+y=2cosxy'' + y = 2\cos x.

Solution. Complementary function: m2+1=0    m=±im^2 + 1 = 0 \implies m = \pm i. yc=Acosx+Bsinxy_c = A\cos x + B\sin x.

Particular integral: Since cosx\cos x is part of the CF, try yp=x(Ccosx+Dsinx)y_p = x(C\cos x + D\sin x).

yp=Ccosx+Dsinx+x(Csinx+Dcosx)y_p' = C\cos x + D\sin x + x(-C\sin x + D\cos x).

yp=Csinx+Dcosx+(Csinx+Dcosx)+x(CcosxDsinx)=2(Csinx+Dcosx)x(Ccosx+Dsinx)y_p'' = -C\sin x + D\cos x + (-C\sin x + D\cos x) + x(-C\cos x - D\sin x) = 2(-C\sin x + D\cos x) - x(C\cos x + D\sin x).

yp+yp=2(Csinx+Dcosx)=2cosxy_p'' + y_p = 2(-C\sin x + D\cos x) = 2\cos x.

D=1D = 1, C=0C = 0. So yp=xsinxy_p = x\sin x.

y=Acosx+Bsinx+xsinx\boxed{y = A\cos x + B\sin x + x\sin x}


9. Common Pitfalls

PitfallCorrect Approach
Forgetting the constant of integration when using an integrating factorIntegrate both sides after multiplying by μ\mu; +C+C appears on the right
Using the wrong trial function for the particular integralIf the RHS is part of the complementary function, multiply by xx (or x2x^2 if needed)
Confusing AemxAe^{mx} (single root) with (A+Bx)emx(A+Bx)e^{mx} (repeated root)Check the discriminant: repeated root     \iff discriminant =0= 0
Not applying initial conditions to find AA and BBAlways substitute the given conditions into the general solution and its derivative

10. Additional Exam-Style Questions

Question 8

Solve d2ydx22dydx3y=6e2x\dfrac{d^2y}{dx^2} - 2\dfrac{dy}{dx} - 3y = 6e^{2x}.

Solution

CF: m22m3=0    (m3)(m+1)=0m^2 - 2m - 3 = 0 \implies (m-3)(m+1) = 0. yc=Ae3x+Bexy_c = Ae^{3x} + Be^{-x}.

PI: Try yp=Ce2xy_p = Ce^{2x}. Substituting: 4C4C3C=6    C=24C - 4C - 3C = 6 \implies C = -2.

y=Ae3x+Bex2e2x\boxed{y = Ae^{3x} + Be^{-x} - 2e^{2x}}

Question 9

A body cools according to LBdθRB◆◆LBdtRB=k(θ20)\dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ = -k(\theta - 20), where θ\theta is the temperature in °C°\mathrm{C} and 20°C20°\mathrm{C} is the room temperature. If θ(0)=90\theta(0) = 90 and θ(10)=50\theta(10) = 50, find θ(30)\theta(30).

Solution

LBdθRB◆◆LBdtRB+kθ=20k\dfrac◆LB◆d\theta◆RB◆◆LB◆dt◆RB◆ + k\theta = 20k. IF: ekte^{kt}.

θekt=20ekt+C\theta e^{kt} = 20e^{kt} + C

θ=20+Cekt\theta = 20 + Ce^{-kt}.

θ(0)=90    C=70\theta(0) = 90 \implies C = 70. θ(10)=50    50=20+70e10k    e10k=37\theta(10) = 50 \implies 50 = 20 + 70e^{-10k} \implies e^{-10k} = \dfrac{3}{7}.

θ(30)=20+70e30k=20+70 ⁣(37) ⁣3=20+70×27343=20+1890343\theta(30) = 20 + 70e^{-30k} = 20 + 70\!\left(\dfrac{3}{7}\right)^{\!3} = 20 + 70 \times \dfrac{27}{343} = 20 + \dfrac{1890}{343}.

θ(30)25.5°C\boxed{\theta(30) \approx 25.5°\mathrm{C}}

Question 10

Prove that the substitution y=vxy = vx transforms dydx=f ⁣(yx)\dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right) into a separable equation.

Solution

Let y=vxy = vx, so dydx=v+xdvdx\dfrac{dy}{dx} = v + x\dfrac{dv}{dx}.

Substituting: v+xdvdx=f(v)v + x\dfrac{dv}{dx} = f(v).

xdvdx=f(v)vx\frac{dv}{dx} = f(v) - v

dvf(v)v=dxx\frac{dv}{f(v) - v} = \frac{dx}{x}

This is separable. Integrating gives dvf(v)v=lnx+C\displaystyle\int \frac{dv}{f(v) - v} = \ln|x| + C. \blacksquare

Question 11

Find the particular solution to xdydxy=x2x\dfrac{dy}{dx} - y = x^2 with y(1)=3y(1) = 3.

Solution

dydxyx=x\dfrac{dy}{dx} - \dfrac{y}{x} = x. IF: μ=exp ⁣(1xdx)=1x\mu = \exp\!\left(\displaystyle\int -\dfrac{1}{x}\,dx\right) = \dfrac{1}{x}.

1xdydxyx2=1\frac{1}{x}\cdot\frac{dy}{dx} - \frac{y}{x^2} = 1

ddx ⁣(yx)=1\frac{d}{dx}\!\left(\frac{y}{x}\right) = 1

yx=x+C    y=x2+Cx\frac{y}{x} = x + C \implies y = x^2 + Cx

y(1)=1+C=3    C=2y(1) = 1 + C = 3 \implies C = 2.

y=x2+2x\boxed{y = x^2 + 2x}


11. Connections to Other Topics

11.1 Differential equations and calculus

Solving ODEs requires integration techniques (substitution, parts, partial fractions). See Further Calculus.

11.2 Second-order ODEs and complex numbers

The auxiliary equation uses complex roots to give oscillatory solutions eαt(Acosβt+Bsinβt)e^{\alpha t}(A\cos\beta t + B\sin\beta t). See Complex Numbers.

11.3 Differential equations and mechanics

Newton's second law F=maF = ma leads to second-order ODEs in mechanics. See Circular Motion.


12. Key Results Summary

ODE TypeMethodGeneral Solution
dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x)Integrating factor μ=ePdx\mu = e^{\int P\,dx}y=LB1RB◆◆LBμRBμQdxy = \dfrac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\displaystyle\int \mu Q\,dx
dydx=f ⁣(yx)\dfrac{dy}{dx} = f\!\left(\dfrac{y}{x}\right)Substitution y=vxy = vxSeparate and integrate
ad2ydx2+bdydx+cy=0a\dfrac{d^2y}{dx^2}+b\dfrac{dy}{dx}+cy=0Auxiliary equation am2+bm+c=0am^2+bm+c=0Real roots: Aem1x+Bem2xAe^{m_1x}+Be^{m_2x}; repeated: (A+Bx)emx(A+Bx)e^{mx}; complex: eαx(Acosβx+Bsinβx)e^{\alpha x}(A\cos\beta x+B\sin\beta x)

13. Further Exam-Style Questions

Question 12

Solve d2ydx26dydx+25y=0\dfrac{d^2y}{dx^2} - 6\dfrac{dy}{dx} + 25y = 0 with y(0)=0y(0) = 0 and y(0)=3y'(0) = 3.

Solution

m26m+25=0    m=3±4im^2 - 6m + 25 = 0 \implies m = 3 \pm 4i.

y=e3x(Acos4x+Bsin4x)y = e^{3x}(A\cos 4x + B\sin 4x).

y(0)=A=0y(0) = A = 0. y=3e3xBsin4x+4e3xBcos4xy' = 3e^{3x}B\sin 4x + 4e^{3x}B\cos 4x. y(0)=4B=3    B=3/4y'(0) = 4B = 3 \implies B = 3/4.

y=34e3xsin4x\boxed{y = \dfrac{3}{4}e^{3x}\sin 4x}

Question 13

Prove that the Wronskian W(y1,y2)=y1y2y1y20W(y_1, y_2) = y_1y_2' - y_1'y_2 \neq 0 if and only if y1y_1 and y2y_2 are linearly independent solutions of a second-order linear ODE.

Solution

If y1y_1 and y2y_2 are linearly dependent, y2=cy1y_2 = cy_1, then W=y1(cy1)y1(cy1)=0W = y_1(cy_1') - y_1'(cy_1) = 0.

Conversely, if W=0W = 0 at some point and both satisfy the same linear ODE, then the initial value problem with initial conditions matching y1y_1 and y2y_2 would have two solutions, contradicting uniqueness. Hence y1y_1 and y2y_2 must be linearly dependent.

Therefore W0    W \neq 0 \iff linearly independent. \blacksquare


14. Advanced Topics

14.1 The integrating factor method — derivation

For dydx+P(x)y=Q(x)\dfrac{dy}{dx} + P(x)y = Q(x), multiply by μ=ePdx\mu = e^{\int P\,dx}:

μdydx+μPy=μQ\mu\frac{dy}{dx} + \mu Py = \mu Q

ddx(μy)=μQ\frac{d}{dx}(\mu y) = \mu Q

μy=μQdx+C\mu y = \int \mu Q\,dx + C

y=LB1RB◆◆LBμRBμQdx+LBCRB◆◆LBμRBy = \frac◆LB◆1◆RB◆◆LB◆\mu◆RB◆\int \mu Q\,dx + \frac◆LB◆C◆RB◆◆LB◆\mu◆RB◆

14.2 Systems of linear ODEs

For the system x˙=Ax\dot{\mathbf{x}} = \mathbf{A}\mathbf{x} where x=(x1,,xn)\mathbf{x} = (x_1, \ldots, x_n):

If A\mathbf{A} is diagonalisable with A=PDP1\mathbf{A} = \mathbf{P}\mathbf{D}\mathbf{P}^{-1}, let z=P1x\mathbf{z} = \mathbf{P}^{-1}\mathbf{x}:

z˙=Dz\dot{\mathbf{z}} = \mathbf{D}\mathbf{z}, giving zi=cieλitz_i = c_i e^{\lambda_i t}.

x=Pz=cieλitvi\mathbf{x} = \mathbf{P}\mathbf{z} = \sum c_i e^{\lambda_i t}\mathbf{v}_i.

14.3 Boundary value problems vs initial value problems

An IVP specifies yy and yy' at one point. A BVP specifies yy at two (or more) points. BVPs may have zero, one, or multiple solutions, unlike IVPs which (for linear ODEs) have a unique solution.

14.4 Phase portraits

For autonomous 2D systems x˙=f(x,y)\dot{x} = f(x,y), y˙=g(x,y)\dot{y} = g(x,y), the phase portrait shows trajectories in the xyxy-plane. Key features:

  • Fixed points: where x˙=y˙=0\dot{x} = \dot{y} = 0
  • Stability: determined by the eigenvalues of the Jacobian at each fixed point

15. Further Exam-Style Questions

Question 14

Solve dydx=x2+y2xy\dfrac{dy}{dx} = \dfrac{x^2+y^2}{xy} using an appropriate substitution.

Solution

This is homogeneous: dydx=1+(y/x)2y/x\dfrac{dy}{dx} = \dfrac{1+(y/x)^2}{y/x}. Let v=y/xv = y/x:

v+xdvdx=1+v2v=1v+vv + x\dfrac{dv}{dx} = \dfrac{1+v^2}{v} = \dfrac{1}{v} + v.

xdvdx=1vx\dfrac{dv}{dx} = \dfrac{1}{v}.

vdv=dxx    v22=lnx+C\int v\,dv = \int \dfrac{dx}{x} \implies \dfrac{v^2}{2} = \ln|x| + C.

y22x2=lnx+C\dfrac{y^2}{2x^2} = \ln|x| + C.

y2=2x2(lnx+C)y^2 = 2x^2(\ln|x|+C).

Question 15

Prove that the general solution of d2ydx2+ω2y=0\dfrac{d^2y}{dx^2} + \omega^2 y = 0 can be written as y=Rcos(ωxδ)y = R\cos(\omega x - \delta) where RR and δ\delta are constants.

Solution

The general solution is y=Acosωx+Bsinωxy = A\cos\omega x + B\sin\omega x.

Let Rcosδ=AR\cos\delta = A and Rsinδ=BR\sin\delta = B. Then R=A2+B2R = \sqrt{A^2+B^2} and δ=arctan(B/A)\delta = \arctan(B/A).

Acosωx+Bsinωx=Rcosδcosωx+Rsinδsinωx=Rcos(ωxδ)A\cos\omega x + B\sin\omega x = R\cos\delta\cos\omega x + R\sin\delta\sin\omega x = R\cos(\omega x - \delta). \blacksquare