First-Order ODEs

Direction fields, solution curves, and separable equations

First-Order Ordinary Differential Equations

A first-order ODE relates a function y(x) to its first derivative dy/dx. These equations appear everywhere in science and engineering -- from population dynamics and radioactive decay to electrical circuits and fluid flow. The general form is dy/dx = f(x, y), and the goal is to find a function y(x) that satisfies this relationship.

In this lesson, you will visualize direction fields, learn to solve separable equations step by step, and explore exponential and logistic growth models interactively.

Direction Fields and Solution Curves

A direction field (or slope field) draws a small line segment at each point (x, y) with slope f(x, y). These segments show the "flow" of solutions without solving the equation analytically. Click on the field to place initial conditions and watch solution curves emerge, traced by Euler's method.

Click anywhere on the field to place an initial condition. The solution curve is traced using Euler's method in both forward and backward time.

Key insight: Every point in the plane has a unique slope determined by f(x, y). Solution curves follow these slopes and never cross each other (by the existence and uniqueness theorem). The direction field gives a complete qualitative picture of all possible solutions.

Separable Equations

A separable equation has the form dy/dx = g(x) · h(y), where the right-hand side factors into a function of x times a function of y. To solve it, we separate variables -- putting all y terms on one side and all x terms on the other -- then integrate both sides independently.

Step 1 / 4

Step through the separation of variables process. The solution curves on the right appear when you reach the final step.

Key insight: Separation of variables converts a differential equation into two ordinary integrals. The integration constant C produces a family of solution curves, each corresponding to a different initial condition. Specifying y(x₀) = y₀ pins down a unique value of C.

Exponential and Logistic Growth

The simplest first-order ODE, dy/dt = ky, models processes where the rate of change is proportional to the current value. When k > 0 we get exponential growth (populations, compound interest); when k < 0 we get exponential decay (radioactive decay, cooling). Toggle the logistic model to see how a carrying capacity K limits growth in realistic populations.

-2 (decay)0+2 (growth)

The exponential model dy/dt = ky has solution y(t) = y₀ e^(kt). Positive k gives exponential growth, negative k gives decay, and k = 0 gives equilibrium.

Key insight: Pure exponential growth is unbounded -- populations would grow forever. The logistic equation dy/dt = ky(1 - y/K) introduces a self-limiting term. As y approaches the carrying capacity K, the growth rate drops to zero, producing the characteristic S-shaped (sigmoid) curve seen in real populations.

Key Takeaways

  • Direction fields -- visualize the slope dy/dx at every point; solution curves follow the flow and never cross (existence and uniqueness)
  • Separable equations -- when dy/dx = g(x)h(y), separate and integrate both sides to find a family of solutions parameterized by a constant C
  • Exponential models -- dy/dt = ky has solution y = y₀e^(kt); positive k means growth, negative k means decay
  • Logistic model -- adds a carrying capacity K to limit growth, producing the sigmoid curve observed in real-world populations