01 / 20

Technology for
Solutions

Learn to use numerical methods, slope fields, and computational tools to approximate and visualize solutions to differential equations that resist analytic approaches.

Differential Equations

Why Use Technology?

Most differential equations cannot be solved analytically. Even a simple-looking ODE like \( y' = e^{-y^2} + \sin(xy) \) has no closed-form solution. Technology lets us approximate solutions numerically and visualize their behavior through slope fields and phase portraits.

What Is a Slope Field?

A slope field (or direction field) for \( y' = f(x, y) \) draws a short line segment at each point \( (x, y) \) whose slope equals \( f(x, y) \). Together the segments reveal the shape of solution curves without solving the equation.

x y solution for y(0)=1
\( y' = x - y \)

Euler's Method: The Foundation

Euler's method is the simplest numerical technique for solving an IVP \( y' = f(x,y), \; y(x_0)=y_0 \). At each step, we follow the tangent line forward by a small step size \( h \).

Euler's Method Visualized

x y (0,1) y(2)≈5.06
exact: \( y=e^x \)
tangent steps Euler approx.

Beyond Euler: Runge-Kutta Methods

Higher-order methods evaluate \( f(x,y) \) at multiple intermediate points within each step to achieve better accuracy. The most widely used is the classical 4th-order Runge-Kutta (RK4).

Euler vs. RK4: Key Differences

Euler's Method RK4
Evaluations per step 1 4
Local truncation error \( O(h^2) \) \( O(h^5) \)
Global error \( O(h) \) \( O(h^4) \)
Ease of implementation Very simple Moderate
Practical use Teaching / rough estimates Industry standard

Tools for Solving DEs

Graphing Calculators
TI-84/89 have built-in slope field and Euler's method programs. Good for exams.
Desmos / GeoGebra
Free browser tools for slope fields and parametric solution curves. Interactive and visual.
Python / MATLAB
SciPy's odeint and MATLAB's ode45 use adaptive RK methods for research-grade accuracy.

How to Apply Technology

1
Write the ODE in standard form. Express as \( y' = f(x, y) \) and identify the initial condition \( y(x_0) = y_0 \).
2
Sketch the slope field. Use technology to plot direction segments and identify equilibrium solutions, funnels, and separatrices.
3
Choose a numerical method and step size. Euler for quick estimates; RK4 for precision. Smaller \( h \) means more accuracy but more computation.
4
Compute and interpret. Generate the numerical solution, then check: does it follow the slope field? Does it satisfy known behaviors (equilibria, monotonicity)?
5
Refine. Reduce \( h \) and compare results. If the answer barely changes, you have good convergence.

Example 1: Euler's Method for \( y' = x + y \)

Approximate \( y(1) \) given \( y' = x + y \), \( y(0) = 1 \), using Euler's method with \( h = 0.25 \).

1
Step 0: \( (x_0, y_0) = (0, 1) \). Slope: \( f(0,1) = 0 + 1 = 1 \).
\( y_1 = 1 + 0.25(1) = \) 1.25
2
Step 1: \( (0.25, 1.25) \). Slope: \( 0.25 + 1.25 = 1.5 \).
\( y_2 = 1.25 + 0.25(1.5) = \) 1.625
3
Step 2: \( (0.5, 1.625) \). Slope: \( 0.5 + 1.625 = 2.125 \).
\( y_3 = 1.625 + 0.25(2.125) = \) 2.15625
4
Step 3: \( (0.75, 2.15625) \). Slope: \( 0.75 + 2.15625 = 2.90625 \).
\( y_4 = 2.15625 + 0.25(2.90625) \approx \) 2.8828

Example 2: Slope Field Analysis

Consider the autonomous ODE \( y' = y(2 - y) \). By examining the slope field, we can determine long-term behavior without solving.

x y y = 2 y = 0 y(0) = 3 y(0) = 0.5 stable equilibrium: y = 2

Example 3: Step Size Matters

For \( y' = -2y \), \( y(0) = 1 \), compare Euler approximations of \( y(1) \) with different step sizes. The exact solution is \( y = e^{-2x} \), so \( y(1) = e^{-2} \approx 0.1353 \).

Step size \( h \) Euler \( y(1) \) Error
\( h = 1.0 \) -1.000 1.135
\( h = 0.5 \) 0.000 0.135
\( h = 0.25 \) 0.0625 0.073
\( h = 0.1 \) 0.1074 0.028
\( h = 0.01 \) 0.1326 0.003

Numerical Stability

A numerical method is stable for a given problem if small perturbations don't grow unboundedly. For Euler's method applied to \( y' = \lambda y \) (where \( \lambda < 0 \)), stability requires:

Stable
\( h < 2/|\lambda| \): solution decays smoothly toward zero.
Unstable
\( h > 2/|\lambda| \): solution oscillates wildly and blows up.

Common Mistakes

✕ Step size too large
Using large \( h \) for stiff equations leads to instability or wildly inaccurate results. Always check that \( h \) satisfies stability constraints.
✕ Misreading slope fields
Confusing the slope of line segments with the value of \( y \) itself. The segments show \( y' \), not \( y \).
✕ Ignoring error accumulation
Assuming each step's small error stays small. Errors compound over many steps: global error grows with the number of steps taken.

Summary: Methods at a Glance

Method What It Does Best For
Slope Fields Visualize solution behavior qualitatively Identifying equilibria, stability, long-term trends
Euler's Method Simple first-order numerical approximation Learning, quick hand calculations, exam problems
RK4 High-accuracy 4th-order numerical solver General-purpose computation with technology
Adaptive Methods Automatically adjust step size for efficiency Real-world applications, stiff or complex ODEs

Question 1 of 5

Using Euler's method with \( h = 0.5 \) on \( y' = 2x \), \( y(0) = 0 \), what is the approximation of \( y(1) \)?

Question 2 of 5

In a slope field for \( y' = y(1 - y) \), the segments at points where \( y = 1 \) are:

Question 3 of 5

The global truncation error of the classical 4th-order Runge-Kutta method is:

Question 4 of 5

For \( y' = -10y \) using Euler's method, the maximum stable step size is:

Question 5 of 5

A student uses Euler's method on \( y' = y^2 \), \( y(0) = 1 \) with \( h = 0.1 \) and gets very large values near \( x = 1 \). The most likely explanation is: