Differential equations
A differential equation links a quantity to its rate of change. Think of a population growing in proportion to its size, or tea cooling faster when it is hotter. Solving one means finding the function itself. A starting value usually fixes the constant.
Key facts
- dy/dx = f(x): integrate directly. Then use a known point to find the constant.
- Separable dy/dx = f(x)g(y): rearrange to ∫ 1/(g(y)) dy = ∫ f(x) dx.
- dy/dt = ky gives y = y₀e^(kt). This is growth if k > 0 and decay if k < 0. The half-life is (ln 2)/(|k|).
- Newton’s law of cooling: dT/dt = −k(T − R), where R is the room temperature. It gives T = R + (T₀ − R)e^(−kt).
- Linear first order dy/dx + P(x)y = Q(x): multiply through by the integrating factor e^(∫P dx).
- ay″ + by′ + cy = 0: solve am² + bm + c = 0. Distinct roots give Ae^(m₁x) + Be^(m₂x). A repeated root gives (A + Bx)e^(mx). Roots p ± qi give e^(px)(A cos qx + B sin qx).
Worked examples
Example 1
Solve dy/dx = 6x^2 − 2, given that y = 4 when x = 1.
- Integrate both sides. y = 2x^3 − 2x + c
- Use x = 1, y = 4. 4 = 2 − 2 + c ⇒ c = 4
- Write the solution. y = 2x^3 − 2x + 4
Answer: y = 2x³ − 2x + 4
Example 2
Bacteria grow so that dP/dt = 0.3P (t in hours), with P = 200 at t = 0. Find P after 5 hours, and when P reaches 1,000.
- Separate and integrate. ∫ 1/P dP = ∫ 0.3 dt ⇒ ln P = 0.3t + c
- Take exponentials. P(0) = 200 gives A = 200. P = Ae^(0.3t) = 200e^(0.3t)
- After 5 hours: 200e^1.5 ≈ 896
- Set P = 1,000: e^(0.3t) = 5 ⇒ t = (ln 5)/0.3 ≈ 5.36
Answer: About 896 after 5 hours. P reaches 1,000 after about 5.36 hours.
Example 3
Solve y″ − 5y′ + 6y = 0 with y(0) = 2 and y′(0) = 5.
- Solve the auxiliary equation. m^2 − 5m + 6 = 0 ⇒ m = 2, m = 3
- General solution: y = Ae^(2x) + Be^(3x)
- Use y(0) = 2 and y′(0) = 5. A + B = 2, 2A + 3B = 5
- Solve: B = 1 and A = 1. y = e^(2x) + e^(3x)
Answer: y = e^(2x) + e^(3x)
Example 4
Solve dy/dx = 2x, given that y = 5 when x = 0.
- Integrate both sides. y = x² + c
- Use y = 5 when x = 0. c = 5, so y = x² + 5
Answer: y = x² + 5