Navigation

Concept Review

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 dydx=F(x,y)\dfrac{dy}{dx}=F(x,y). A function y=g(x)y=g(x) is a solution on an interval II if gg is differentiable on II and g(x)=F(x,g(x))g'(x)=F\left(x,g(x)\right) for every xx in II. An initial value problem (IVP) attaches a condition y(x0)=y0y(x_0)=y_0.

Slope field (direction field). The equation hands you the slope of the solution through every point before you know any solution: at the point (a,b)(a,b) any solution passing through has slope F(a,b)F(a,b). 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 kk is the curve F(x,y)=kF(x,y)=k; every field segment on it has slope kk. The level-00 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 kk everywhere on it.

Existence and uniqueness (Picard–Lindelöf). If FF and its yy-partial derivative FyF_y are both continuous on an open rectangle containing (x0,y0)(x_0,y_0), then the IVP y=F(x,y)y'=F(x,y), y(x0)=y0y(x_0)=y_0 has exactly one solution on some open interval around x0x_0. 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 FF alone gives existence but not uniqueness: y=y2/3y'=y^{2/3}, y(0)=0y(0)=0 has Fy=23y1/3F_y=\dfrac{2}{3}y^{-1/3}, discontinuous at y=0y=0, and both y=0y=0 and y=x327y=\dfrac{x^{3}}{27} solve it.
  • Uniqueness is local in xx: y=y2y'=y^{2}, y(0)=1y(0)=1 has the unique solution y=11xy=\dfrac{1}{1-x}, which exists only for x<1x<1.

Autonomous equations and the phase line

An ODE is autonomous when the independent variable does not appear on the right: dydt=f(y)\dfrac{dy}{dt}=f(y). Two structural facts follow immediately.

  1. The slope field depends only on the height yy, so it is unchanged by horizontal shifts. Hence if y(t)y(t) is a solution, so is y(tc)y(t-c) for every constant cc: solution curves are horizontal translates of one another.
  2. If f(c)=0f(c)=0, the constant function y(t)=cy(t)=c for all tt is a solution. Such a cc is an equilibrium (also: critical point, stationary solution).

Phase line. Draw a yy-axis, mark every root of ff, and on each open interval between consecutive roots draw an arrow pointing up where f(y)>0f(y)>0 and down where f(y)<0f(y)<0. That one picture classifies every long-run behaviour.

Sign of ff just below ccSign of ff just above ccArrowsClassification
++-both point at ccasymptotically stable (sink)
-++both point awayunstable (source)
++++both point up, through ccsemi-stable
--both point down, through ccsemi-stable

Linearisation (derivative) test for stability. Suppose ff is continuously differentiable near cc and f(c)=0f(c)=0. Then

{f(c)<0 c is asymptotically stable,f(c)>0 c is unstable,f(c)=0 no conclusion — use the sign chart of f.\begin{cases} f'(c)<0 & \Rightarrow\ c \text{ is asymptotically stable},\\ f'(c)>0 & \Rightarrow\ c \text{ is unstable},\\ f'(c)=0 & \Rightarrow\ \text{no conclusion — use the sign chart of } f. \end{cases}

Monotonicity theorem. Assume ff 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 ff has no zero: between two consecutive equilibria, or above the largest one, or below the smallest one, or the entire line if ff never vanishes. On such an interval ff 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 tt\to\infty. If it is unbounded, beware: it may run off to ++\infty or -\infty in finite time (as y=y2y'=y^{2} does), so it need not exist for all tt.

Concavity of solutions. By the chain rule, y=ddtf(y)=f(y)y=f(y)f(y)y''=\dfrac{d}{dt}f(y)=f'(y)\,y'=f'(y)f(y). Along a non-equilibrium solution f(y)f(y) keeps one sign, so the concavity flips exactly where f(y)f'(y) flips. Precisely: if the solution passes through a level cc with f(c)0f(c)\ne 0 and ff' changes sign at cc, the curve has an inflection point there. The sign change is essential — f(c)=0f'(c)=0 alone is not enough. For f(y)=y3+1f(y)=y^{3}+1 we have f(y)=3y2f'(y)=3y^{2}, which vanishes at c=0c=0 without changing sign, and f(0)=10f(0)=1\ne 0; a solution crossing the level 00 has y=0y''=0 there but is concave up on both sides, so there is no inflection.

The logistic equation

dPdt=kP(1PM),k>0, M>0.\frac{dP}{dt}=kP\left(1-\frac{P}{M}\right),\qquad k>0,\ M>0 .

Here kk is the intrinsic growth rate and MM the carrying capacity. The right side f(P)=kP(1PM)f(P)=kP\left(1-\dfrac{P}{M}\right) is a downward parabola with roots P=0P=0 and P=MP=M and vertex at P=M2P=\dfrac{M}{2}, where f(M2)=kM4f\left(\dfrac{M}{2}\right)=\dfrac{kM}{4} is the largest possible growth rate.

Since f(P)=k(12PM)f'(P)=k\left(1-\dfrac{2P}{M}\right), we get f(0)=k>0f'(0)=k>0 (so P=0P=0 is unstable) and f(M)=k<0f'(M)=-k<0 (so P=MP=M is asymptotically stable).

Initial size P0P_0Sign of ffBehaviourConcavity
0<P0<M20<P_0<\dfrac{M}{2}++increases to MMup, then down after P=M2P=\dfrac{M}{2} (inflection)
M2P0<M\dfrac{M}{2}\le P_0<M++increases to MMconcave down throughout
P0=MP_0=M00constantstraight line
P0>MP_0>M-decreases to MMconcave up throughout

Separating variables and using partial fractions gives the explicit solution

P(t)=M1+Aekt,A=MP0P0(P00),P(t)=\frac{M}{1+Ae^{-kt}},\qquad A=\frac{M-P_0}{P_0}\quad (P_0\ne 0),

and indeed P(0)=M1+MP0P0=MP0P0+MP0=P0P(0)=\dfrac{M}{1+\frac{M-P_0}{P_0}}=\dfrac{MP_0}{P_0+M-P_0}=P_0, while limtP(t)=M\lim_{t\to\infty}P(t)=M for every P0>0P_0>0 — exactly what the phase line predicted.

Euler's method

Derivation. Suppose you know the exact point (xn,yn)(x_n,y_n) on a solution. The linear approximation (tangent line) at that point is L(x)=yn+y(xn)(xxn)L(x)=y_n+y'(x_n)(x-x_n), and the ODE hands you the slope: y(xn)=F(xn,yn)y'(x_n)=F(x_n,y_n). Stepping forward a distance hh and calling the result yn+1y_{n+1}:

xn+1=xn+h,yn+1=yn+hF(xn,yn)x_{n+1}=x_n+h,\qquad y_{n+1}=y_n+h\,F\left(x_n,y_n\right)

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 y(0.8)y(0.8) for y=x+yy'=x+y, y(0)=1y(0)=1, with h=0.2h=0.2.

nnxnx_nyny_nF(xn,yn)=xn+ynF(x_n,y_n)=x_n+y_nyn+1=yn+0.2Fy_{n+1}=y_n+0.2F
000011111+0.2(1)=1.21+0.2(1)=1.2
110.20.21.21.21.41.41.2+0.2(1.4)=1.481.2+0.2(1.4)=1.48
220.40.41.481.481.881.881.48+0.2(1.88)=1.8561.48+0.2(1.88)=1.856
330.60.61.8561.8562.4562.4561.856+0.2(2.456)=2.34721.856+0.2(2.456)=2.3472

So y(0.8)2.3472y(0.8)\approx 2.3472. The exact solution is y=2exx1y=2e^{x}-x-1 (check: y=2ex1y'=2e^{x}-1 and x+y=x+2exx1=2ex1x+y=x+2e^{x}-x-1=2e^{x}-1), giving y(0.8)=2e0.81.82.65108y(0.8)=2e^{0.8}-1.8\approx 2.65108. The error is 0.30388\approx 0.30388. Redoing the computation with h=0.1h=0.1 (eight steps) gives y8=2.48717762y_8=2.48717762 and error 0.16390\approx 0.16390 — the error dropped by a factor of about 1.851.85, i.e. roughly in half when hh was halved.

Error analysis. Taylor's theorem with remainder gives, for a twice-differentiable exact solution,

y(xn+h)=y(xn)+hy(xn)+h22y(ξ),ξ between xn and xn+h,y(x_n+h)=y(x_n)+h\,y'(x_n)+\frac{h^{2}}{2}y''(\xi),\qquad \xi \text{ between } x_n \text{ and } x_n+h,

so one step started from an exact value costs a local truncation error of size h22y(ξ)=O(h2)\dfrac{h^{2}}{2}\left|y''(\xi)\right|=O\left(h^{2}\right). Covering a fixed interval [a,b][a,b] takes N=bahN=\dfrac{b-a}{h} steps, and NO(h2)=O(h)N\cdot O\left(h^{2}\right)=O(h): Euler's method is first-order accurate. Halving hh roughly halves the global error (and doubles the work).

Error bound theorem. Suppose FF is continuous on a rectangle that contains both the exact solution curve and every Euler point (xn,yn)\left(x_n,y_n\right) over [a,b][a,b], suppose FF satisfies a Lipschitz condition in its second variable there, F(x,u)F(x,v)Luv\left|F(x,u)-F(x,v)\right|\le L\left|u-v\right| with L>0L>0, and suppose the exact solution satisfies yM\left|y''\right|\le M there. Then for every step xn=a+nhx_n=a+nh in [a,b][a,b],

y(xn)ynhM2L(eL(xna)1).\left|y(x_n)-y_n\right|\le \frac{hM}{2L}\left(e^{L(x_n-a)}-1\right).

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 dydt=y2y3=y2(1y)\dfrac{dy}{dt}=y^{2}-y^{3}=y^{2}(1-y).

Step 1 — equilibria. y2(1y)=0y^{2}(1-y)=0 gives y=0y=0 (double root) and y=1y=1.

Step 2 — sign chart. For y<0y<0: y2>0y^{2}>0 and 1y>01-y>0, so f>0f>0. For 0<y<10<y<1: both factors positive, f>0f>0. For y>1y>1: 1y<01-y<0, so f<0f<0.

Step 3 — phase line. Arrows point up on (,0)(-\infty,0), up on (0,1)(0,1), down on (1,)(1,\infty). Hence y=0y=0 is semi-stable (attracting from below, repelling from above) and y=1y=1 is asymptotically stable.

Step 4 — cross-check with the derivative test. f(y)=2y3y2f'(y)=2y-3y^{2}. Then f(1)=23=1<0f'(1)=2-3=-1<0, confirming that y=1y=1 is stable. But f(0)=0f'(0)=0, so the test says nothing at y=0y=0 — only the sign chart of Step 2 reveals the semi-stability.

Step 5 — shape of solutions. y=f(y)f(y)=(2y3y2)(y2y3)=y(23y)y2(1y)=y3(23y)(1y)y''=f'(y)f(y)=\left(2y-3y^{2}\right)\left(y^{2}-y^{3}\right)=y(2-3y)\cdot y^{2}(1-y)=y^{3}(2-3y)(1-y). For 0<y<10<y<1 this is positive when y<23y<\dfrac{2}{3} and negative when y>23y>\dfrac{2}{3}: a solution starting at y(0)=0.1y(0)=0.1 rises, is concave up until it passes the level y=23y=\dfrac{2}{3}, then is concave down as it levels off at y=1y=1.

Common mistakes

  • Treating an isocline as a solution. For y=xyy'=x-y the field segments are horizontal along y=xy=x, so students draw y=xy=x as a solution curve. Wrong: the function y=xy=x has slope 11, not 00. Right: y=x1y=x-1 is a solution, because there its own slope 11 matches F=x(x1)=1F=x-(x-1)=1.
  • "f(c)=0f'(c)=0, so cc is stable." Wrong — that is precisely the inconclusive case. Right: fall back on the sign of ff on both sides.
  • Differentiating the wrong function for stability. The test uses ff', the derivative of the right-hand side with respect to yy — not yy'', and not the second derivative of a solution.
  • Reading equilibria off the wrong equation. For y=y24y'=y^{2}-4 the equilibria are y=±2y=\pm 2, from f(y)=0f(y)=0; y=0y=0 is not one.
  • Missing repeated roots. f(y)=(y1)2(y+2)f(y)=(y-1)^{2}(y+2) has an equilibrium at y=1y=1 that is easy to skip and is semi-stable, not stable.
  • Letting a solution cross an equilibrium. With ff continuously differentiable, uniqueness forbids it, and a non-equilibrium solution never even reaches an equilibrium value in finite time — it only approaches it as tt\to\infty.
  • Euler bookkeeping. Wrong: yn+1=yn+F(xn,yn)y_{n+1}=y_n+F(x_n,y_n) (forgot hh), or yn+1=yn+hF(xn+1,yn)y_{n+1}=y_n+hF(x_{n+1},y_n) (advanced xx too early). Right: compute the slope at the point you are standing on, then advance both xx and yy.
  • "Halving hh quarters the error." That is the local error, O(h2)O(h^{2}). The accumulated error over a fixed interval is O(h)O(h), so halving hh roughly halves it.
  • "Euler always underestimates." Only when the solution is concave up. For y=32yy'=3-2y with y(0)=1y(0)=1 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 dydx=xy\dfrac{dy}{dx}=x-y.

(a) Compute the slope of the direction-field segment at each of the points (0,0)(0,0), (1,0)(1,0), (0,1)(0,1), (1,1)(1,1), (2,1)(2,1) and (1,1)(-1,-1).

(b) Find the isocline of level kk for a general constant kk, and describe the family geometrically.

(c) Show that y=x1y=x-1 is a solution, and explain why y=xy=x (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 kk is the curve F(x,y)=kF(x,y)=k.

Show answer

(a) Here F(x,y)=xyF(x,y)=x-y, so the field slope at (a,b)(a,b) is aba-b.

PointF=xyF=x-ySlope
(0,0)(0,0)000-000
(1,0)(1,0)101-011
(0,1)(0,1)010-11-1
(1,1)(1,1)111-100
(2,1)(2,1)212-111
(1,1)(-1,-1)1(1)-1-(-1)00

(b) The level-kk isocline is the set where xy=kx-y=k, i.e.

y=xk.y=x-k .

This is a family of parallel straight lines of slope 11, one for each kk. Along the line y=xky=x-k every field segment has slope kk. In particular the nullcline (k=0k=0) is the line y=xy=x, where all segments are horizontal.

(c) Substitute y=x1y=x-1 into both sides:

left side=ddx(x1)=1,right side=xy=x(x1)=1.\begin{aligned} \text{left side} &= \frac{d}{dx}(x-1)=1,\\ \text{right side} &= x-y=x-(x-1)=1. \end{aligned}

They agree for every xx, so y=x1y=x-1 is a solution on all real numbers.

For y=xy=x: the left side is ddx(x)=1\dfrac{d}{dx}(x)=1, but the right side is xx=0x-x=0. Since 101\ne 0, y=xy=x is not a solution. The confusion comes from mixing up two different slopes: along y=xy=x the field prescribes slope 00, while the curve y=xy=x has slope 11. An isocline of level kk is a solution only when the isocline itself is a line of slope exactly kk — which happens here only for k=1k=1, giving the isocline y=x1y=x-1, the solution found above.

Remark (consistency check). The general solution is y=x1+Cexy=x-1+Ce^{-x}: indeed y=1Cexy'=1-Ce^{-x} and xy=x(x1+Cex)=1Cexx-y=x-\left(x-1+Ce^{-x}\right)=1-Ce^{-x}. Since Cex0Ce^{-x}\to 0 as xx\to\infty, every solution curve funnels toward the line y=x1y=x-1, which is exactly what the slope field shows.

Use Euler's method with step size h=0.1h=0.1 and two steps to estimate y(1.2)y(1.2) for the initial value problem

dydx=xy,y(1)=2.\frac{dy}{dx}=xy,\qquad y(1)=2 .

Then solve the IVP exactly by separation of variables, compare, and explain the sign of the error using concavity.

Show hint

Write down yn+1=yn+hF(xn,yn)y_{n+1}=y_n+hF(x_n,y_n) and evaluate the slope at the point you are currently standing on, before advancing xx.

Show answer

Step 1 — set up. F(x,y)=xyF(x,y)=xy, x0=1x_0=1, y0=2y_0=2, h=0.1h=0.1, and

yn+1=yn+0.1xnyn.y_{n+1}=y_n+0.1\,x_ny_n .

Step 2 — first step (n=0n=0).

F(x0,y0)=(1)(2)=2,y1=2+0.1(2)=2.2,x1=1.1.\begin{aligned} F(x_0,y_0) &= (1)(2)=2,\\ y_1 &= 2+0.1(2)=2.2,\qquad x_1=1.1 . \end{aligned}

Step 3 — second step (n=1n=1).

F(x1,y1)=(1.1)(2.2)=2.42,y2=2.2+0.1(2.42)=2.2+0.242=2.442,x2=1.2.\begin{aligned} F(x_1,y_1) &= (1.1)(2.2)=2.42,\\ y_2 &= 2.2+0.1(2.42)=2.2+0.242=2.442,\qquad x_2=1.2 . \end{aligned}

nnxnx_nyny_nF=xnynF=x_ny_nyn+1y_{n+1}
001122222.22.2
111.11.12.22.22.422.422.4422.442

So Euler's method gives y(1.2)2.442y(1.2)\approx 2.442.

Step 4 — exact solution. The equation is separable and y=0y=0 is an equilibrium that our solution never meets, so for y>0y>0

dyy=xdxlny=x22+Cy=Aex2/2.\frac{dy}{y}=x\,dx \Rightarrow \ln y=\frac{x^{2}}{2}+C \Rightarrow y=Ae^{x^{2}/2}.

The condition y(1)=2y(1)=2 gives 2=Ae1/22=Ae^{1/2}, so A=2e1/2A=2e^{-1/2} and

y=2e(x21)/2.y=2e^{\left(x^{2}-1\right)/2}.

(Check: y=2e(x21)/2x=xyy'=2e^{\left(x^{2}-1\right)/2}\cdot x=xy, and y(1)=2e0=2y(1)=2e^{0}=2.)

Step 5 — compare.

y(1.2)=2e(1.441)/2=2e0.222(1.246077)=2.492153.y(1.2)=2e^{\left(1.44-1\right)/2}=2e^{0.22}\approx 2(1.246077)=2.492153 .

The error is 2.4921532.442=0.0501532.492153-2.442=0.050153, so Euler underestimates by about 0.05020.0502 (roughly 2%2\%).

Step 6 — why it underestimates. Differentiate the ODE: y=ddx(xy)=y+xy=y+x2y=y(1+x2)y''=\dfrac{d}{dx}(xy)=y+xy'=y+x^{2}y=y\left(1+x^{2}\right). On our solution y>0y>0, so y>0y''>0 and the solution curve is concave up on [1,1.2][1,1.2]. 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 dydt=y24\dfrac{dy}{dt}=y^{2}-4:

(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 limty(t)\lim_{t\to\infty}y(t) for the initial values y(0)=5y(0)=-5, y(0)=0y(0)=0 and y(0)=3y(0)=3.

Show hint

Factor the right-hand side, mark its zeros on a vertical yy-axis, and decide the sign of ff on each of the three resulting intervals.

Show answer

(a) Equilibria. Set f(y)=y24=(y2)(y+2)=0f(y)=y^{2}-4=(y-2)(y+2)=0, so

y=2andy=2.y=-2\quad\text{and}\quad y=2 .

The constant functions y(t)=2y(t)=-2 and y(t)=2y(t)=2 are solutions.

(b) Phase line. ff is an upward parabola with roots ±2\pm 2, so:

IntervalTest valuef(y)=y24f(y)=y^{2}-4Arrow
y<2y<-2y=3y=-394=5>09-4=5>0up
2<y<2-2<y<2y=0y=004=4<00-4=-4<0down
y>2y>2y=3y=394=5>09-4=5>0up

Reading the arrows:

  • At y=2y=-2: arrows point up from below and down from above, so both point at 2-2. It is asymptotically stable.
  • At y=2y=2: arrows point down below it and up above it, so both point away. It is unstable.

Derivative test check. f(y)=2yf'(y)=2y, so f(2)=4<0f'(-2)=-4<0 (stable) and f(2)=4>0f'(2)=4>0 (unstable). Both signs agree with the phase line, and neither is the inconclusive case f=0f'=0.

(c) Limits.

  • y(0)=5y(0)=-5 lies in (,2)(-\infty,-2) where f>0f>0: the solution increases, and by uniqueness it cannot cross the equilibrium y=2y=-2. Being increasing and bounded above by 2-2, it converges: limty(t)=2\lim_{t\to\infty}y(t)=-2.
  • y(0)=0y(0)=0 lies in (2,2)(-2,2) where f<0f<0: the solution decreases toward the equilibrium below it, so limty(t)=2\lim_{t\to\infty}y(t)=-2.
  • y(0)=3y(0)=3 lies in (2,)(2,\infty) where f>0f>0: the solution increases and is unbounded above, so y(t)+y(t)\to+\infty. Read this one carefully: the escape happens in finite time (see the remark), so the solution simply stops existing at t=ln54t=\dfrac{\ln 5}{4} and limty(t)\lim_{t\to\infty}y(t) 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 1y24=14(1y21y+2)\dfrac{1}{y^{2}-4}=\dfrac{1}{4}\left(\dfrac{1}{y-2}-\dfrac{1}{y+2}\right) gives y2y+2=Ke4t\dfrac{y-2}{y+2}=Ke^{4t}, and y(0)=3y(0)=3 forces K=15K=\dfrac{1}{5}, so

y(t)=2+0.4e4t10.2e4t,y(t)=\frac{2+0.4e^{4t}}{1-0.2e^{4t}} ,

whose denominator vanishes when e4t=5e^{4t}=5, i.e. at t=ln540.4024t=\dfrac{\ln 5}{4}\approx 0.4024. The phase line gives the direction of motion but never the timing.

A fish population satisfies the logistic model

dPdt=0.08P(1P1000),P(0)=100,\frac{dP}{dt}=0.08\,P\left(1-\frac{P}{1000}\right),\qquad P(0)=100,

with tt 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 5050 years.

Show hint

Compare with dPdt=kP(1PM)\dfrac{dP}{dt}=kP\left(1-\dfrac{P}{M}\right) to read off kk and MM; the growth rate f(P)f(P) is a parabola in PP, so its maximum is at the vertex.

Show answer

Matching with the standard form gives k=0.08k=0.08 per year and carrying capacity M=1000M=1000 fish, with f(P)=0.08P(1P1000)f(P)=0.08P\left(1-\dfrac{P}{1000}\right).

(a) Equilibria. f(P)=0f(P)=0 when P=0P=0 or P=1000P=1000. Since

f(P)=0.08(12P1000),f'(P)=0.08\left(1-\frac{2P}{1000}\right),

we get f(0)=0.08>0f'(0)=0.08>0, so P=0P=0 is unstable, and f(1000)=0.08(12)=0.08<0f'(1000)=0.08(1-2)=-0.08<0, so P=1000P=1000 is asymptotically stable. (Phase line: f>0f>0 on (0,1000)(0,1000) — arrows up — and f<0f<0 for P>1000P>1000 — arrows down.)

(b) Fastest growth. ff is a downward parabola in PP, so it is maximised at the vertex, where f(P)=0f'(P)=0:

0.08(12P1000)=0P=500=M2.0.08\left(1-\frac{2P}{1000}\right)=0 \Rightarrow P=500=\frac{M}{2}.

The maximum growth rate is

f(500)=0.08(500)(15001000)=4012=20 fish per year,f(500)=0.08(500)\left(1-\frac{500}{1000}\right)=40\cdot\frac{1}{2}=20\ \text{fish per year},

matching the general formula kM4=0.08(1000)4=20\dfrac{kM}{4}=\dfrac{0.08(1000)}{4}=20.

(c) Explicit solution. Using P(t)=M1+AektP(t)=\dfrac{M}{1+Ae^{-kt}} with A=MP0P0=1000100100=9A=\dfrac{M-P_0}{P_0}=\dfrac{1000-100}{100}=9:

P(t)=10001+9e0.08t.P(t)=\frac{1000}{1+9e^{-0.08t}} .

(Check: P(0)=10001+9=100P(0)=\dfrac{1000}{1+9}=100. ✓)

Year of fastest growth. Solve P(t)=500P(t)=500:

10001+9e0.08t=5001+9e0.08t=2e0.08t=190.08t=ln19=ln9t=ln90.082.197220.0827.47 years.\begin{aligned} \frac{1000}{1+9e^{-0.08t}} &= 500\\ 1+9e^{-0.08t} &= 2\\ e^{-0.08t} &= \frac{1}{9}\\ -0.08t &= \ln\frac{1}{9}=-\ln 9\\ t &= \frac{\ln 9}{0.08}\approx \frac{2.19722}{0.08}\approx 27.47\ \text{years}. \end{aligned}

Population after 50 years. With e0.08(50)=e40.0183156e^{-0.08(50)}=e^{-4}\approx 0.0183156:

P(50)=10001+9(0.0183156)=10001+0.1648408=10001.1648408858.5 fish.P(50)=\frac{1000}{1+9(0.0183156)}=\frac{1000}{1+0.1648408}=\frac{1000}{1.1648408}\approx 858.5\ \text{fish}.

This is consistent with the qualitative picture: PP has passed the inflection level 500500 (which happened at t27.47t\approx 27.47), is now concave down, and is climbing slowly toward the carrying capacity 10001000.

Consider dydt=(y1)2(y+2)\dfrac{dy}{dt}=(y-1)^{2}(y+2).

(a) Find all equilibria and classify each one, stating explicitly where the derivative test fails and why. (b) Describe limty(t)\lim_{t\to\infty}y(t) for y(0)=3y(0)=-3, y(0)=0y(0)=0 and y(0)=1.5y(0)=1.5.

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. f(y)=(y1)2(y+2)=0f(y)=(y-1)^{2}(y+2)=0 gives y=1y=1 (a double root) and y=2y=-2.

Sign chart. The factor (y1)2(y-1)^{2} is 0\ge 0 always and vanishes only at y=1y=1, so away from y=1y=1 the sign of ff is the sign of y+2y+2:

Interval(y1)2(y-1)^{2}y+2y+2f(y)f(y)Arrow
y<2y<-2++--down
2<y<1-2<y<1++++++up
y>1y>1++++++up

Test values confirm this: f(3)=(4)2(1)=16<0f(-3)=(-4)^{2}(-1)=-16<0, f(0)=(1)2(2)=2>0f(0)=(-1)^{2}(2)=2>0, f(2)=(1)2(4)=4>0f(2)=(1)^{2}(4)=4>0.

Classification.

  • y=2y=-2: arrows point down below it and up above it — both away. It is unstable (a source).
  • y=1y=1: arrows point up on both sides, so solutions below 11 are attracted to it while solutions above 11 run away. It is semi-stable.

Derivative test. Differentiate with the product rule and factor:

f(y)=2(y1)(y+2)+(y1)2=(y1)[2(y+2)+(y1)]=(y1)(3y+3)=3(y1)(y+1).\begin{aligned} f'(y) &= 2(y-1)(y+2)+(y-1)^{2}\\ &= (y-1)\left[2(y+2)+(y-1)\right]\\ &= (y-1)(3y+3)=3(y-1)(y+1). \end{aligned}

Then f(2)=3(3)(1)=9>0f'(-2)=3(-3)(-1)=9>0, confirming that y=2y=-2 is unstable. But

f(1)=3(0)(2)=0,f'(1)=3(0)(2)=0,

so the linearisation test is inconclusive at y=1y=1 — the borderline case. Only the sign chart of ff itself (Step above: f>0f>0 on both sides) reveals that y=1y=1 is semi-stable. This is exactly why a repeated root must never be classified by the derivative test alone.

(b) Long-run behaviour.

  • y(0)=3y(0)=-3 lies in (,2)(-\infty,-2) where f<0f<0: the solution decreases, moving away from the equilibrium y=2y=-2 that sits above it, so it is unbounded below and y(t)y(t)\to-\infty. This happens in finite time: putting u=y3u=-y\ge 3 gives u=f(y)=(u+1)2(u2)u2u3=u33u'=-f(y)=(u+1)^{2}(u-2)\ge u^{2}\cdot\dfrac{u}{3}=\dfrac{u^{3}}{3} (using u2u3u-2\ge\dfrac{u}{3} for u3u\ge 3), and 33duu3\int_{3}^{\infty}\frac{3\,du}{u^{3}} is finite. So there is a finite tt^{*} with y(t)y(t)\to-\infty as ttt\to t^{*} from the left, and strictly speaking limty(t)\lim_{t\to\infty}y(t) does not exist — the solution does not live that long.
  • y(0)=0y(0)=0 lies in (2,1)(-2,1) where f>0f>0: the solution increases, is trapped below the equilibrium y=1y=1 by uniqueness, and being increasing and bounded it converges: limty(t)=1\lim_{t\to\infty}y(t)=1.
  • y(0)=1.5y(0)=1.5 lies in (1,)(1,\infty) where f>0f>0: the solution increases and there is no equilibrium above it, so y(t)+y(t)\to+\infty — again in finite time, since once y2y\ge 2 we have (y1)2y24(y-1)^{2}\ge\dfrac{y^{2}}{4} and y+2yy+2\ge y, hence yy34y'\ge\dfrac{y^{3}}{4}, and 24dyy3\int_{2}^{\infty}\frac{4\,dy}{y^{3}} is finite.

This trio is the signature of a semi-stable equilibrium: approach from one side, escape from the other.

Let y(t)y(t) solve dydt=y(4y)\dfrac{dy}{dt}=y(4-y) with y(0)=1y(0)=1.

(a) Without solving, determine where the solution curve is concave up and where it is concave down, and find the yy-value of its inflection point. (b) Solve the equation explicitly and find the exact time tt at which the inflection occurs.

Show hint

Differentiate the ODE itself with respect to tt using the chain rule — you will get yy'' in terms of yy alone.

Show answer

Here f(y)=y(4y)=4yy2f(y)=y(4-y)=4y-y^{2}, which is the logistic right-hand side kP(1PM)kP\left(1-\dfrac{P}{M}\right) with k=4k=4 and M=4M=4.

(a) Concavity. Differentiate the equation with respect to tt, using the chain rule on the right:

y=ddt[f(y)]=f(y)y=f(y)f(y).y''=\frac{d}{dt}\left[f(y)\right]=f'(y)\,y'=f'(y)f(y).

Since f(y)=42yf'(y)=4-2y,

y=(42y)y(4y)=2(2y)y(4y).y''=(4-2y)\cdot y(4-y)=2(2-y)\,y\,(4-y).

The solution starts at y(0)=1y(0)=1, which lies in (0,4)(0,4) where f>0f>0; by uniqueness it stays trapped in (0,4)(0,4) and increases toward 44. On that range y>0y>0 and 4y>04-y>0, so the sign of yy'' is the sign of 2y2-y:

Range of yy2y2-yyy''Shape
1y<21\le y<2++++concave up
y=2y=20000inflection
2<y<42<y<4--concave down

So the curve is concave up while y<2y<2, concave down after, with the inflection at the level

y=2=M2,y=2=\frac{M}{2},

exactly the logistic half-capacity level — where the growth rate ff is largest, f(2)=2(2)=4f(2)=2(2)=4.

(b) Exact time. Use the logistic formula y(t)=M1+Aekty(t)=\dfrac{M}{1+Ae^{-kt}} with M=4M=4, k=4k=4 and

A=My0y0=411=3y(t)=41+3e4t.A=\frac{M-y_0}{y_0}=\frac{4-1}{1}=3 \Rightarrow y(t)=\frac{4}{1+3e^{-4t}} .

(Check: y(0)=41+3=1y(0)=\dfrac{4}{1+3}=1 ✓, and y(t)4y(t)\to 4 as tt\to\infty ✓.)

Set y=2y=2:

41+3e4t=21+3e4t=2e4t=134t=ln3t=ln341.09861240.2747.\begin{aligned} \frac{4}{1+3e^{-4t}} &= 2\\ 1+3e^{-4t} &= 2\\ e^{-4t} &= \frac{1}{3}\\ -4t &= -\ln 3\\ t &= \frac{\ln 3}{4}\approx \frac{1.098612}{4}\approx 0.2747 . \end{aligned}

Answer. Concave up for y<2y<2, concave down for 2<y<42<y<4; the inflection point is at height y=2y=2, reached at the exact time t=ln340.275t=\dfrac{\ln 3}{4}\approx 0.275.

Use Euler's method with h=0.25h=0.25 to approximate y(1)y(1) for

dydx=32y,y(0)=1.\frac{dy}{dx}=3-2y,\qquad y(0)=1 .

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 h=0.125h=0.125.

Show hint

Simplify the update rule algebraically first: yn+1=yn+0.25(32yn)y_{n+1}=y_n+0.25\left(3-2y_n\right) collapses to something very short.

Show answer

Step 1 — simplify the update. With F(x,y)=32yF(x,y)=3-2y and h=0.25h=0.25,

yn+1=yn+0.25(32yn)=yn0.5yn+0.75=0.5yn+0.75.y_{n+1}=y_n+0.25\left(3-2y_n\right)=y_n-0.5y_n+0.75=0.5\,y_n+0.75 .

Step 2 — the table. Starting at x0=0x_0=0, y0=1y_0=1:

nnxnx_nyny_nF=32ynF=3-2y_nyn+1=yn+0.25Fy_{n+1}=y_n+0.25F
000011111+0.25(1)=1.251+0.25(1)=1.25
110.250.251.251.250.50.51.25+0.25(0.5)=1.3751.25+0.25(0.5)=1.375
220.50.51.3751.3750.250.251.375+0.25(0.25)=1.43751.375+0.25(0.25)=1.4375
330.750.751.43751.43750.1250.1251.4375+0.25(0.125)=1.468751.4375+0.25(0.125)=1.46875

So y(1)y4=1.46875y(1)\approx y_4=1.46875.

Step 3 — exact solution. The equation is separable (and autonomous, with equilibrium y=1.5y=1.5). For y<1.5y<1.5:

dy32y=dx12ln32y=x+C32y=C1e2xy=32+Ce2x.\begin{aligned} \frac{dy}{3-2y} &= dx\\ -\frac{1}{2}\ln\left|3-2y\right| &= x+C\\ \left|3-2y\right| &= C_1e^{-2x}\\ y &= \frac{3}{2}+Ce^{-2x}. \end{aligned}

The condition y(0)=1y(0)=1 gives 1=1.5+C1=1.5+C, so C=0.5C=-0.5 and

y=3212e2x.y=\frac{3}{2}-\frac{1}{2}e^{-2x}.

(Check: y=e2xy'=e^{-2x} and 32y=33+e2x=e2x3-2y=3-3+e^{-2x}=e^{-2x} ✓.)

Step 4 — error.

y(1)=1.50.5e2=1.50.5(0.1353353)=1.50.0676677=1.4323324.y(1)=1.5-0.5e^{-2}=1.5-0.5(0.1353353)=1.5-0.0676677=1.4323324 .

The error is

1.468751.4323324=0.0364176,1.46875-1.4323324=0.0364176,

so Euler overestimates by about 0.03640.0364.

Step 5 — why an overestimate. Differentiate the ODE: y=ddx(32y)=2y=2(32y)y''=\dfrac{d}{dx}(3-2y)=-2y'=-2(3-2y). Since yy starts at 11 and increases toward the equilibrium 1.51.5 without reaching it, 32y>03-2y>0 throughout, so y<0y''<0: the exact solution is concave down on [0,1][0,1]. 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 h=0.125h=0.125. Euler is a first-order method: the global error on a fixed interval is O(h)O(h), so halving the step size roughly halves the error. Predicted error:

0.036417620.0182.\frac{0.0364176}{2}\approx 0.0182 .

(Carrying out the eight steps actually gives y8=1.4499435y_8=1.4499435, error 0.01761120.0176112 — a ratio of 0.0364176/0.01761122.070.0364176/0.0176112\approx 2.07, confirming the first-order behaviour.)

Apply Euler's method to dydx=y\dfrac{dy}{dx}=y, y(0)=1y(0)=1, on the interval [0,1][0,1].

(a) Show that with step size h=1Nh=\dfrac{1}{N} the approximation to y(1)y(1) is exactly (1+h)1/h\left(1+h\right)^{1/h}. (b) Tabulate this approximation and its error for h=1, 0.5, 0.25, 0.125h=1,\ 0.5,\ 0.25,\ 0.125, and compute the ratio of consecutive errors. (c) Explain what the table demonstrates about the order of accuracy, and identify the limit of (1+h)1/h\left(1+h\right)^{1/h} as h0+h\to 0^{+}.

Show hint

Write out y1y_1, y2y_2, y3y_3 in terms of y0y_0 and look for the pattern before doing any arithmetic.

Show answer

(a) A closed form for the Euler iterates. Here F(x,y)=yF(x,y)=y, so the update is

yn+1=yn+hyn=(1+h)yn.y_{n+1}=y_n+h\,y_n=(1+h)\,y_n .

This is a geometric recursion. With y0=1y_0=1,

y1=(1+h),y2=(1+h)2,,yn=(1+h)n.y_1=(1+h),\quad y_2=(1+h)^{2},\quad\ldots,\quad y_n=(1+h)^{n}.

Reaching x=1x=1 takes N=1hN=\dfrac{1}{h} steps, so the Euler approximation to y(1)y(1) is

yN=(1+h)N=(1+h)1/h.y_N=(1+h)^{N}=(1+h)^{1/h}.

The exact solution is y=exy=e^{x} (since y=ex=yy'=e^{x}=y and y(0)=1y(0)=1), so the true value is y(1)=e2.7182818y(1)=e\approx 2.7182818.

(b) The table. Each entry is (1+h)1/h(1+h)^{1/h} and the error is e(1+h)1/he-(1+h)^{1/h}.

hhN=1/hN=1/h(1+h)N(1+h)^{N}Error e(1+h)Ne-(1+h)^{N}Ratio to previous error
111121=22^{1}=20.71828180.7182818
0.50.5221.52=2.251.5^{2}=2.250.46828180.46828181.5341.534
0.250.25441.254=2.44140631.25^{4}=2.44140630.27687560.27687561.6911.691
0.1250.125881.1258=2.56578451.125^{8}=2.56578450.15249730.15249731.8161.816

Sample arithmetic: 1.252=1.56251.25^{2}=1.5625, so 1.254=1.56252=2.441406251.25^{4}=1.5625^{2}=2.44140625; and 1.1252=1.2656251.125^{2}=1.265625, 1.1254=1.2656252=1.6018066406251.125^{4}=1.265625^{2}=1.601806640625, 1.1258=1.60180664062522.56578451.125^{8}=1.601806640625^{2}\approx 2.5657845.

(c) Interpretation. Every time hh is halved the error shrinks by a factor that is climbing steadily toward 22: 1.534, 1.691, 1.816, 1.534,\ 1.691,\ 1.816,\ \ldots An error behaving like EChpE\approx Ch^{p} would give a ratio of 2p2^{p} on halving hh; a ratio tending to 22 means p=1p=1. This is the numerical signature of a first-order method: the global error on a fixed interval is O(h)O(h), not O(h2)O\left(h^{2}\right). (The local error is O(h2)O\left(h^{2}\right), but there are N=1/hN=1/h steps, and 1hO(h2)=O(h)\dfrac{1}{h}\cdot O\left(h^{2}\right)=O(h). The ratios approach 22 only in the limit because the O(h)O(h) term also carries higher-order corrections, visible at these fairly large hh.)

Finally, the approximations converge to the exact answer, which is the classical limit

limh0+(1+h)1/h=e.\lim_{h\to 0^{+}}(1+h)^{1/h}=e .

So Euler's method applied to y=yy'=y is, quite literally, the definition of ee in disguise.

Let ff be continuously differentiable on all real numbers with

f(1)=f(4)=0andf(y)>0 for all y in (1,4).f(1)=f(4)=0\quad\text{and}\quad f(y)>0 \text{ for all } y \text{ in } (1,4).

Let y(t)y(t) be the solution of dydt=f(y)\dfrac{dy}{dt}=f(y) with y(0)=2y(0)=2, defined for all t0t\ge 0. Prove, without any formula for ff or yy, that:

(a) 1<y(t)<41<y(t)<4 for all t0t\ge 0; (b) yy is strictly increasing; (c) limty(t)=4\lim_{t\to\infty}y(t)=4.

Show hint

Start from the fact that the constant functions y=1y=1 and y=4y=4 are themselves solutions, then invoke the uniqueness theorem.

Show answer

(a) The solution is trapped in (1,4)(1,4). Because f(1)=0f(1)=0 and f(4)=0f(4)=0, the constant functions u(t)=1u(t)=1 and v(t)=4v(t)=4 are solutions of the ODE. Since ff 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 (t,y)(t,y)-plane and distinct solution curves cannot meet.

Suppose, for contradiction, that y(t1)=4y(t_1)=4 for some t1t_1. Then yy and the constant solution vv both solve the same IVP with data y(t1)=4y(t_1)=4, so uniqueness forces y(t)=4y(t)=4 for all tt — contradicting y(0)=2y(0)=2. The same argument rules out y(t1)=1y(t_1)=1. Since yy is continuous and y(0)=2y(0)=2 lies in (1,4)(1,4), the Intermediate Value Theorem says yy could only leave (1,4)(1,4) by taking the value 11 or 44, which we have just excluded. Hence

1<y(t)<4for all t0.1<y(t)<4\qquad\text{for all } t\ge 0 .

(b) Strict monotonicity. By part (a), y(t)y(t) lies in (1,4)(1,4) for every tt, and f>0f>0 there. Therefore

y(t)=f(y(t))>0for all t0,y'(t)=f\left(y(t)\right)>0\qquad\text{for all } t\ge 0,

so by the Increasing/Decreasing Test yy is strictly increasing on [0,)[0,\infty).

(c) The limit is 44. yy is increasing and bounded above by 44, so by the Monotone Convergence Theorem the limit

L=limty(t)L=\lim_{t\to\infty}y(t)

exists and satisfies 2=y(0)<L42=y(0)<L\le 4.

Now show f(L)=0f(L)=0. Suppose instead f(L)>0f(L)>0 (it cannot be negative: LL lies in (1,4](1,4], where f0f\ge 0 by continuity). Since ff is continuous and y(t)Ly(t)\to L, the composite satisfies f(y(t))f(L)f\left(y(t)\right)\to f(L), so there is TT with

y(t)=f(y(t))>f(L)2for all tT.y'(t)=f\left(y(t)\right)>\frac{f(L)}{2}\qquad\text{for all } t\ge T .

Integrating from TT to tt (or applying the Mean Value Theorem) gives

y(t)y(T)+f(L)2(tT)as t,y(t)\ge y(T)+\frac{f(L)}{2}\left(t-T\right)\to\infty\quad\text{as } t\to\infty,

contradicting the boundedness y(t)<4y(t)<4. Hence f(L)=0f(L)=0.

Finally, LL lies in (2,4](2,4], and ff has no zero in (1,4)(1,4) by hypothesis, so LL cannot lie in (2,4)(2,4). The only possibility left is

L=4,i.e.limty(t)=4.L=4,\qquad\text{i.e.}\qquad \lim_{t\to\infty}y(t)=4 .

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 [a,b][a,b] says that if FF satisfies F(x,u)F(x,v)Luv\left|F(x,u)-F(x,v)\right|\le L\left|u-v\right| and the exact solution obeys yM\left|y''\right|\le M on the relevant region, then

y(xn)ynhM2L(eL(xna)1).\left|y(x_n)-y_n\right|\le \frac{hM}{2L}\left(e^{L(x_n-a)}-1\right).

Apply this to y=yy'=y, y(0)=1y(0)=1 on [0,1][0,1].

(a) Identify valid constants LL and MM. (b) Find the largest step size the bound guarantees will keep the error at x=1x=1 below 0.010.01, and the corresponding number of steps NN (with h=1/Nh=1/N). (c) Compare with the true error at that NN and comment.

Show hint

For F(x,y)=yF(x,y)=y the Lipschitz constant comes straight out of uv|u-v|; for MM you need a bound on the second derivative of the exact solution on [0,1][0,1].

Show answer

(a) The constants. With F(x,y)=yF(x,y)=y,

F(x,u)F(x,v)=uv=1uv,\left|F(x,u)-F(x,v)\right|=\left|u-v\right|=1\cdot\left|u-v\right|,

so L=1L=1 works (and is the smallest such constant). The exact solution is y=exy=e^{x}, so y=exy''=e^{x}, and on [0,1][0,1]

y=exe1=e2.718282.\left|y''\right|=e^{x}\le e^{1}=e\approx 2.718282 .

Take M=eM=e.

(b) Solving the inequality. At xn=1x_n=1 with a=0a=0, L=1L=1, M=eM=e:

y(1)yNhe2(1)(e11)=e(e1)2h.\left|y(1)-y_N\right|\le \frac{h\,e}{2(1)}\left(e^{1}-1\right)=\frac{e(e-1)}{2}\,h .

Compute the coefficient:

e(e1)2=2.7182818×1.71828182=4.67077432=2.3353871.\frac{e(e-1)}{2}=\frac{2.7182818\times 1.7182818}{2}=\frac{4.6707743}{2}=2.3353871 .

Require 2.3353871h<0.012.3353871\,h<0.01:

h<0.012.33538710.00428195.h<\frac{0.01}{2.3353871}\approx 0.00428195 .

With h=1Nh=\dfrac{1}{N} this means N>10.00428195233.54N>\dfrac{1}{0.00428195}\approx 233.54, so the smallest integer is

N=234,h=12340.0042735.N=234,\qquad h=\frac{1}{234}\approx 0.0042735 .

Verify both sides of the cut: at N=234N=234 the bound is 2.3353871/2340.009980<0.012.3353871/234\approx 0.009980<0.01 ✓, while at N=233N=233 it is 2.3353871/2330.010023>0.012.3353871/233\approx 0.010023>0.01 ✗. So N=234N=234 steps is the answer the bound guarantees.

(c) The true error. From the previous style of computation, Euler on y=yy'=y gives yN=(1+h)Ny_N=(1+h)^{N}, so with N=234N=234:

y234=(1+1234)2342.7124962,y_{234}=\left(1+\frac{1}{234}\right)^{234}\approx 2.7124962,

and the actual error is

e2.71249620.0057856.e-2.7124962\approx 0.0057856 .

Comment. The true error 0.005790.00579 is about 1.71.7 times smaller than the guaranteed bound 0.009980.00998. This is typical: the bound is built from worst-case estimates (y\left|y''\right| replaced by its maximum ee everywhere, and the exponential factor eL(xa)e^{L(x-a)} 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 100100 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 HH (fish per year):

dPdt=0.5P(1P100)H,P0.\frac{dP}{dt}=0.5P\left(1-\frac{P}{100}\right)-H,\qquad P\ge 0 .

(a) For H=6H=6, find the equilibria exactly and classify them. (b) Determine the critical harvest rate HcH_c above which no equilibrium exists, classify the single equilibrium at H=HcH=H_c, and describe what happens for H>HcH>H_c. (c) With H=6H=6, describe the fate of a population starting at P(0)=10P(0)=10 and at P(0)=50P(0)=50.

Show hint

The right-hand side is a downward parabola in PP; everything (number of roots, signs, stability) is decided by its discriminant and its opening direction.

Show answer

Write the right-hand side as

f(P)=0.5P0.005P2H.f(P)=0.5P-0.005P^{2}-H .

This is a downward parabola in PP (leading coefficient 0.005<0-0.005<0), so f<0f<0 outside its roots and f>0f>0 strictly between them, whenever two real roots exist.

(a) The case H=6H=6. Solve f(P)=0f(P)=0. Multiply by 200-200:

0.005P20.5P+H=0P2100P+200H=0P=100±10000800H2=50±2500200H.\begin{aligned} 0.005P^{2}-0.5P+H &= 0\\ P^{2}-100P+200H &= 0\\ P &= \frac{100\pm\sqrt{10000-800H}}{2}=50\pm\sqrt{2500-200H}. \end{aligned}

With H=6H=6: 2500200(6)=25001200=13002500-200(6)=2500-1200=1300, and 1300=1013\sqrt{1300}=10\sqrt{13}, so

P=50±1013,101336.0555.P=50\pm 10\sqrt{13},\qquad 10\sqrt{13}\approx 36.0555 .

P1=50101313.9445,P2=50+101386.0555.P_1=50-10\sqrt{13}\approx 13.9445,\qquad P_2=50+10\sqrt{13}\approx 86.0555 .

Phase line: f<0f<0 on [0,P1)[0,P_1), f>0f>0 on (P1,P2)(P_1,P_2), f<0f<0 on (P2,)(P_2,\infty).

EquilibriumArrow belowArrow aboveClassification
P113.9445P_1\approx 13.9445downupunstable
P286.0555P_2\approx 86.0555updownasymptotically stable

Derivative check. f(P)=0.50.01Pf'(P)=0.5-0.01P, so f(P1)=0.50.01(13.9445)=0.360555>0f'(P_1)=0.5-0.01(13.9445)=0.360555>0 (unstable) and f(P2)=0.50.01(86.0555)=0.360555<0f'(P_2)=0.5-0.01(86.0555)=-0.360555<0 (stable). Both agree. Notice P1P_1 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:

2500200H0H12.5.2500-200H\ge 0 \Rightarrow H\le 12.5 .

So Hc=12.5H_c=12.5 fish per year. This equals the maximum of the unharvested growth rate, kM4=0.5(100)4=12.5\dfrac{kM}{4}=\dfrac{0.5(100)}{4}=12.5 — the maximum sustainable yield, attained at P=M2=50P=\dfrac{M}{2}=50.

At H=Hc=12.5H=H_c=12.5 the two roots merge at

P=50±0=50.P=50\pm\sqrt{0}=50 .

Here f(P)=0.005(P50)20f(P)=-0.005(P-50)^{2}\le 0, so f<0f<0 on both sides of 5050: arrows point down everywhere and P=50P=50 is semi-stable (attracting from above, repelling from below). The derivative test is useless here, since f(50)=0.50.01(50)=0f'(50)=0.5-0.01(50)=0 — the inconclusive case, as expected for a double root.

For H>12.5H>12.5 the discriminant is negative, there is no equilibrium, and f(P)<0f(P)<0 for every PP. The population therefore decreases at a rate bounded away from zero and reaches 00 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 H=6H=6.

  • P(0)=10P(0)=10: this is below the threshold P113.9445P_1\approx 13.9445, where f<0f<0. The population decreases; since there is no equilibrium in [0,P1)[0,P_1), it does not level off but hits P=0P=0 in finite time — extinction. (Concretely, f(10)=0.5(10)0.005(100)6=50.56=1.5f(10)=0.5(10)-0.005(100)-6=5-0.5-6=-1.5 fish per year at the start.)
  • P(0)=50P(0)=50: this lies in (P1,P2)(P_1,P_2), where f>0f>0 (f(50)=2512.56=6.5>0f(50)=25-12.5-6=6.5>0). The population increases, cannot cross the equilibrium P2P_2 by uniqueness, and being increasing and bounded above it converges:

limtP(t)=P2=50+101386.06 fish.\lim_{t\to\infty}P(t)=P_2=50+10\sqrt{13}\approx 86.06\ \text{fish}.