Differential equations
Writing a differential equation
A differential equation connects a quantity to its rate of change. The word "proportional" brings a constant into the equation.
| Statement | Equation |
|---|
| The population N grows at a rate proportional to N | dtdN=kN, k>0 |
| The mass m decreases at a rate proportional to m | dtdm=−km, k>0 |
| The temperature θ falls at a rate proportional to its excess over a room at 20° | dtdθ=−k(θ−20), k>0 |
| The rate of change of y is inversely proportional to x | dxdy=xk |
Separating the variables
If the right-hand side is a function of x multiplied by a function of y, gather each variable on its own side:
Only one constant of integration is needed, on one side.
∫y−2dy=∫2xdx⇒−y1=x2+c
At x=0, y=1: −1=c. So −y1=x2−1, which gives
y=1−x21
General and particular solutions
The answer with c still in it is the general solution. Using an initial condition to find c gives the particular solution.
Exponential growth and decay
∫N1dN=∫kdt⇒lnN=kt+c
Taking exponentials gives N=ekt+c=Aekt, where A=ec. At t=0, A=N0, so N=N0ekt.
A problem in context
Separate and integrate:
∫θ−201dθ=∫−kdt⇒ln(θ−20)=−kt+c
At t=0, θ=100, so c=ln80. Then θ−20=80e−kt.
At t=5, θ=60: 40=80e−5k, so k=5ln2=0.139.
θ=20+80e−0.139t
As t grows, e−0.139t approaches 0, so θ approaches 20°C: the tea cools to room temperature and never falls below it.
Combining with earlier methods
Differential equations are often used to test integration. Watch for these forms after separating:
| Integral on one side | Method |
|---|
| y(y+1)1 | Partial fractions |
| xex or xcosx | Integration by parts |
| cos2y | Double angle formula |
| x2+1x | f(x)f′(x) gives a logarithm |
| y2+41 | Inverse tangent |
∫y+11dy=∫x1dx⇒ln(y+1)=lnx+c
At x=1, y=3: c=ln4. So ln(y+1)=ln(4x), and y=4x−1.