A rule for slopes

See what a differential equation says, and solve decay and cooling.

An ordinary equation asks for a number. A differential equation asks for a function. It's a rule that says, at every point, what the slope must be. Solving it means finding a curve that obeys the rule everywhere.

Each dash is the slope the rule demands there. Drag the amber point: the curve through it follows the dashes in both directions.
  • Choose \(dy/dx = -y\) and drag the start. Every curve heads to zero: this is decay.
  • Choose \(dy/dx = y\), and start just above and just below zero.
  • Choose \(dy/dx = x - y\). Every curve ends up on one straight line. Which one?

Why this matters

The laws of physics are nearly all of this form. They don't tell you where things are, only how they change from where they are now. So the start matters too: one rule gives a whole family of curves, and the starting point picks out yours.

Solving by separating

When you can get each variable on its own side, you can integrate directly.

Radioactive decay: the rate of change is proportional to how much is left.

\[ \frac{dN}{dt} = -kN \]

Get \(N\) on one side and \(t\) on the other.

\[ \frac{dN}{N} = -k\,dt \]

Integrate both sides, where \(C\) is a constant.

\[ \ln N = -kt + C \]

Undo the log. The starting amount \(N_0\) is where the constant ends up.

\[ N = N_0\,e^{-kt} \]

So here's where the exponential comes from, and why it appears in so many places: it's what you get whenever change is proportional to amount.

Problems

Check that \(y = e^{2x}\) solves \(\frac{dy}{dx} = 2y\).

Answer

\(\frac{dy}{dx} = 2e^{2x} = 2y\). Yes.

Solve \(\frac{dy}{dx} = x\) through the point \((0, 1)\).

Answer

\(y = \frac{x^2}{2} + C\), and the point gives \(C = 1\).

Tea at 90°C cools in a 20°C room as \(\frac{dT}{dt} = -0.1(T - 20)\), with \(t\) in minutes. How hot is it after 10 minutes?

Answer

\(T = 20 + 70e^{-0.1t}\). At \(t = 10\): \(20 + \frac{70}{e} \approx 45.8\)°C.

Check that \(y = x - 1 + Ce^{-x}\) solves \(\frac{dy}{dx} = x - y\), and find the line the visualisation's curves approach.

Answer

\(y' = 1 - Ce^{-x}\), and \(x - y = 1 - Ce^{-x}\), which match. As \(x\) grows the exponential dies, leaving \(y = x - 1\).

Learn more

An unhandled error has occurred. Reload 🗙