Category: Differential Equations Level: 301
dy/dx = y, y(0) = 1 ⇒ y = ex
A differential equation gives a slope at every point. Draw those slopes as short dashes and a solution is any curve that follows the dashes.
The equation dy/dx = y says the slope at any point equals its height. At height 2 the slope is 2, at height 0 it is flat, and below the axis it points down.
slope at (x, y) = y
Draw a dash at every grid point. The slope only depends on y, so each row repeats the same dash. Up high, the dashes get steep fast.
dy/dx = y
An initial condition picks one solution out of the crowd. Start at (0, 1), where the dash has slope 1.
y(0) = 1
Walk forward and backward along the dashes from (0, 1). The path is y = eˣ, the function that is its own slope.
y = ex, dy/dx = ex = y
Other starting heights give other members of the family y = C eˣ. Start at 0 and you stay at 0 forever, the calmest solution there is.
y = C ex for C = 2, 1/2, 0, -1/2
cd svg-generator python3 -m svgmath render slope-field --out /tmp/slope-field
Source: svgmath/diagrams/first_order_odes.py