Qualitative Solution Sketcher — Theory
1. First-order differential equation
A first-order differential equation can often be written as:
\[
\frac{dy}{dx}=f(x,y).
\]
This means that the slope of the solution curve at the point \((x,y)\) is \(f(x,y)\).
The qualitative goal is to understand the shape and long-term behavior of solutions without always solving the equation exactly.
2. Direction fields
At each point \((x_i,y_j)\), the calculator evaluates:
\[
f(x_i,y_j).
\]
Then it draws a small arrow or segment with that slope.
A useful direction vector is:
\[
\left\langle 1,\ f(x_i,y_j)\right\rangle.
\]
A solution curve should be tangent to the nearby arrows everywhere.
3. Slope field interpretation
If \(f(x,y)>0\), then the solution is increasing at that point.
If \(f(x,y)<0\), then the solution is decreasing.
If \(f(x,y)=0\), then the solution has a horizontal tangent.
\[
f(x,y)>0 \Rightarrow y \text{ increases},
\qquad
f(x,y)<0 \Rightarrow y \text{ decreases}.
\]
4. Nullclines
A nullcline is the set of points where the derivative is zero:
\[
f(x,y)=0.
\]
Along a nullcline:
\[
\frac{dy}{dx}=0.
\]
Therefore, solution curves have horizontal tangents on the nullcline.
Nullclines help divide the plane into regions where solutions increase or decrease.
5. Autonomous equations
A differential equation is called autonomous if the right-hand side depends only on \(y\):
\[
\frac{dy}{dx}=g(y).
\]
In this case, the slope does not directly depend on \(x\).
This creates horizontal bands of behavior in the direction field.
6. Equilibrium solutions
For an autonomous equation:
\[
\frac{dy}{dx}=g(y),
\]
an equilibrium solution occurs when:
\[
g(y^\*)=0.
\]
Then \(y(x)=y^\*\) is a constant solution.
On the graph, an equilibrium appears as a horizontal line.
7. Stability classification
To classify an equilibrium \(y^\*\), check the signs of \(g(y)\) just below and just above \(y^\*\).
8. Example: logistic growth
The logistic equation is:
\[
\frac{dy}{dx}=y(1-y).
\]
The equilibria are found by setting the right-hand side equal to zero:
\[
y(1-y)=0.
\]
Therefore:
\[
y=0
\qquad\text{or}\qquad
y=1.
\]
Check the signs:
\[
y<0:\ y(1-y)<0,
\qquad
00,
\qquad
y>1:\ y(1-y)<0.
\]
So \(y=0\) is unstable and \(y=1\) is stable.
Solutions starting between \(0\) and \(1\) increase toward \(1\).
9. Solution curves from initial conditions
An initial value problem gives one starting point:
\[
y(x_0)=y_0.
\]
The solution curve through that point is drawn so that its slope satisfies:
\[
\frac{dy}{dx}=f(x,y)
\]
at every point along the curve.
The calculator uses numerical integration, such as RK4, to sketch the curve forward and backward in \(x\).
10. RK4 idea
The fourth-order Runge–Kutta method estimates the next point using four slope samples:
\[
y_{n+1}=y_n+\frac{h}{6}(k_1+2k_2+2k_3+k_4).
\]
where:
\[
k_1=f(x_n,y_n),
\]
\[
k_2=f\left(x_n+\frac{h}{2},y_n+\frac{h k_1}{2}\right),
\]
\[
k_3=f\left(x_n+\frac{h}{2},y_n+\frac{h k_2}{2}\right),
\]
\[
k_4=f(x_n+h,y_n+h k_3).
\]
RK4 usually gives smoother solution curves than Euler’s method.
12. Common mistakes
- Confusing direction fields with exact solutions: a direction field shows behavior, not always a closed-form solution.
- Ignoring the nullcline: the nullcline is where the solution changes from increasing to decreasing or vice versa.
- Classifying equilibria for non-autonomous equations: the usual equilibrium classification applies to \(y'=g(y)\).
- Using too large a step size: a large step size can make solution curves inaccurate.
- Reading arrows backward: the curve moves left to right as \(x\) increases.
- Forgetting axis units: graph axes should show both numbers and units.
- Assuming all equilibrium points are stable: some are unstable or semistable.