Differential equations
Exponential growth and cooling, approximate solutions by Euler's method, and initial value problems for second-order equations — with damping and oscillations.
How to solve it
A differential equation gives not a function but the rule of its change. The equation $y' = ky$, “the growth rate is proportional to the amount”, is solved by an exponential. The equation $x'' + px' + qx = 0$, a spring with friction, comes down to a quadratic.
Step by step
- $y' = k(y - y_\infty)$: the solution is $y = y_\infty + (y_0 - y_\infty)e^{kt}$. That is how tea cools to room temperature.
- Euler's method: step along the tangent, $y_{n+1} = y_n + h \cdot f(t_n, y_n)$, where $f$ is the right-hand side.
- $x'' + px' + qx = 0$: write the characteristic equation $\lambda^2 + p\lambda + q = 0$.
- Two real roots give $C_1e^{\lambda_1t} + C_2e^{\lambda_2t}$; a double root $(C_1 + C_2t)e^{\lambda t}$; complex roots $\alpha \pm \beta i$ give $e^{\alpha t}(C_1\cos\beta t + C_2\sin\beta t)$.
- Find the constants from the initial conditions $x(0)$ and $x'(0)$.
Common mistakes
- Writing $C_1e^{\lambda t} + C_2e^{\lambda t}$ for a double root — that is one function; the second solution is $te^{\lambda t}$.
- Computing $x'(0)$ without differentiating the factor $e^{\alpha t}$.
- Taking the slope at the end of a step in Euler's method instead of the start.
- In the cooling law putting $e^{kt}$ on the temperature itself instead of on its difference from the room's.