Mathematics RU

Practice · Chapter 31

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

  1. $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.
  2. 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.
  3. $x'' + px' + qx = 0$: write the characteristic equation $\lambda^2 + p\lambda + q = 0$.
  4. 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)$.
  5. Find the constants from the initial conditions $x(0)$ and $x'(0)$.
The roots of the characteristic equation. The real part: with $\alpha < 0$ the oscillations die out. The imaginary part, the frequency. Example: $x'' + 4x' + 13x = 0$; $\lambda^2 + 4\lambda + 13 = 0$, $\lambda = -2 \pm 3i$. With $x(0) = 1$, $x'(0) = -2$: $C_1 = 1$, $-2 + 3C_2 = -2$, $C_2 = 0$, so $x = e^{-2t}\cos 3t$.

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.

Example