First-order ODEs, separable equations, the integrating factor method, direction fields, equilibrium solutions, and classic application models — everything you need for intro DE.
A differential equation (DE) is an equation involving an unknown function and one or more of its derivatives. The solution is a function, not a number.
Highest derivative present
A first-order ODE involves only y′. A second-order ODE involves y″. The order tells you how many initial conditions you need to find a unique solution.
Power of the highest-order derivative
After clearing radicals, the degree is the exponent on the highest derivative. Most intro problems are degree 1 (linear in the highest derivative).
ODE vs. PDE
An ODE has one independent variable (e.g., t). A PDE has two or more (e.g., x and t). Intro calculus courses focus entirely on ODEs.
General Solution
Contains an arbitrary constant C and represents the entire family of solutions. Every value of C produces a different solution curve.
Particular Solution
A specific solution obtained by applying an initial condition y(x₀) = y₀ to determine the value of C.
A separable ODE can be written as dy/dx = g(x) · h(y). Separate variables so all y terms are on one side and all x terms are on the other, then integrate.
Separate the variables
Rearrange so that all y terms (including dy) are on the left and all x terms (including dx) are on the right. Divide both sides by h(y) to isolate dy: dy/h(y) = g(x) dx.
Integrate both sides
Integrate the left side with respect to y and the right side with respect to x. Include a single arbitrary constant C on one side: ∫(1/h(y)) dy = ∫g(x) dx + C.
Solve for y (if possible)
Isolate y to express the solution explicitly. If you cannot solve for y algebraically, leave the answer in implicit form. Apply initial conditions to find C.
dy/dx = xy
Step 1: Separate: dy/y = x dx
Step 2: Integrate: ln|y| = x²/2 + C
Step 3: Solve: |y| = e^(x²/2 + C) = e^C · e^(x²/2)
General solution: y = Ae^(x²/2) where A = ±e^C
Apply y(0) = 2: 2 = Ae^0 = A
Particular solution: y = 2e^(x²/2)
dy/dx = (1 + y²) / y
Step 1: Separate: y dy / (1 + y²) = dx
Step 2: Integrate left side using u = 1 + y², du = 2y dy:
(1/2) ln(1 + y²) = x + C
Step 3: Multiply by 2: ln(1 + y²) = 2x + C₁
Solve: 1 + y² = e^(2x + C₁) = Ae^(2x)
General solution: y² = Ae^(2x) − 1
dy/dx = −2xy²
Step 1: Separate: y⁻² dy = −2x dx
Step 2: Integrate: −y⁻¹ = −x² + C
Step 3: Solve: 1/y = x² − C, so y = 1/(x² + K) where K = −C
Apply y(0) = 1: 1 = 1/(0 + K) → K = 1
Particular solution: y = 1/(x² + 1)
Verify: dy/dx = −2x/(x² + 1)² = −2x · y² ✓
A linear first-order ODE has the standard form dy/dx + P(x)y = Q(x). It is linear because y and y′ appear only to the first power with no products.
Identify P(x) and Q(x)
Rewrite the equation in standard form dy/dx + P(x)y = Q(x). Move all y terms to the left side and everything else to the right.
Compute the integrating factor
Calculate μ(x) = e^(∫P(x)dx). You do not need the +C here — one antiderivative is enough.
Multiply both sides by μ(x)
The left side μ(x)·dy/dx + μ(x)·P(x)·y equals d/dx[μ(x)·y] by the product rule. This is why the integrating factor works.
Integrate both sides
Integrate d/dx[μ(x)y] = μ(x)Q(x) to get μ(x)y = ∫μ(x)Q(x)dx + C.
Solve for y
Divide both sides by μ(x): y = [∫μ(x)Q(x)dx + C] / μ(x). Apply initial conditions to find C.
P(x) = 2/x, Q(x) = x²
μ(x) = e^(∫2/x dx) = e^(2 ln|x|) = x²
Multiply: d/dx[x²y] = x² · x² = x⁴
Integrate: x²y = x⁵/5 + C
Solve: y = x³/5 + C/x²
Apply y(1) = 1: 1 = 1/5 + C → C = 4/5
Particular solution: y = x³/5 + 4/(5x²)
Standard form: dy/dx + (−3)y = e^(5x), P(x) = −3
μ(x) = e^(∫−3 dx) = e^(−3x)
Multiply: d/dx[e^(−3x)y] = e^(−3x) · e^(5x) = e^(2x)
Integrate: e^(−3x)y = e^(2x)/2 + C
General solution: y = e^(3x) · (e^(2x)/2 + C) = e^(5x)/2 + Ce^(3x)
A direction field is a visual representation of the ODE dy/dx = f(x, y). At every point (x, y), a short line segment is drawn with slope f(x, y). Solution curves flow along these segments.
Evaluate f(x, y) at a grid of points
Pick a regular grid of (x, y) values. Compute the slope f(x, y) at each. Look for patterns — where is the slope zero? Positive? Negative?
Draw line segments with the computed slopes
At each grid point, draw a short segment with the corresponding slope. The length is uniform — only the angle varies.
Identify isoclines
An isocline is the curve along which f(x, y) = c for a constant c. All line segments on an isocline have the same slope. The isocline f(x, y) = 0 is called the nullcline.
Sketch solution curves
Draw smooth curves that are tangent to the direction segments everywhere. Each curve through a different initial point is a different particular solution.
Slope depends only on y. Segments at the same height y = c all have the same slope c. Isoclines are horizontal lines. The solutions are exponentials y = Ce^x. Near y = 0, slopes are nearly flat; far from 0, slopes are steep.
The nullcline is x − y = 0, i.e., y = x. Below the line y = x, slopes are positive (solutions rise). Above it, slopes are negative (solutions fall). Solutions are attracted toward and then track along y = x − 1.
For an autonomous equation dy/dx = f(y), equilibrium (critical) solutions are the constants y = c where f(c) = 0. Stability describes what nearby solutions do.
Nearby solutions converge toward y = c as x → ∞. On the phase line, arrows point toward c from both sides. Occurs when f′(c) < 0.
Nearby solutions diverge away from y = c. Arrows on the phase line point away from c on both sides. Occurs when f′(c) > 0.
Solutions converge from one side and diverge from the other. One arrow points toward c, one away. Occurs when f′(c) = 0 and sign changes on only one side.
Equilibria: y = −1, y = 0, y = 2 (set each factor = 0)
Test intervals on the phase line:
| Interval | Sign of f(y) | Arrow |
|---|---|---|
| y < −1 | negative | ↓ decreasing |
| −1 < y < 0 | positive | ↑ increasing |
| 0 < y < 2 | negative | ↓ decreasing |
| y > 2 | positive | ↑ increasing |
y = −1: unstable | y = 0: stable | y = 2: unstable
The simplest and most important application of first-order ODEs. If a quantity grows or decays at a rate proportional to its current size:
Population grows without bound. Doubling time T_d = ln(2)/k. The population doubles every T_d time units regardless of starting size.
Radioactive decay, drug clearance, charge on a capacitor. Half-life T_{1/2} = −ln(2)/k (since k is negative, this is positive).
A 200 g sample decays to 150 g in 10 years. Find k and when 50 g remains.
Model: A(t) = 200e^(kt)
At t = 10: 150 = 200e^(10k)
e^(10k) = 3/4 → 10k = ln(3/4) → k = ln(3/4)/10 ≈ −0.02877
When A = 50: 50 = 200e^(kt)
e^(kt) = 1/4 → kt = ln(1/4) → t = ln(1/4)/k ≈ 48.1 years
50 g remains after approximately 48.1 years.
The temperature of an object changes at a rate proportional to the difference between the object's temperature and the ambient temperature.
dT/dt = k(T − T_a) [separate]
dT/(T − T_a) = k dt [integrate]
ln|T − T_a| = kt + C
T − T_a = Ae^(kt) where A = ±e^C
Apply T(0) = T₀: T₀ − T_a = A
T(t) = T_a + (T₀ − T_a)e^(kt)
Coffee: T₀ = 90°C, room T_a = 20°C. After 5 min, T = 70°C. Find T(20).
Model: T(t) = 20 + 70e^(kt)
At t = 5: 70 = 20 + 70e^(5k)
50 = 70e^(5k) → e^(5k) = 5/7 → k = ln(5/7)/5 ≈ −0.0673
T(20) = 20 + 70e^(20 × (−0.0673))
T(20) = 20 + 70e^(−1.346) ≈ 20 + 70(0.2598) ≈ 20 + 18.2 ≈ 38.2°C
After 20 minutes the coffee is approximately 38.2°C.
Exponential growth is unrealistic for populations with limited resources. The logistic model adds a carrying capacity K — the maximum sustainable population.
A = (K − P₀) / P₀, where P₀ = P(0) is the initial population.
K = 5000 fish, P₀ = 500, k = 0.04. Find P(50) and the inflection point time.
A = (5000 − 500)/500 = 9
P(t) = 5000 / (1 + 9e^(−0.04t))
P(50) = 5000 / (1 + 9e^(−2)) = 5000 / (1 + 9 × 0.1353)
P(50) = 5000 / (1 + 1.218) = 5000 / 2.218 ≈ 2255 fish
Inflection at P = K/2 = 2500:
2500 = 5000/(1 + 9e^(−0.04t)) → 1 + 9e^(−0.04t) = 2
9e^(−0.04t) = 1 → t = −ln(1/9)/0.04 = ln(9)/0.04 ≈ 54.9 years
P(50) ≈ 2255. Maximum growth rate occurs at t ≈ 54.9 years.
When an exact solution is unavailable, Euler's method numerically approximates the solution by stepping along successive tangent lines.
where h is the step size and f(x, y) = dy/dx. Starting from (x₀, y₀), each step uses the current slope to estimate the next y value. Smaller h gives better accuracy but more steps.
Approximate y(0.6). Exact solution: y = 2e^x − x − 1.
| n | xₙ | yₙ | f(xₙ, yₙ) = xₙ + yₙ | yₙ₊₁ = yₙ + 0.2f |
|---|---|---|---|---|
| 0 | 0.0 | 1.0000 | 1.0000 | 1.2000 |
| 1 | 0.2 | 1.2000 | 1.4000 | 1.4800 |
| 2 | 0.4 | 1.4800 | 1.8800 | 1.8560 |
| 3 | 0.6 | 1.8560 | — | — |
Euler approximation: y(0.6) ≈ 1.8560
Exact value: y(0.6) = 2e^(0.6) − 0.6 − 1 ≈ 2(1.8221) − 1.6 ≈ 2.0442
Error ≈ 0.188 (about 9.2%) — reduce h for better accuracy.
| Model / Method | ODE | Solution |
|---|---|---|
| Exponential growth/decay | dN/dt = kN | N(t) = N₀e^(kt) |
| Newton's Law of Cooling | dT/dt = k(T − T_a) | T(t) = T_a + (T₀−T_a)e^(kt) |
| Logistic growth | dP/dt = kP(1 − P/K) | P(t) = K/(1 + Ae^(−kt)) |
| Separable ODE | dy/dx = g(x)h(y) | ∫dy/h(y) = ∫g(x)dx + C |
| Linear first-order | y′ + P(x)y = Q(x) | y = [∫μQdx + C]/μ, μ = e^(∫Pdx) |
| Euler's method | dy/dx = f(x,y) | y_{n+1} = y_n + h·f(x_n, y_n) |
A differential equation is an equation that relates a function to one or more of its derivatives. For example, dy/dx = 2x is a differential equation stating that the derivative of y with respect to x equals 2x. Solving it means finding all functions y(x) that satisfy the equation — in this case y = x² + C for any constant C. Differential equations model real-world processes where the rate of change of a quantity depends on the quantity itself or other variables.
A general solution includes an arbitrary constant C and represents the entire family of solutions to a differential equation. For example, y = Ce^(2x) is the general solution to dy/dx = 2y. A particular solution is obtained by choosing a specific value of C to satisfy an initial condition. If y(0) = 3, then 3 = Ce^0 = C, giving the particular solution y = 3e^(2x). The initial condition pins down one solution from the infinite family.
To solve a separable ODE, rewrite it so that all y terms are on one side and all x terms are on the other, then integrate both sides. For dy/dx = xy: Step 1 — separate: dy/y = x dx. Step 2 — integrate both sides: ln|y| = x²/2 + C. Step 3 — solve for y: |y| = e^(x²/2 + C) = e^C · e^(x²/2), so y = Ae^(x²/2) where A = ±e^C. An equation is separable when it can be written as dy/dx = g(x)·h(y).
A linear first-order ODE has the form dy/dx + P(x)y = Q(x). The integrating factor is μ(x) = e^(∫P(x)dx). Multiply both sides by μ(x) to get d/dx[μ(x)y] = μ(x)Q(x). Then integrate both sides: μ(x)y = ∫μ(x)Q(x)dx + C, giving y = [∫μ(x)Q(x)dx + C] / μ(x). This works because the left side becomes a perfect derivative after multiplying by μ(x).
A direction field (or slope field) is a graphical tool for visualizing solutions to dy/dx = f(x, y). At each point (x, y) in the plane, you draw a short line segment with slope f(x, y). The resulting grid of segments shows the direction a solution curve must follow at every point. You can sketch approximate solution curves by following the direction of the segments — solution curves are always tangent to the line segments at every point they pass through.
An equilibrium solution (or critical point) is a constant solution y = c where dy/dx = 0 for all x. For the autonomous equation dy/dx = f(y): find equilibria by solving f(c) = 0. Stability: if f′(c) < 0, the equilibrium is stable (nearby solutions converge to c). If f′(c) > 0, it is unstable (nearby solutions diverge from c). If f changes sign at c only on one side, it is semi-stable. On a phase line, stable equilibria are labeled with arrows pointing toward c; unstable equilibria have arrows pointing away.
Newton's Law of Cooling states that the rate of change of an object's temperature is proportional to the difference between the object's temperature T and the ambient (surrounding) temperature T_a: dT/dt = k(T − T_a), where k < 0 for cooling. The solution is T(t) = T_a + (T₀ − T_a)e^(kt), where T₀ is the initial temperature. Example: a cup of coffee at 90°C in a 20°C room with k = −0.05 gives T(t) = 20 + 70e^(−0.05t). As t → ∞, T → 20°C (room temperature).
Exponential growth models dP/dt = kP with no upper bound — the population grows forever. Logistic growth adds a carrying capacity K: dP/dt = kP(1 − P/K). When P is small relative to K, growth is nearly exponential. As P approaches K, growth slows. The solution is P(t) = K / (1 + Ae^(−kt)) where A = (K − P₀)/P₀. At P = K/2, the growth rate is maximum. The carrying capacity K is the stable equilibrium — the population stabilizes at K as t → ∞.
Euler's method numerically approximates the solution to an initial-value problem dy/dx = f(x, y), y(x₀) = y₀ when an exact solution is difficult or impossible to find. Using step size h, the iteration formula is: x_{n+1} = x_n + h and y_{n+1} = y_n + h·f(x_n, y_n). At each step you move along the tangent line at the current point. Smaller step sizes give more accurate approximations but require more computation. Euler's method introduces error at each step (local truncation error O(h²) per step, global error O(h)).
Definite and indefinite integrals, integration techniques, and the Fundamental Theorem of Calculus
Differentiation rules, chain rule, implicit differentiation, and applications of derivatives
Properties of e^x and ln(x), exponential growth and decay, and logarithmic identities
Interactive problems with step-by-step solutions and private tutoring — free to try.
Start Practicing Free