Scroll to turn the page
Differential Equations · Differential Equations · College
a rate that depends on where you are
A differential equation tells you how a quantity changes, in terms of the quantity itself. Solving it means finding every function that changes that way.
The figure is a ball falling through air. Gravity speeds it up; air resistance, growing with the speed, slows it down:
Each short segment has the slope the equation gives at that point. A ball dropped from rest, or thrown down at 20 m/s, speeds up; one thrown at 70 or 90 m/s slows down. All of them close in on 49 m/s, and you can see it before solving anything.
This chapter solves the first-order equations that can be solved by hand (separable, linear and exact), asks when a solution exists and is the only one, and computes the ones that can’t be solved.
order, linearity and the initial value
Newton’s second law turns a sentence about forces into an equation about a rate. The ball has mass 10 kg, its weight is mg = 98 N down, and the air pushes back with γv, where γ = 2 kg/s:
Equations are sorted by a few questions.
A solution is a function that makes the equation true on an interval. Check : its derivative is , and is the same. An initial condition, here v(0) = 0, picks one solution out of the family. After 10 s the ball is at 42.37 m/s.
every y on one side, every x on the other
When the right side is a function of x times a function of y, move all the y’s to one side and integrate both.
Take :
The answer is implicit: an equation between x and y, not a formula for y. Its curves are circles, and the field shows why: every segment is perpendicular to the line from the origin.
A solution must be a function, so one circle holds two of them. Through (0, 2) the solution is the upper half, , and it lives only on −2 < x < 2. At (±2, 0) the slope −x/y blows up and the solution stops.
Dividing by a factor of y can lose solutions: in the constant y = 0 is a solution that skips. Check the zeros of the y factor separately.
the integrating factor
A first-order linear equation can be put as . Multiply it by and the left side becomes the derivative of one product.
Take . Here p = ½, so :
The second line is the product rule run backwards; that is the whole trick. One integration then gives every solution, with a single constant C.
The initial condition y(0) = 1 gives , so C = 0.4. Whatever C is, dies away, and every solution closes in on the blue curve .
solutions as level curves
Write the equation as . If there is a function ψ with and , the equation says , so the solutions are the level curves ψ = C.
Such a ψ exists exactly when (on a rectangle where both are continuous). For
and : exact. Integrate M in x: . Then must be , so h = −y:
Through (2, 1): ψ = 4 + 6 − 1 = 9. That solution runs on x > 1 only, since the formula breaks at x = ±1, where N = 0.
When , an integrating factor of x alone or y alone can sometimes make the equation exact.
when there is exactly one solution
An initial value problem has exactly one solution near if f and are continuous on a rectangle around .
The theorem promises a solution only on some interval: has the solution , which blows up at t = 1, though is as smooth as can be. For a linear equation the news is better: if p and g are continuous on an interval, the solution exists on all of it.
When the conditions fail, uniqueness can fail. For
is undefined at y = 0. Both y = 0 and y = t³ solve it: . So does every curve that rests at 0 until some t = a and then follows : infinitely many solutions through one point.
Uniqueness has a picture: where it holds, two solution curves can never cross or touch.
Euler, improved Euler and Runge–Kutta
Most equations have no formula for their solution. A numerical method steps along it instead, in steps of size h.
Euler follows the slope at the start of each step: . Improved Euler (Heun) also takes the slope where Euler would land and averages the two. RK4 averages four slopes, weighted 1, 2, 2, 1.
On , each step multiplies y by a fixed factor, which matches the first terms of . Four steps of h = 0.25 reach t = 1:
| t | 0 | 0.25 | 0.5 | 0.75 | 1 |
|---|---|---|---|---|---|
| Euler | 1.0000 | 1.2500 | 1.5625 | 1.9531 | 2.4414 |
| Improved | 1.0000 | 1.2813 | 1.6416 | 2.1033 | 2.6949 |
| RK4 | 1.0000 | 1.2840 | 1.6487 | 2.1170 | 2.7182 |
The true value is e ≈ 2.71828. The errors are 0.2769, 0.0234 and 0.000072. Halving h roughly halves Euler’s error (order 1), quarters Heun’s (order 2) and cuts RK4’s by about 16 (order 4).