Differential Equations and Initial-Value Problems

Published on 2026-11-04·v1.0

Learning Objectives

  • Define a differential equation, its order, and what it means for a function to be a solution on an interval.
  • Verify a candidate solution by substituting it into the equation and into the initial condition.
  • Distinguish a general solution from a particular solution, and state what an initial-value problem adds.
  • State the existence and uniqueness theorem with its hypotheses, and recognize an equation where the conclusion fails.
  • Read a slope field, follow it with Euler's method, and judge the error of the result.
  • Solve y′=kyy' = ky and use it for exponential growth, decay, doubling time, and half-life.

Context & Motivation

Many laws of change are stated as rates: a population grows in proportion to its size, a hot object loses heat in proportion to the temperature gap, a parameter vector moves against the gradient of a loss. A rate is a derivative, so the law is an equation containing the unknown function and its derivative. That is a differential equation, and solving it means finding the function whose rate of change obeys the law.

The simplest case, y′=f(t)y' = f(t), is solved by antiderivatives (antiderivatives-and-initial-value-problems). Here the right-hand side may depend on yy itself, so the answer is no longer one integral away. This lesson sets up the vocabulary, the substitution check used on every solution that follows, the theorem on when an answer exists and is unique, and the first model, exponential growth and decay. The next lesson, separable-differential-equations, solves a whole class of such equations.

Core Theory

Equations, order, and solutions

An ordinary differential equation (ODE) relates an unknown function y(t)y(t) of one variable to its derivatives. Its order is the highest derivative that appears: y′=2yy' = 2y is first order, y′′+4y=0y'' + 4y = 0 is second order.

A solution on an interval II is a differentiable function that turns the equation into a true identity for every t∈It \in I. The interval is part of the answer: a formula can solve the equation on one interval and be meaningless on another.

The reliable test of a solution is substitution: put the candidate and its derivatives into the equation and check that both sides agree for every tt in the interval, that is, that the residual y′−f(t,y)y' - f(t, y) simplifies to 00. It works however the candidate was found, so it is the last step of every problem below.

General and particular solutions, initial-value problems

For a first-order equation, solutions usually come as a family with one arbitrary constant. For y′=2yy' = 2y, every function y=Ce2ty = Ce^{2t} works: y′=2Ce2t=2yy' = 2Ce^{2t} = 2y. This is a general solution. A particular solution fixes the constant. A second-order equation typically needs two constants, one per order.

An initial-value problem (IVP) pairs the equation with conditions that fix the constants: for a first-order equation, y(t0)=y0y(t_0) = y_0. For y′=2yy' = 2y, y(0)=3y(0) = 3 gives C=3C = 3 and y=3e2ty = 3e^{2t}. The condition is part of what you must verify.

A general solution is not a guarantee that no other solution exists; Example 2 has one outside its family.

Existence and uniqueness

Consider the IVP y′=f(t,y)y' = f(t, y), y(t0)=y0y(t_0) = y_0.

Theorem (Picard and Lindelöf). Suppose ff and ∂f/∂y\partial f/\partial y are both continuous on an open rectangle in the (t,y)(t, y) plane that contains (t0,y0)(t_0, y_0). Then there is some interval around t0t_0 on which the IVP has a solution, and two solutions agree on every interval containing t0t_0 on which both stay in the rectangle.

The theorem is local: it guarantees a solution near t0t_0, not for all tt. And uniqueness is guaranteed by the second hypothesis (sufficient, not necessary: y′=∣y∣y' = \lvert y\rvert has no ∂f/∂y\partial f/\partial y at y=0y = 0, yet each of its IVPs has one solution). With only ff continuous, a solution exists but uniqueness can fail. Both failures appear below. A consequence used later: when the hypotheses hold everywhere, two different solution curves never touch, since touching would mean two solutions through one point.

Slope fields and Euler's method

The equation y′=f(t,y)y' = f(t, y) assigns a slope to every point (t,y)(t, y). Draw a short segment with that slope at each point and you have a slope field (also called a direction field). A solution curve is one that is tangent to the segments everywhere it passes. For y′=t−yy' = t - y the slopes at a few points are:

text
slope = t - y t=0 t=1 t=2 t=3 t=4 y = 3 -3 -2 -1 0 1 y = 2 -2 -1 0 1 2 y = 1 -1 0 1 2 3 y = 0 0 1 2 3 4 y = -1 1 2 3 4 5

The slope is 00 along the line y=ty = t, negative above it and positive below it. A solution that starts above that line falls until it meets the line, then rises.

Euler's method turns the picture into an algorithm: from (tn,yn)(t_n, y_n), follow the local slope for a step hh:

yn+1=yn+h f(tn,yn),tn+1=tn+h.y_{n+1} = y_n + h\,f(t_n, y_n), \qquad t_{n+1} = t_n + h.

It is the tangent-line approximation applied repeatedly. The error at a fixed time shrinks roughly in proportion to hh (it is a first-order method), and in general it does not vanish for a fixed hh.

Exponential growth and decay

Suppose a quantity changes at a rate proportional to its size: y′=kyy' = ky, y(0)=y0y(0) = y_0, with kk constant. The function y=y0ekty = y_0 e^{kt} solves it. To see that it is the only solution, let yy be any solution on an interval and compute

ddt(y e−kt)=y′e−kt−ky e−kt=(y′−ky) e−kt=0.\frac{d}{dt}\left(y\,e^{-kt}\right) = y'e^{-kt} - ky\,e^{-kt} = (y' - ky)\,e^{-kt} = 0.

A function whose derivative is zero on an interval is constant there (a consequence of the Mean Value Theorem, the-mean-value-theorem-and-monotonicity), so ye−kt=Cy e^{-kt} = C, and the initial condition gives C=y0C = y_0. The word "interval" matters: on a domain such as t≠0t \neq 0, which has two pieces, the constant may differ on each piece.

For k>0k > 0 this is growth with doubling time T2=ln⁡2/kT_2 = \ln 2 / k. For k<0k < 0 it is decay with half-life T1/2=ln⁡2/∣k∣T_{1/2} = \ln 2 / \lvert k \rvert. Both are independent of the starting amount, which is the signature of exponential change.

Worked Examples

Example 1: verifying a solution, and its interval

Check that y=1/(1−t)y = 1/(1 - t) solves y′=y2y' = y^2, y(0)=1y(0) = 1.

y′=1(1−t)2=y2,y(0)=11−0=1.y' = \frac{1}{(1-t)^2} = y^2, \qquad y(0) = \frac{1}{1 - 0} = 1.

Both sides agree, so the formula solves the equation wherever it is defined and differentiable, which is t≠1t \neq 1, a set with two pieces. It meets y(0)=1y(0) = 1 on the piece containing t0=0t_0 = 0. The solution of the IVP through (0,1)(0, 1) lives on (−∞,1)(-\infty, 1), the piece that contains t0=0t_0 = 0. A numerical integration agrees (y(0.9)=10y(0.9) = 10, y(0.99)=100y(0.99) = 100) and runs away to infinity as t→1−t \to 1^-.

This is the locality in the theorem: y2y^2 and 2y2y are continuous on the whole plane, yet the solution blows up in finite time.

Example 2: when uniqueness fails

Consider y′=3y2/3y' = 3y^{2/3}, y(0)=0y(0) = 0, with the real cube root. The function y≡0y \equiv 0 is a solution: both sides are 00. The function y=t3y = t^3 also is: y′=3t2y' = 3t^2 and 3(t3)2/3=3t23(t^3)^{2/3} = 3t^2 for every real tt, and y(0)=0y(0) = 0. So one IVP has two solutions.

There are many more. For any c≥0c \ge 0, take y=0y = 0 for t≤ct \le c and y=(t−c)3y = (t - c)^3 for t>ct > c: the second piece has derivative 3(t−c)2→03(t-c)^2 \to 0 at t=ct = c, matching the first, so the glued function solves the equation. A solution can sit at 00 as long as it likes and then lift off.

The theorem explains it. Here f(y)=3y2/3f(y) = 3y^{2/3} is continuous, but ∂f/∂y=2y−1/3\partial f/\partial y = 2y^{-1/3} is undefined at y=0y = 0 and unbounded near it (it is 2020 at y=10−3y = 10^{-3} and 20002000 at y=10−9y = 10^{-9}). The second hypothesis fails at exactly the initial point. Also, the family y=(t−c)3y = (t - c)^3 never equals the zero function, so y≡0y \equiv 0 lies outside that "general solution".

Example 3: Euler's method against the exact solution

Take y′=t−yy' = t - y, y(0)=1y(0) = 1. The function y=t−1+2e−ty = t - 1 + 2e^{-t} solves it: y′=1−2e−ty' = 1 - 2e^{-t} and t−y=1−2e−tt - y = 1 - 2e^{-t}, and y(0)=−1+2=1y(0) = -1 + 2 = 1. With h=0.5h = 0.5, Euler gives:

text
t Euler y exact y 0.0 1.0000 1.0000 0.5 0.5000 0.7131 1.0 0.5000 0.7358 1.5 0.7500 0.9463 2.0 1.1250 1.2707

The error at t=2t = 2 is 0.14570.1457. Halving the step gives errors at t=2t = 2 of 0.07040.0704 (h=0.25h = 0.25), 0.03450.0345 (h=0.125h = 0.125), and 0.01710.0171 (h=0.0625h = 0.0625): each halving of hh roughly halves the error.

Example 4: Euler's method is gradient descent

Minimize f(x)=5x2f(x) = 5x^2 by gradient descent with step size hh: xk+1=xk−h f′(xk)=(1−10h) xkx_{k+1} = x_k - h\,f'(x_k) = (1 - 10h)\,x_k. This is exactly Euler's method applied to the gradient flow x′=−f′(x)=−10xx' = -f'(x) = -10x, whose solution is x(t)=x0e−10tx(t) = x_0 e^{-10t} (see gradients-extending-derivatives-to-several-variables for the gradient in several variables). Starting from x0=1x_0 = 1:

text
h factor 1-10h x_0..x_5 0.05 0.5 1, 0.5, 0.25, 0.125, 0.0625, 0.0312 0.15 -0.5 1, -0.5, 0.25, -0.125, 0.0625, -0.0312 0.20 -1.0 1, -1, 1, -1, 1, -1 0.25 -1.5 1, -1.5, 2.25, -3.375, 5.0625, -7.5938

The true flow decays monotonically, but Euler's iterates converge only when ∣1−10h∣<1\lvert 1 - 10h \rvert < 1, that is 0<h<0.20 < h < 0.2. At h=0.15h = 0.15 the iterates converge while flipping sign, so they do not follow the flow at all; at h=0.25h = 0.25 they diverge. A step that is too large breaks the discretization even though the continuous equation is perfectly well behaved.

Example 5: half-life

A substance decays with a half-life of 88 days (a hypothetical value). Then k=−ln⁡2/8≈−0.08664 day−1k = -\ln 2 / 8 \approx -0.08664\ \text{day}^{-1} and y=y0ekt=y0 2−t/8y = y_0 e^{kt} = y_0\,2^{-t/8}. After 3030 days the fraction left is 2−30/8≈0.07432^{-30/8} \approx 0.0743, about 7.4%7.4\%. The time to fall to 1%1\% solves 2−t/8=0.012^{-t/8} = 0.01, so t=8log⁡2100≈53.15t = 8\log_2 100 \approx 53.15 days. Substitution check: y′=−ln⁡28 y02−t/8=kyy' = -\frac{\ln 2}{8}\,y_0 2^{-t/8} = k y.

Common Misconceptions & Pitfalls

  • "A solution is a number." It is a function, and it comes with an interval. Example 1's formula is also defined for t>1t > 1, but that branch is a different solution and does not satisfy y(0)=1y(0) = 1.
  • "A smooth equation has solutions for all time." The theorem is local, and y′=y2y' = y^2 blows up.
  • "An IVP always has exactly one solution." It does, on some interval around t0t_0, when ff and ∂f/∂y\partial f/\partial y are continuous near the initial point. Drop the second condition and Example 2 can appear.
  • "The general solution lists every solution." It lists the family you get from the usual method. Check for solutions outside it, as the next lesson does systematically.
  • "A smaller Euler step is always safer, a larger one only less accurate." Too large a step can make the iteration unstable, as in Example 4.
  • Checking the formula but not the initial condition. A function can satisfy the equation and miss y(t0)=y0y(t_0) = y_0, so it solves a different IVP.

Summary

A solution of a differential equation is a function on an interval that turns the equation into an identity, tested by substitution. A first-order general solution carries one constant, which an initial condition fixes. If ff and ∂f/∂y\partial f/\partial y are continuous near (t0,y0)(t_0, y_0), the IVP has a unique solution on some interval around t0t_0, but only locally, and without the second hypothesis uniqueness can fail (y′=3y2/3y' = 3y^{2/3}). Slope fields show the solution curves and Euler's method follows them in steps, with error proportional to hh and instability for large hh, which is why gradient descent has a step-size limit. The equation y′=kyy' = ky has the unique solution y0ekty_0e^{kt}, with doubling time or half-life ln⁡2/∣k∣\ln 2 / \lvert k \rvert.

Documentation Links