Skip to content

Differential Equations -- Diagnostic Tests

Differential Equations — Diagnostic Tests

Unit Tests

Tests edge cases, boundary conditions, and common misconceptions for differential equations.

UT-1: Separable Equation with Hidden Singular Solutions

Question:

Solve the initial value problem dydx=y2/3\dfrac{dy}{dx} = y^{2/3} with y(0)=0y(0) = 0.

A student separates variables and writes y2/3dy=dx\displaystyle\int y^{-2/3}\,dy = \int dxObtaining 3y1/3=x+C3y^{1/3} = x + C. Using y(0)=0y(0) = 0: C=0C = 0So y=(x3)3y = \left(\dfrac{x}{3}\right)^3.

(a) Verify that y(x)=0y(x) = 0 (the constant zero function) is also a solution to the IVP. (b) Explain why the existence and uniqueness theorem for first-order ODEs does not apply here. (c) Find a third solution to the IVP (showing the solution is not unique).

Solution:

(a) If y(x)=0y(x) = 0 for all xxThen dydx=0\dfrac{dy}{dx} = 0 and y2/3=0y^{2/3} = 0So the ODE is satisfied. Also y(0)=0y(0) = 0. So y=0y = 0 is a solution.

(b) The existence and uniqueness theorem (Picard-Lindelof) requires dydx=f(x,y)\dfrac{dy}{dx} = f(x, y) where ff and fy\dfrac{\partial f}{\partial y} are continuous near (0,0)(0, 0). Here f(x,y)=y2/3f(x, y) = y^{2/3}And fy=23y1/3\dfrac{\partial f}{\partial y} = \dfrac{2}{3}y^{-1/3}Which is undefined at y=0y = 0. Therefore the theorem does not guarantee uniqueness.

(c) A third solution can be constructed by patching:

y(x) = \begin{cases} 0 & \text{if x \leq a \\ \left(\dfrac{x - a}{3}\right)^3 & \text{if x > a \end{cases}

For any a0a \geq 0. At x=ax = a: y(a)=0y(a) = 0 from both sides, and y(a)=0y'(a) = 0 from both sides (since ddx[(xa3)3]=(xa)23=0\frac{d}{dx}\left[\left(\frac{x-a}{3}\right)^3\right] = \frac{(x-a)^2}{3} = 0 at x=ax = a). So this is a valid C1C^1 solution. For a=0a = 0This gives:

y(x) = \begin{cases} 0 & \text{if x \leq 0 \\ \dfrac{x^3}{27} & \text{if x > 0 \end{cases}

This is a third distinct solution to the IVP.

The misconception: students assume separation of variables always produces the unique solution. When f(y)f(y) has a zero, the constant solution y=0y = 0 (or the constant at the zero of ff) may also be a solution, and non-uniqueness can arise.


UT-2: Euler’s Method Step Size Error Analysis

Question:

Use Euler’s method with step size Δx=0.5\Delta x = 0.5 to approximate y(2)y(2) for the initial value problem dydx=x+y\dfrac{dy}{dx} = x + y, y(0)=1y(0) = 1. Then use Δx=0.25\Delta x = 0.25 and compare. The exact solution is y=2exx1y = 2e^x - x - 1.

(a) Compute both approximations. (b) Compute the exact error for each. (c) Halving the step size roughly quarters the error for Euler’s method. Does your result confirm this? If not, explain why.

Solution:

(a) With Δx=0.5\Delta x = 0.5Starting at (0,1)(0, 1):

Stepxxyyy=x+yy' = x + yy_{\text{new} = y + 0.5 \cdot y'
00111.5
10.51.52.02.5
21.02.53.54.25
31.54.255.757.125

Approximation: y(2)7.125y(2) \approx 7.125.

With Δx=0.25\Delta x = 0.25Starting at (0,1)(0, 1):

Stepxxyyy=x+yy' = x + yy_{\text{new}
00111.25
10.251.251.51.625
20.51.6252.1252.15625
30.752.156252.906252.8828125
41.02.88281253.88281253.853515625
51.253.8535156255.1035156255.129394531
61.55.1293945316.6293945316.786743164
71.756.7867431648.5367431648.920428955

Approximation: y(2)8.920y(2) \approx 8.920.

(b) Exact: y(2)=2e221=2e2310.778y(2) = 2e^2 - 2 - 1 = 2e^2 - 3 \approx 10.778.

Error with Δx=0.5\Delta x = 0.5: 10.7787.125=3.653|10.778 - 7.125| = 3.653. Error with Δx=0.25\Delta x = 0.25: 10.7788.920=1.858|10.778 - 8.920| = 1.858.

(c) Ratio: 3.653/1.8581.96623.653 / 1.858 \approx 1.966 \approx 2 (not 4).

The error should scale as O(Δx)O(\Delta x) for Euler’s method (first-order), so halving Δx\Delta x should approximately halve the error, not quarter it. Quartering occurs for second-order methods (like improved Euler or Runge-Kutta). The result approximately confirms this: the error ratio is about 2.

The misconception: students often confuse the error order of different numerical methods, or they incorrectly assume that halving the step size always quarters the error.


UT-3: Logistic Growth with Non-Standard Carrying Capacity

Question:

A population P(t)P(t) satisfies the logistic differential equation:

dPdt=0.04P(1PK)\frac{dP}{dt} = 0.04P\left(1 - \frac{P}{K}\right)

With P(0)=100P(0) = 100 and carrying capacity KK. Suppose the population is growing fastest when P=250P = 250.

(a) Find KK. (b) Find the particular solution P(t)P(t). (c) At what time tt does the population reach 0.9K0.9K?

Solution:

(a) The logistic growth rate is maximized when P=K/2P = K/2. Given the maximum growth occurs at P=250P = 250:

K2=250    K=500\frac{K}{2} = 250 \implies K = 500

(b) The general solution to the logistic equation dPdt=rP(1PK)\dfrac{dP}{dt} = rP\left(1 - \dfrac{P}{K}\right) is:

P(t)=K1+AertP(t) = \frac{K}{1 + A e^{-rt}}

Where A=KP0P0A = \dfrac{K - P_0}{P_0}. With K = 500$$P_0 = 100$$r = 0.04:

A=500100100=4A = \frac{500 - 100}{100} = 4

P(t)=5001+4e0.04tP(t) = \frac{500}{1 + 4e^{-0.04t}}

(c) Set P(t)=0.9K=450P(t) = 0.9K = 450:

450=5001+4e0.04t450 = \frac{500}{1 + 4e^{-0.04t}}

1+4e0.04t=500450=1091 + 4e^{-0.04t} = \frac{500}{450} = \frac{10}{9}

4e0.04t=194e^{-0.04t} = \frac{1}{9}

e0.04t=136e^{-0.04t} = \frac{1}{36}

0.04t=ln ⁣(136)=ln36-0.04t = \ln\!\left(\frac{1}{36}\right) = -\ln 36

t=ln360.04=25ln3625(3.584)89.6t = \frac{\ln 36}{0.04} = 25\ln 36 \approx 25(3.584) \approx 89.6

The population reaches 90%90\% of carrying capacity at approximately t89.6t \approx 89.6 time units.


Integration Tests

Tests synthesis of differential equations with other topics.

IT-1: Slope Field Synthesis with Definite Integrals (with Integrals)

Question:

A slope field for dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} is drawn in the region 3x3-3 \leq x \leq 3, 3y3-3 \leq y \leq 3.

(a) Sketch the solution curve passing through (1,2)(1, 2). (b) A student claims that no solution curve can cross the xx-axis. Justify this claim using the existence and uniqueness theorem. (c) The solution through (1,2)(1, 2) is a hyperbola. Find its equation and compute the arc length of this curve from x=1x = 1 to x=3x = 3.

Solution:

(a) The slope field for dydx=xy\dfrac{dy}{dx} = \dfrac{x}{y} has slopes that are positive in quadrants I and III (where xx and yy have the same sign) and negative in quadrants II and IV. Along y=xy = x the slope is 11; along y=xy = -x the slope is 1-1. The slopes are very steep near y=0y = 0 and nearly horizontal near x=0x = 0. The solution through (1,2)(1, 2) lies in quadrant I and is concave up (since d2ydx2=yxyy2=yx2/yy2=y2x2y3\dfrac{d^2y}{dx^2} = \dfrac{y - x \cdot y'}{y^2} = \dfrac{y - x^2/y}{y^2} = \dfrac{y^2 - x^2}{y^3}Which is positive for y>xy > |x|).

(b) f(x,y)=xyf(x, y) = \dfrac{x}{y} is undefined when y=0y = 0So the existence and uniqueness theorem does not apply on the xx-axis. A solution curve approaching y=0y = 0 would have dydx±\dfrac{dy}{dx} \to \pm\inftyMeaning the curve becomes vertical. Since the ODE is not defined on y=0y = 0No solution curve can cross it.

(c) Separate variables: ydy=xdxy\,dy = x\,dx. Integrate: y22=x22+C\dfrac{y^2}{2} = \dfrac{x^2}{2} + C. Using (1,2)(1, 2): 2=12+C    C=322 = \frac{1}{2} + C \implies C = \frac{3}{2}.

y2=x2+3    y=x2+3y^2 = x^2 + 3 \implies y = \sqrt{x^2 + 3}

Arc length from x=1x = 1 to x=3x = 3:

s=131+(dydx)2dx=131+x2x2+3dxs = \int_1^3 \sqrt{1 + \left(\frac{dy}{dx}\right)^2}\,dx = \int_1^3 \sqrt{1 + \frac{x^2}{x^2 + 3}}\,dx

=132x2+3x2+3dx=132(x2+3)3x2+3dx= \int_1^3 \sqrt{\frac{2x^2 + 3}{x^2 + 3}}\,dx = \int_1^3 \sqrt{\frac{2(x^2 + 3) - 3}{x^2 + 3}}\,dx

=1323x2+3dx= \int_1^3 \sqrt{2 - \frac{3}{x^2 + 3}}\,dx

This integral does not have an elementary antiderivative. It can be evaluated numerically or expressed in terms of elliptic integrals. The setup itself tests whether students correctly compute dydx\dfrac{dy}{dx} from the implicit solution and set up the arc length integral.


IT-2: Separable DE Leading to Improper Integral (with Limits)

Question:

Solve dydx=1xy\dfrac{dy}{dx} = \dfrac{1}{xy} with initial condition y(1)=0y(1) = 0.

A student separates variables and writes:

ydy=dxx    y22=lnx+C\int y\,dy = \int \frac{dx}{x} \implies \frac{y^2}{2} = \ln|x| + C

Using y(1)=0y(1) = 0: 02=ln1+C    C=0\dfrac{0}{2} = \ln 1 + C \implies C = 0Giving y=±2lnxy = \pm\sqrt{2\ln|x|}.

(a) Identify the domain issues with this solution. (b) Does a solution exist on any interval containing x=1x = 1? Justify using the existence and uniqueness theorem. (c) If the initial condition is changed to y(1)=1y(1) = 1Find the solution and determine its maximal interval of existence.

Solution:

(a) The “solution” y=±2lnxy = \pm\sqrt{2\ln|x|} requires lnx0\ln|x| \geq 0I.e., x1|x| \geq 1. But the initial condition is at x=1x = 1Where ln1=0\ln 1 = 0 and y=0y = 0. The domain does not include any interval around x=1x = 1 (it only includes x=1x = 1 as a boundary point). This is not a valid solution on any open interval.

(b) f(x,y)=1xyf(x, y) = \dfrac{1}{xy} is undefined at (1,0)(1, 0) (both x=0x = 0 and y=0y = 0 cause problems, but here specifically y=0y = 0 makes ff undefined). The existence and uniqueness theorem does not apply. In fact, no solution exists on any interval containing x=1x = 1 because the ODE is undefined when y=0y = 0.

(c) With y(1)=1y(1) = 1: f(x,y)=1xyf(x, y) = \dfrac{1}{xy} is continuous near (1,1)(1, 1)So a unique solution exists.

y22=lnx+C    12=0+C    C=12\frac{y^2}{2} = \ln|x| + C \implies \frac{1}{2} = 0 + C \implies C = \frac{1}{2}

y2=2lnx+1=ln(x2)+1y^2 = 2\ln|x| + 1 = \ln(x^2) + 1

y=1+ln(x2)y = \sqrt{1 + \ln(x^2)}

(We take the positive branch since y(1)=1>0y(1) = 1 > 0.)

Domain: 1+ln(x2)>0    ln(x2)>1    x2>e1    x>e1/20.6071 + \ln(x^2) > 0 \implies \ln(x^2) > -1 \implies x^2 > e^{-1} \implies |x| > e^{-1/2} \approx 0.607.

Maximal interval of existence: (e1/2,0)(0,)(-e^{-1/2}, 0) \cup (0, \infty) (excluding x=0x = 0 where ff is undefined, and the initial condition at x=1x = 1 places us on (0,)(0, \infty)). The maximal interval containing x=1x = 1 is (e1/2,)(e^{-1/2}, \infty).


IT-3: Qualitative Analysis with Phase Line (with Derivatives)

Question:

Consider the autonomous differential equation dydx=y(y2)2(y+1)\dfrac{dy}{dx} = y(y - 2)^2(y + 1).

(a) Find all equilibrium solutions and classify their stability. (b) A student claims that since y=2y = 2 is a repeated root of y(y2)2(y+1)=0y(y-2)^2(y+1) = 0The equilibrium at y=2y = 2 is “doubly stable.” Is this correct? (c) If y(0)=1y(0) = 1Determine limty(t)\displaystyle\lim_{t \to \infty} y(t) and limty(t)\displaystyle\lim_{t \to -\infty} y(t). (d) For what initial values y(0)=y0y(0) = y_0 does y(t)2y(t) \to 2 as tt \to \infty?

Solution:

(a) Equilibrium solutions: y=0y = 0, y=2y = 2, y=1y = -1.

Let f(y)=y(y2)2(y+1)f(y) = y(y-2)^2(y+1). Test the sign of f(y)f(y) in each region:

RegionTest pointf(y)f(y) signBehavior
y<1y \lt -1y=2y = -2(2)(16)(1)>0(-2)(16)(-1) > 0Increasing
1<y<0-1 \lt y \lt 0y=0.5y = -0.5(0.5)(6.25)(0.5)<0(-0.5)(6.25)(0.5) \lt 0Decreasing
0<y<20 \lt y \lt 2y=1y = 1(1)(1)(2)>0(1)(1)(2) > 0Increasing
y>2y > 2y=3y = 3(3)(1)(4)>0(3)(1)(4) > 0Increasing

Stability classification:

  • y=1y = -1: ff changes from ++ to -So solutions approach y=1y = -1 from above and leave from below. For y<1y < -1: f>0f > 0 means yy increases toward 1-1. For 1<y<0-1 < y < 0: f<0f < 0 means yy decreases toward 1-1. So y=1y = -1 is stable (asymptotically stable).
  • y=0y = 0: ff changes from - (just below 0, i.e., 0.5-0.5) to ++ (just above 0, i.e., 11). So solutions move away from y=0y = 0 from both sides. Unstable.
  • y=2y = 2: f>0f > 0 for 0<y<20 < y < 2 and f>0f > 0 for y>2y > 2. Solutions increase through y=2y = 2 from below and continue increasing above. Semistable (solutions approach from below but depart from above).

(b) No. The multiplicity of the root affects the nature of the equilibrium, but “doubly stable” is not the correct interpretation. A root of even multiplicity in f(y)f(y) at an equilibrium means the equilibrium is a node — semistable, with solutions approaching from one side and departing from the other. The “double root” makes f(2)=0f'(2) = 0Which means the linearization test is inconclusive and we must use the sign chart instead.

(c) y(0)=1y(0) = 1 is in the region 0<y<20 < y < 2 where f(y)>0f(y) > 0So yy increases. Since y=2y = 2 is semistable (solutions pass through from below), y(t)y(t) increases toward y=2y = 2 asymptotically (it never actually reaches it in finite time). As tt \to \infty: y(t)2y(t) \to 2.

As tt \to -\infty: tracing backward, yy decreases from 1 toward the equilibrium below, which is y=0y = 0. So y(t)0y(t) \to 0 as tt \to -\infty.

(d) y(t)2y(t) \to 2 as tt \to \infty for any y0(0,2)y_0 \in (0, 2). For y0=2y_0 = 2: y(t)=2y(t) = 2 (equilibrium). For y0>2y_0 > 2: y(t)y(t) increases without bound (no equilibrium above y=2y = 2). For y00y_0 \leq 0: y(t)y(t) does not approach 22.

Answer: y0(0,2]y_0 \in (0, 2].

Summary

The key principles covered in this topic are linked in the sub-pages above. Focus on understanding the definitions, applying the formulas or frameworks, and evaluating strengths and limitations of each approach.

Worked Examples

Worked examples demonstrating the application of key concepts are covered in the detailed sub-pages linked above.

Common Pitfalls

  • Confusing terminology or concepts that appear similar but have distinct meanings.
  • Overlooking key assumptions or boundary conditions that limit applicability.