Differential Equations

A2 · P3 · 4 min

A differential equation relates a quantity to its rate of change. P3 covers the separable first-order type: rearrange so all the yy terms are with dydy and all the xx terms with dxdx, integrate both sides, and use a given condition to fix the constant. Many questions start with a sentence in words that you must first turn into the equation.

Forming the equation

Key result

"The rate of change of PP is proportional to PP" means dPdt=kP\dfrac{dP}{dt} = kP.

"The rate at which the water level falls is proportional to the square root of the depth" means dhdt=−kh\dfrac{dh}{dt} = -k\sqrt{h} with k>0k > 0.

Introduce a constant of proportionality; its sign carries the direction (a decrease is negative).

Solving by separating the variables

Method
  1. Write the equation as g(y) dydx=f(x)g(y)\,\dfrac{dy}{dx} = f(x).
  2. Integrate both sides with respect to xx: ∫g(y) dy=∫f(x) dx\displaystyle\int g(y) \, dy = \int f(x) \, dx.
  3. Add one constant cc (to one side only).
  4. Use the initial condition to find cc.
  5. Rearrange to the form asked for, often y=…y = \ldots
A basic separable equation

Solve dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} given that y=2y = 2 when x=0x = 0.

Solution

∫y dy=∫x dx⇒12y2=12x2+c\displaystyle\int y \, dy = \int x \, dx \Rightarrow \tfrac{1}{2}y^2 = \tfrac{1}{2}x^2 + c.

y=2,x=0y = 2, x = 0: 2=c2 = c. So y2=x2+4y^2 = x^2 + 4, and since y>0y > 0 initially, y=x2+4y = \sqrt{x^2 + 4}.

Exponential growth

The population PP of a colony satisfies dPdt=0.05P\dfrac{dP}{dt} = 0.05P. Initially P=400P = 400. Find PP in terms of tt and the time for the population to reach 10001000.

Solution

∫1P dP=∫0.05 dt⇒ln⁡P=0.05t+c\displaystyle\int \frac{1}{P} \, dP = \int 0.05 \, dt \Rightarrow \ln P = 0.05t + c. At t=0t = 0: c=ln⁡400c = \ln 400.

ln⁡P400=0.05t⇒P=400e0.05t\ln\dfrac{P}{400} = 0.05t \Rightarrow P = 400e^{0.05t}.

1000=400e0.05t⇒t=20ln⁡2.5≈18.31000 = 400e^{0.05t} \Rightarrow t = 20\ln 2.5 \approx 18.3.

Newton's law of cooling

A drink at 80∘80^\circ cools in a room at 20∘20^\circ so that dθdt=−k(θ−20)\dfrac{d\theta}{dt} = -k(\theta - 20). After 5 minutes the temperature is 60∘60^\circ. Find θ\theta as a function of tt.

Solution

∫1θ−20 dθ=−∫k dt⇒ln⁡(θ−20)=−kt+c\displaystyle\int \frac{1}{\theta - 20} \, d\theta = -\int k \, dt \Rightarrow \ln(\theta - 20) = -kt + c.

At t=0t = 0, θ=80\theta = 80: c=ln⁡60c = \ln 60. So θ−20=60e−kt\theta - 20 = 60e^{-kt}.

At t=5t = 5, θ=60\theta = 60: 40=60e−5k⇒k=−15ln⁡23=15ln⁡1.540 = 60e^{-5k} \Rightarrow k = -\tfrac{1}{5}\ln\tfrac{2}{3} = \tfrac{1}{5}\ln 1.5.

θ=20+60e−0.0811t\theta = 20 + 60e^{-0.0811t}.

Using partial fractions

Solve dydx=y(1−y)\dfrac{dy}{dx} = y(1 - y) given y=12y = \tfrac{1}{2} when x=0x = 0, giving yy in terms of xx.

Solution

∫1y(1−y) dy=∫dx\displaystyle\int \frac{1}{y(1 - y)} \, dy = \int dx. Partial fractions: 1y(1−y)=1y+11−y\dfrac{1}{y(1 - y)} = \dfrac{1}{y} + \dfrac{1}{1 - y}.

ln⁡y−ln⁡(1−y)=x+c⇒ln⁡y1−y=x+c\ln y - \ln(1 - y) = x + c \Rightarrow \ln\dfrac{y}{1 - y} = x + c. At (0,12)(0, \tfrac{1}{2}): c=0c = 0.

y1−y=ex⇒y=ex(1−y)⇒y=ex1+ex\dfrac{y}{1 - y} = e^x \Rightarrow y = e^x(1 - y) \Rightarrow y = \dfrac{e^x}{1 + e^x}.

Forming and solving from words

A tank drains so that the depth hh metres decreases at a rate proportional to h\sqrt{h}. Initially h=4h = 4 and after 10 minutes h=1h = 1. Find how long it takes to empty.

Solution

dhdt=−kh\dfrac{dh}{dt} = -k\sqrt{h}. Separate: ∫h−1/2 dh=−∫k dt⇒2h=−kt+c\displaystyle\int h^{-1/2} \, dh = -\int k \, dt \Rightarrow 2\sqrt{h} = -kt + c.

t=0t = 0, h=4h = 4: c=4c = 4. t=10t = 10, h=1h = 1: 2=−10k+4⇒k=0.22 = -10k + 4 \Rightarrow k = 0.2.

2h=4−0.2t2\sqrt{h} = 4 - 0.2t; empty when h=0h = 0: t=20t = 20 minutes.

Interpreting the solution

Questions end by asking what happens as t→∞t \to \infty (a limiting value), whether a quantity ever reaches a target, or how the model behaves for large tt. Answer from the solved equation: exponentials with negative exponent tend to zero; ex1+ex→1\dfrac{e^x}{1 + e^x} \to 1; and so on.

Watch out

Separate before integrating: dydx=xy\dfrac{dy}{dx} = xy becomes 1y dy=x dx\dfrac{1}{y}\,dy = x\,dx. Integrating xyxy with respect to xx as if yy were constant is wrong. Also, ln⁡y=x+c\ln y = x + c gives y=Aexy = Ae^x with A=ecA = e^c, not y=ex+cy = e^x + c.

Exam tip

"Find the general solution" means keep the constant. "Find the particular solution" means use the condition. "Express yy in terms of xx" means finish with y=y =; a solution left as ln⁡y=…\ln y = \ldots loses the last mark.

Practice

Question
  1. Solve dydx=3x2y\dfrac{dy}{dx} = 3x^2 y with y=2y = 2 at x=0x = 0.
  2. Solve dydx=cos⁡xy2\dfrac{dy}{dx} = \dfrac{\cos x}{y^2} with y=1y = 1 at x=0x = 0.
  3. Solve xdydx=y+1x\dfrac{dy}{dx} = y + 1 with y=0y = 0 at x=1x = 1, for x>0x > 0.
  4. The mass mm of a substance decays so that dmdt=−km\dfrac{dm}{dt} = -km. It halves every 8 hours. Find kk and the time for mm to fall to 10%10\% of its initial value.
Answers
  1. ln⁡y=x3+ln⁡2⇒y=2ex3\ln y = x^3 + \ln 2 \Rightarrow y = 2e^{x^3}.
  2. 13y3=sin⁡x+13⇒y=3sin⁡x+13\tfrac{1}{3}y^3 = \sin x + \tfrac{1}{3} \Rightarrow y = \sqrt[3]{3\sin x + 1}.
  3. ln⁡(y+1)=ln⁡x+c\ln(y + 1) = \ln x + c, c=0c = 0: y=x−1y = x - 1.
  4. m=m0e−ktm = m_0 e^{-kt}; 12=e−8k⇒k=ln⁡28≈0.0866\tfrac{1}{2} = e^{-8k} \Rightarrow k = \tfrac{\ln 2}{8} \approx 0.0866; 0.1=e−kt⇒t=ln⁡10k≈26.60.1 = e^{-kt} \Rightarrow t = \dfrac{\ln 10}{k} \approx 26.6 hours.

How well do you know this?

Builds on

Where this leads

Console

Search notes, courses and tools, or run an action