Direction Fields and Existence
Direction fields connect the equation to the geometry of its solutions. At each point in the plane, the value gives the slope of any solution curve that passes through that point. Before solving symbolically, a direction field can reveal equilibrium solutions, blow-up, attraction, repulsion, and whether a proposed formula has the right qualitative behavior.
Existence and uniqueness theorems explain when an initial value problem is well posed. They do not usually give the solution, but they tell us whether one solution curve should pass through a starting point or whether several curves might pass through the same point. This is essential in engineering modeling because a deterministic model should usually produce a unique future from a specified present state.
Definitions
For an explicit first-order ODE
a direction field, or slope field, assigns to each point a short line segment of slope . A solution curve is tangent to these segments at every point it crosses.
An initial value problem is
The function is the velocity field in the phase picture. When depends only on , the equation is autonomous:
The zeros of are equilibrium solutions. If , then is a constant solution.
Euler's method approximates the solution by stepping along the local slope. With step size ,
This is a numerical version of following the direction field.
Key results
The basic existence theorem says that if is continuous in a rectangle around , then at least one local solution exists. The stronger existence and uniqueness theorem says that if both and are continuous in such a rectangle, then exactly one local solution passes through .
The word local matters. The theorem may guarantee a solution near even though the solution later leaves the rectangle, hits a singularity, or becomes unbounded. For example, , , has solution , which exists only for despite the smooth right side.
Uniqueness has a geometric meaning: solution curves cannot cross in a region where the uniqueness hypotheses hold. If two different curves crossed at the same point, the same initial condition would have two futures. This crossing rule is often the fastest way to reject an incorrect sketch.
Nonuniqueness commonly appears when is not continuous or when is not Lipschitz in . The classic example is
The zero solution is valid, but so are solutions that remain zero for a while and then peel away. The direction field alone may look harmless near the axis, so the theorem's hypotheses provide a sharper warning.
For autonomous equations, a phase line summarizes all solution directions. Mark the equilibria on the -axis and test the sign of between them. Positive sign means arrows upward as increases; negative sign means arrows downward. Stable equilibria attract nearby solutions, unstable equilibria repel them, and semistable equilibria attract from one side and repel from the other.
Euler's method has local truncation error of order and global error of order under typical smoothness assumptions. That means halving usually halves the accumulated error. This is useful for estimates, but Euler's method can behave poorly on stiff equations or over long intervals. Direction fields are qualitative; numerical values still need step-size checks.
Isoclines make slope fields easier to draw by hand. An isocline is a curve on which has a constant value . Along that curve, every field segment has slope . For the equation , the isoclines are lines , or . Drawing a few isoclines gives the field's structure without computing a separate slope at every grid point.
Nullclines are especially important. In a first-order scalar equation, a nullcline is a curve where . A solution crossing such a curve has a horizontal tangent. In autonomous equations the nullclines are exactly the equilibrium levels, but in nonautonomous equations they can move with . A nullcline is not automatically a solution curve unless the right side remains zero along that curve in the way the differential equation requires.
Comparison ideas also come from the direction field. If two solution curves start ordered and uniqueness holds, they cannot cross, so their order is preserved as long as both remain in the same uniqueness region. This is often used to bound complicated solutions between simpler ones. For instance, if a model has a nonlinear drag term that is difficult to solve exactly, one can compare it with a linear drag model to estimate decay.
The theorem's hypotheses are sufficient, not necessary. A problem can have a unique solution even if the standard condition on fails, and a problem can be useful even if the theorem does not apply at a few exceptional points. The practical habit is to state what the theorem guarantees, then use direct checking or modeling information for points outside its reach.
When using a direction field as a diagnostic, check three features. First, the initial tangent should match . Second, a solution should flatten near attracting equilibria or nullclines. Third, any claimed explicit solution should follow the same monotonicity and concavity suggested by nearby field segments. These checks catch many algebra mistakes before substitution.
Visual
| Situation | What to inspect | Qualitative consequence |
|---|---|---|
| Horizontal phase-line mark | Constant solution | |
| continuous | Uniqueness hypotheses | Solution curves do not cross |
| discontinuous | Breaks in slope field | Existence may fail at that point |
| Large | Very steep field segments | Rapid change or possible blow-up |
| Euler step too large | Numerical path cuts across slopes | Apparent behavior may be artificial |
Worked example 1: Phase line for logistic growth
Problem. Analyze the autonomous equation
Method.
- Find equilibria:
Thus
- Test intervals.
For , choose :
so arrows point downward.
For , choose :
so arrows point upward.
For , choose :
so arrows point downward.
- Determine stability. Arrows point away from on both sides, so is unstable. Arrows point toward from both sides, so is stable.
Answer. Positive initial data below increase toward , while positive initial data above decrease toward .
Check. The carrying capacity is . The model's long-term behavior matches the interpretation: growth slows as the population approaches the carrying capacity.
Worked example 2: Existence without uniqueness
Problem. Show that the initial value problem
does not have a unique solution.
Method.
- Verify the zero solution:
So satisfies the ODE and initial condition.
- Look for a positive solution for . If ,
Separate:
- Integrate:
- Use a curve that leaves the origin immediately. With ,
so
- Check:
- More generally, for any delay ,
is also a solution.
Answer. The problem has infinitely many solutions, so uniqueness fails.
Check. The derivative of is unbounded near , so the usual uniqueness hypothesis is not satisfied.
Code
import numpy as np
def euler(f, x0, y0, h, n):
xs = [x0]
ys = [y0]
x, y = x0, y0
for _ in range(n):
y = y + h * f(x, y)
x = x + h
xs.append(x)
ys.append(y)
return np.array(xs), np.array(ys)
def logistic(x, y):
return 0.4 * y * (1.0 - y / 10.0)
xs, ys = euler(logistic, 0.0, 2.0, h=0.1, n=100)
print(ys[-1])
Common pitfalls
- Treating the existence theorem as a global theorem. It only guarantees a solution near the initial point.
- Forgetting that uniqueness requires more than continuity of ; a condition such as continuity of or a Lipschitz condition in is needed.
- Drawing solution curves that cross in a region where uniqueness holds.
- Inferring stability from the location of equilibria alone. The signs of between equilibria determine the arrows.
- Using Euler's method with a large step size and trusting the plot without checking convergence as decreases.
- Ignoring singular lines such as or when the formula for contains denominators.
- Calling a horizontal tangent an equilibrium in a nonautonomous equation. A moving nullcline only marks where the instantaneous slope is zero.
- Forgetting to report the interval over which a numerical or qualitative conclusion is being made.