Differential Calculus
Qualitative and Numerical Methods for Differential Equations
Almost every differential equation you meet outside a textbook has no solution formula. This topic gives you the two things you can always do anyway: read the qualitative behaviour of solutions straight off the equation (slope fields, phase lines, stability), and produce numerical values step by step (Euler's method). Both are pure applications of the central idea of differential calculus — near a point, a differentiable function looks like its tangent line.
First-order equations and slope fields
A first-order ODE in explicit form is . A function is a solution on an interval if is differentiable on and for every in . An initial value problem (IVP) attaches a condition .
Slope field (direction field). The equation hands you the slope of the solution through every point before you know any solution: at the point any solution passing through has slope . Draw a short segment of that slope at each point of a grid; the picture is the slope field. A solution curve is any curve that is tangent to the field at every one of its points, so you sketch solutions by "flowing with the segments".
Isocline. The isocline of level is the curve ; every field segment on it has slope . The level- isocline (the nullcline) shows where solutions have horizontal tangents, hence where a solution can have a local max or min. An isocline is not usually a solution: it is a solution only in the special case that it is itself a curve whose own slope equals everywhere on it.
Existence and uniqueness (Picard–Lindelöf). If and its -partial derivative are both continuous on an open rectangle containing , then the IVP , has exactly one solution on some open interval around . Two consequences you use constantly: exactly one solution curve passes through each point of that rectangle, and distinct solution curves never touch or cross there.
Both hypotheses and the word "some" matter.
- Continuity of alone gives existence but not uniqueness: , has , discontinuous at , and both and solve it.
- Uniqueness is local in : , has the unique solution , which exists only for .
Autonomous equations and the phase line
An ODE is autonomous when the independent variable does not appear on the right: . Two structural facts follow immediately.
- The slope field depends only on the height , so it is unchanged by horizontal shifts. Hence if is a solution, so is for every constant : solution curves are horizontal translates of one another.
- If , the constant function for all is a solution. Such a is an equilibrium (also: critical point, stationary solution).
Phase line. Draw a -axis, mark every root of , and on each open interval between consecutive roots draw an arrow pointing up where and down where . That one picture classifies every long-run behaviour.
| Sign of just below | Sign of just above | Arrows | Classification |
|---|---|---|---|
| both point at | asymptotically stable (sink) | ||
| both point away | unstable (source) | ||
| both point up, through | semi-stable | ||
| both point down, through | semi-stable |
Linearisation (derivative) test for stability. Suppose is continuously differentiable near and . Then
Monotonicity theorem. Assume is continuously differentiable. A solution that is not an equilibrium can never reach an equilibrium value (uniqueness would force it to be that constant solution), so for its whole life it stays inside one open interval on which has no zero: between two consecutive equilibria, or above the largest one, or below the smallest one, or the entire line if never vanishes. On such an interval has one fixed sign, so every non-equilibrium solution of a scalar autonomous equation is strictly monotone — it can never oscillate. If it stays bounded it converges to an equilibrium as . If it is unbounded, beware: it may run off to or in finite time (as does), so it need not exist for all .
Concavity of solutions. By the chain rule, . Along a non-equilibrium solution keeps one sign, so the concavity flips exactly where flips. Precisely: if the solution passes through a level with and changes sign at , the curve has an inflection point there. The sign change is essential — alone is not enough. For we have , which vanishes at without changing sign, and ; a solution crossing the level has there but is concave up on both sides, so there is no inflection.
The logistic equation
Here is the intrinsic growth rate and the carrying capacity. The right side is a downward parabola with roots and and vertex at , where is the largest possible growth rate.
Since , we get (so is unstable) and (so is asymptotically stable).
| Initial size | Sign of | Behaviour | Concavity |
|---|---|---|---|
| increases to | up, then down after (inflection) | ||
| increases to | concave down throughout | ||
| constant | straight line | ||
| decreases to | concave up throughout |
Separating variables and using partial fractions gives the explicit solution
and indeed , while for every — exactly what the phase line predicted.
Euler's method
Derivation. Suppose you know the exact point on a solution. The linear approximation (tangent line) at that point is , and the ODE hands you the slope: . Stepping forward a distance and calling the result :
Geometrically you walk along the slope field in short straight segments, re-reading the slope at the start of each segment.
Worked example A — an Euler table. Approximate for , , with .
So . The exact solution is (check: and ), giving . The error is . Redoing the computation with (eight steps) gives and error — the error dropped by a factor of about , i.e. roughly in half when was halved.
Error analysis. Taylor's theorem with remainder gives, for a twice-differentiable exact solution,
so one step started from an exact value costs a local truncation error of size . Covering a fixed interval takes steps, and : Euler's method is first-order accurate. Halving roughly halves the global error (and doubles the work).
Error bound theorem. Suppose is continuous on a rectangle that contains both the exact solution curve and every Euler point over , suppose satisfies a Lipschitz condition in its second variable there, with , and suppose the exact solution satisfies there. Then for every step in ,
Direction of the error. A tangent line lies below a concave-up curve and above a concave-down curve. So on a step where the exact solution is concave up, Euler undershoots; where it is concave down, Euler overshoots. This is exact for a single step from a true point and a reliable rule of thumb over many steps as long as the concavity does not change sign.
Worked example B — a phase line. Analyse .
Step 1 — equilibria. gives (double root) and .
Step 2 — sign chart. For : and , so . For : both factors positive, . For : , so .
Step 3 — phase line. Arrows point up on , up on , down on . Hence is semi-stable (attracting from below, repelling from above) and is asymptotically stable.
Step 4 — cross-check with the derivative test. . Then , confirming that is stable. But , so the test says nothing at — only the sign chart of Step 2 reveals the semi-stability.
Step 5 — shape of solutions. . For this is positive when and negative when : a solution starting at rises, is concave up until it passes the level , then is concave down as it levels off at .
Common mistakes
- Treating an isocline as a solution. For the field segments are horizontal along , so students draw as a solution curve. Wrong: the function has slope , not . Right: is a solution, because there its own slope matches .
- ", so is stable." Wrong — that is precisely the inconclusive case. Right: fall back on the sign of on both sides.
- Differentiating the wrong function for stability. The test uses , the derivative of the right-hand side with respect to — not , and not the second derivative of a solution.
- Reading equilibria off the wrong equation. For the equilibria are , from ; is not one.
- Missing repeated roots. has an equilibrium at that is easy to skip and is semi-stable, not stable.
- Letting a solution cross an equilibrium. With continuously differentiable, uniqueness forbids it, and a non-equilibrium solution never even reaches an equilibrium value in finite time — it only approaches it as .
- Euler bookkeeping. Wrong: (forgot ), or (advanced too early). Right: compute the slope at the point you are standing on, then advance both and .
- "Halving quarters the error." That is the local error, . The accumulated error over a fixed interval is , so halving roughly halves it.
- "Euler always underestimates." Only when the solution is concave up. For with the solution is concave down and Euler overestimates.
Key terms
- Slope field (direction field)
- Isocline
- Nullcline
- Initial value problem
- Existence and uniqueness theorem
- Autonomous equation
- Equilibrium solution
- Critical point of an ODE
- Phase line
- Asymptotically stable equilibrium (sink)
- Unstable equilibrium (source)
- Semi-stable equilibrium
- Linearisation test for stability
- Monotonicity of autonomous solutions
- Logistic equation
- Carrying capacity
- Intrinsic growth rate
- Inflection point of a solution curve
- Euler's method
- Step size
- Local truncation error
- Global error
- First-order accuracy
- Linear approximation
Practice Problems
Consider the differential equation .
(a) Compute the slope of the direction-field segment at each of the points , , , , and .
(b) Find the isocline of level for a general constant , and describe the family geometrically.
(c) Show that is a solution, and explain why (where the segments are horizontal) is not.
Show hint
The slope at a point is just the right-hand side evaluated there; an isocline of level is the curve .
Show answer
(a) Here , so the field slope at is .
| Point | Slope | |
|---|---|---|
(b) The level- isocline is the set where , i.e.
This is a family of parallel straight lines of slope , one for each . Along the line every field segment has slope . In particular the nullcline () is the line , where all segments are horizontal.
(c) Substitute into both sides:
They agree for every , so is a solution on all real numbers.
For : the left side is , but the right side is . Since , is not a solution. The confusion comes from mixing up two different slopes: along the field prescribes slope , while the curve has slope . An isocline of level is a solution only when the isocline itself is a line of slope exactly — which happens here only for , giving the isocline , the solution found above.
Remark (consistency check). The general solution is : indeed and . Since as , every solution curve funnels toward the line , which is exactly what the slope field shows.
Use Euler's method with step size and two steps to estimate for the initial value problem
Then solve the IVP exactly by separation of variables, compare, and explain the sign of the error using concavity.
Show hint
Write down and evaluate the slope at the point you are currently standing on, before advancing .
Show answer
Step 1 — set up. , , , , and
Step 2 — first step ().
Step 3 — second step ().
So Euler's method gives .
Step 4 — exact solution. The equation is separable and is an equilibrium that our solution never meets, so for
The condition gives , so and
(Check: , and .)
Step 5 — compare.
The error is , so Euler underestimates by about (roughly ).
Step 6 — why it underestimates. Differentiate the ODE: . On our solution , so and the solution curve is concave up on . A tangent line to a concave-up curve lies below it, and Euler's method walks along tangent lines, so each step lands below the true curve. Hence the underestimate.
For the autonomous equation :
(a) find all equilibrium solutions; (b) draw the phase line and classify each equilibrium as stable, unstable or semi-stable, confirming your answer with the derivative test; (c) state for the initial values , and .
Show hint
Factor the right-hand side, mark its zeros on a vertical -axis, and decide the sign of on each of the three resulting intervals.
Show answer
(a) Equilibria. Set , so
The constant functions and are solutions.
(b) Phase line. is an upward parabola with roots , so:
| Interval | Test value | Arrow | |
|---|---|---|---|
| up | |||
| down | |||
| up |
Reading the arrows:
- At : arrows point up from below and down from above, so both point at . It is asymptotically stable.
- At : arrows point down below it and up above it, so both point away. It is unstable.
Derivative test check. , so (stable) and (unstable). Both signs agree with the phase line, and neither is the inconclusive case .
(c) Limits.
- lies in where : the solution increases, and by uniqueness it cannot cross the equilibrium . Being increasing and bounded above by , it converges: .
- lies in where : the solution decreases toward the equilibrium below it, so .
- lies in where : the solution increases and is unbounded above, so . Read this one carefully: the escape happens in finite time (see the remark), so the solution simply stops existing at and is not defined.
Remark — what the phase line does not tell you. In the third case the blow-up happens in finite time. Separating variables with gives , and forces , so
whose denominator vanishes when , i.e. at . The phase line gives the direction of motion but never the timing.
A fish population satisfies the logistic model
with in years.
(a) Find the equilibria and classify them. (b) At what population is the population growing fastest, and what is that maximum growth rate? (c) Solve the equation explicitly and use it to find the year in which the growth rate is largest, and the population after years.
Show hint
Compare with to read off and ; the growth rate is a parabola in , so its maximum is at the vertex.
Show answer
Matching with the standard form gives per year and carrying capacity fish, with .
(a) Equilibria. when or . Since
we get , so is unstable, and , so is asymptotically stable. (Phase line: on — arrows up — and for — arrows down.)
(b) Fastest growth. is a downward parabola in , so it is maximised at the vertex, where :
The maximum growth rate is
matching the general formula .
(c) Explicit solution. Using with :
(Check: . ✓)
Year of fastest growth. Solve :
Population after 50 years. With :
This is consistent with the qualitative picture: has passed the inflection level (which happened at ), is now concave down, and is climbing slowly toward the carrying capacity .
Consider .
(a) Find all equilibria and classify each one, stating explicitly where the derivative test fails and why. (b) Describe for , and .
Show hint
A squared factor cannot change sign — think about what that does to the arrows on either side of that root.
Show answer
(a) Equilibria. gives (a double root) and .
Sign chart. The factor is always and vanishes only at , so away from the sign of is the sign of :
| Interval | Arrow | |||
|---|---|---|---|---|
| down | ||||
| up | ||||
| up |
Test values confirm this: , , .
Classification.
- : arrows point down below it and up above it — both away. It is unstable (a source).
- : arrows point up on both sides, so solutions below are attracted to it while solutions above run away. It is semi-stable.
Derivative test. Differentiate with the product rule and factor:
Then , confirming that is unstable. But
so the linearisation test is inconclusive at — the borderline case. Only the sign chart of itself (Step above: on both sides) reveals that is semi-stable. This is exactly why a repeated root must never be classified by the derivative test alone.
(b) Long-run behaviour.
- lies in where : the solution decreases, moving away from the equilibrium that sits above it, so it is unbounded below and . This happens in finite time: putting gives (using for ), and is finite. So there is a finite with as from the left, and strictly speaking does not exist — the solution does not live that long.
- lies in where : the solution increases, is trapped below the equilibrium by uniqueness, and being increasing and bounded it converges: .
- lies in where : the solution increases and there is no equilibrium above it, so — again in finite time, since once we have and , hence , and is finite.
This trio is the signature of a semi-stable equilibrium: approach from one side, escape from the other.
Let solve with .
(a) Without solving, determine where the solution curve is concave up and where it is concave down, and find the -value of its inflection point. (b) Solve the equation explicitly and find the exact time at which the inflection occurs.
Show hint
Differentiate the ODE itself with respect to using the chain rule — you will get in terms of alone.
Show answer
Here , which is the logistic right-hand side with and .
(a) Concavity. Differentiate the equation with respect to , using the chain rule on the right:
Since ,
The solution starts at , which lies in where ; by uniqueness it stays trapped in and increases toward . On that range and , so the sign of is the sign of :
| Range of | Shape | ||
|---|---|---|---|
| concave up | |||
| inflection | |||
| concave down |
So the curve is concave up while , concave down after, with the inflection at the level
exactly the logistic half-capacity level — where the growth rate is largest, .
(b) Exact time. Use the logistic formula with , and
(Check: ✓, and as ✓.)
Set :
Answer. Concave up for , concave down for ; the inflection point is at height , reached at the exact time .
Use Euler's method with to approximate for
Show the full table of four steps. Then find the exact solution, compute the error, and explain the sign of the error. Finally, predict (do not recompute from scratch) the approximate error if you instead used .
Show hint
Simplify the update rule algebraically first: collapses to something very short.
Show answer
Step 1 — simplify the update. With and ,
Step 2 — the table. Starting at , :
So .
Step 3 — exact solution. The equation is separable (and autonomous, with equilibrium ). For :
The condition gives , so and
(Check: and ✓.)
Step 4 — error.
The error is
so Euler overestimates by about .
Step 5 — why an overestimate. Differentiate the ODE: . Since starts at and increases toward the equilibrium without reaching it, throughout, so : the exact solution is concave down on . Tangent lines lie above a concave-down curve, and Euler follows tangent lines, so every step overshoots. (Contrast with a concave-up problem, where Euler undershoots — the direction of the Euler error is not fixed, it is decided by concavity.)
Step 6 — prediction for . Euler is a first-order method: the global error on a fixed interval is , so halving the step size roughly halves the error. Predicted error:
(Carrying out the eight steps actually gives , error — a ratio of , confirming the first-order behaviour.)
Apply Euler's method to , , on the interval .
(a) Show that with step size the approximation to is exactly . (b) Tabulate this approximation and its error for , and compute the ratio of consecutive errors. (c) Explain what the table demonstrates about the order of accuracy, and identify the limit of as .
Show hint
Write out , , in terms of and look for the pattern before doing any arithmetic.
Show answer
(a) A closed form for the Euler iterates. Here , so the update is
This is a geometric recursion. With ,
Reaching takes steps, so the Euler approximation to is
The exact solution is (since and ), so the true value is .
(b) The table. Each entry is and the error is .
| Error | Ratio to previous error | |||
|---|---|---|---|---|
| — | ||||
Sample arithmetic: , so ; and , , .
(c) Interpretation. Every time is halved the error shrinks by a factor that is climbing steadily toward : An error behaving like would give a ratio of on halving ; a ratio tending to means . This is the numerical signature of a first-order method: the global error on a fixed interval is , not . (The local error is , but there are steps, and . The ratios approach only in the limit because the term also carries higher-order corrections, visible at these fairly large .)
Finally, the approximations converge to the exact answer, which is the classical limit
So Euler's method applied to is, quite literally, the definition of in disguise.
Let be continuously differentiable on all real numbers with
Let be the solution of with , defined for all . Prove, without any formula for or , that:
(a) for all ; (b) is strictly increasing; (c) .
Show hint
Start from the fact that the constant functions and are themselves solutions, then invoke the uniqueness theorem.
Show answer
(a) The solution is trapped in . Because and , the constant functions and are solutions of the ODE. Since is continuously differentiable, the hypotheses of the existence-and-uniqueness theorem hold at every point, so exactly one solution passes through each point of the -plane and distinct solution curves cannot meet.
Suppose, for contradiction, that for some . Then and the constant solution both solve the same IVP with data , so uniqueness forces for all — contradicting . The same argument rules out . Since is continuous and lies in , the Intermediate Value Theorem says could only leave by taking the value or , which we have just excluded. Hence
(b) Strict monotonicity. By part (a), lies in for every , and there. Therefore
so by the Increasing/Decreasing Test is strictly increasing on .
(c) The limit is . is increasing and bounded above by , so by the Monotone Convergence Theorem the limit
exists and satisfies .
Now show . Suppose instead (it cannot be negative: lies in , where by continuity). Since is continuous and , the composite satisfies , so there is with
Integrating from to (or applying the Mean Value Theorem) gives
contradicting the boundedness . Hence .
Finally, lies in , and has no zero in by hypothesis, so cannot lie in . The only possibility left is
Comment. This is the general theorem behind every phase-line reading: between consecutive equilibria a solution is monotone and it converges to the equilibrium the arrows point at — it never oscillates, never crosses an equilibrium, and never stalls at a non-equilibrium level.
The standard global error bound for Euler's method on says that if satisfies and the exact solution obeys on the relevant region, then
Apply this to , on .
(a) Identify valid constants and . (b) Find the largest step size the bound guarantees will keep the error at below , and the corresponding number of steps (with ). (c) Compare with the true error at that and comment.
Show hint
For the Lipschitz constant comes straight out of ; for you need a bound on the second derivative of the exact solution on .
Show answer
(a) The constants. With ,
so works (and is the smallest such constant). The exact solution is , so , and on
Take .
(b) Solving the inequality. At with , , :
Compute the coefficient:
Require :
With this means , so the smallest integer is
Verify both sides of the cut: at the bound is ✓, while at it is ✗. So steps is the answer the bound guarantees.
(c) The true error. From the previous style of computation, Euler on gives , so with :
and the actual error is
Comment. The true error is about times smaller than the guaranteed bound . This is typical: the bound is built from worst-case estimates ( replaced by its maximum everywhere, and the exponential factor assumes errors amplify at the fastest possible rate), so it is safe but conservative. Notice also the practical message about first-order accuracy: buying two extra decimal digits of accuracy costs a factor of about in the number of steps, which is why higher-order methods (improved Euler, Runge–Kutta) exist.
A fish population obeys logistic growth with harvesting at a constant rate (fish per year):
(a) For , find the equilibria exactly and classify them. (b) Determine the critical harvest rate above which no equilibrium exists, classify the single equilibrium at , and describe what happens for . (c) With , describe the fate of a population starting at and at .
Show hint
The right-hand side is a downward parabola in ; everything (number of roots, signs, stability) is decided by its discriminant and its opening direction.
Show answer
Write the right-hand side as
This is a downward parabola in (leading coefficient ), so outside its roots and strictly between them, whenever two real roots exist.
(a) The case . Solve . Multiply by :
With : , and , so
Phase line: on , on , on .
| Equilibrium | Arrow below | Arrow above | Classification |
|---|---|---|---|
| down | up | unstable | |
| up | down | asymptotically stable |
Derivative check. , so (unstable) and (stable). Both agree. Notice is a threshold: fall below it and the population is doomed.
(b) Critical harvest rate. Real equilibria exist exactly when the discriminant is non-negative:
So fish per year. This equals the maximum of the unharvested growth rate, — the maximum sustainable yield, attained at .
At the two roots merge at
Here , so on both sides of : arrows point down everywhere and is semi-stable (attracting from above, repelling from below). The derivative test is useless here, since — the inconclusive case, as expected for a double root.
For the discriminant is negative, there is no equilibrium, and for every . The population therefore decreases at a rate bounded away from zero and reaches in finite time: harvesting harder than the maximum sustainable yield wipes out the stock no matter how large it starts.
(c) Two initial conditions with .
- : this is below the threshold , where . The population decreases; since there is no equilibrium in , it does not level off but hits in finite time — extinction. (Concretely, fish per year at the start.)
- : this lies in , where (). The population increases, cannot cross the equilibrium by uniqueness, and being increasing and bounded above it converges:
