DETA - Numerical Solution Using Euler's Method

Numerical Solution Using Slope Fields

Euler's Method

Recall when the concept of a derivative was first introduced, it represented the slope of a tangent line to a curve at a given point. The equation of the corresponding tangent line now serves as the basis for finding the numerical solution of a differential equation using Euler's method. For the differential equation y'= f(x, y) with initial condition y(x0) = y0, the solution curve can be approximated by its linearization L(x) = y(x0) + y'(x0)(x - x0) or y1 = y0 + f(x0, y0)(x - x0). The function L(x) provides a good approximation to the solution y(x) over a solution y(x) over a short interval about x0. Moving a small amount (step size) from x0 to x1 = x0 + dx, where dx = Δx in differential notation, produces the next linearization L(x) = y1 + f(x1, y1)(x - x1) or y2 = y1 + f(x1, y1)dx. Continuing this process, the next step from x2, y2 with a slope f(x2, y2), produces the third approximation y3 = y2 + f(x2, y2)dx. In general, yn = yn-1 + f(xn-1, yn-1)dx.

Approximating a Particular Solution

Euler's method is based on starting at the point given by the initial value and proceeding in the direction indicated by the slope field, stopping at a nearby location and proceeding in that direction (midcourse correction), and continuing the process of stringing linearizations together to approximate the curve over a longer interval. Euler's method does not produce an exact solution to an initial-value problem, but rather approximations whose accuracy may be increased by decreasing the step size, which increases the number of midcourse corrections.

When an exact solution for an initial-value problem y'= f(x, y), y(x0) = y0 cannot be immediately found or is not required, a table of approximate numerical values of y for values of x in an appropriate interval can be easily generated using technological tools. The table is considered a numerical solution of the problem, and the procedure used to generate such a table is referred to as a numerical method. The next presentation includes a derivation of Euler's Method.

Using Euler's Method to find the solution of y' = 1 + y with initial conditions y(0) = 1 and step size 0.05 produces the following solution data points.

x

y

0.000000

1.000000

0.050000

1.100000

0.100000

1.205000

0.150000

1.315250

0.200000

1.431013

0.250000

1.552563

0.300000

1.680191

0.350000

1.814201

0.400000

1.954911

0.450000

2.102656

0.500000

2.257789

0.550000

2.420679

0.600000

2.591713

0.650000

2.771298

0.700000

2.959863

0.750000

3.157856

0.800000

3.365749

0.850000

3.584037

0.900000

3.813238

0.950000

4.053900

1.000000

4.306595

Based on this calculation, the particular solution of the differential equation is approximately 4.3066. It is important to remember that Euler's Method for finding a numerical solution is only an approximation of the exact solution. The error in Euler's method is the difference between the exact value and the approximate value.

x

y

y(exact)

Error

0.000000

1.000000

1.000000

0.000000

0.050000

1.100000

1.102542

0.002542

0.100000

1.205000

1.210342

0.005342

0.150000

1.315250

1.323668

0.008418

0.200000

1.431013

1.442806

0.011793

0.250000

1.552563

1.568051

0.015488

0.300000

1.680191

1.699718

0.019527

0.350000

1.814201

1.838135

0.023934

0.400000

1.954911

1.983649

0.028738

0.450000

2.102656

2.136624

0.033968

0.500000

2.257789

2.297443

0.039654

0.550000

2.420679

2.466506

0.045827

0.600000

2.591713

2.644238

0.052525

0.650000

2.771298

2.831082

0.059784

0.700000

3.027505

3.087505

0.067642

0.750000

3.234000

2.644238

0.076144

0.800000

3.365749

3.451082

0.085333

0.850000

3.584037

3.679294

0.095257

0.900000

3.813238

3.919206

0.105968

0.950000

4.053900

4.171419

0.117519

1.000000

4.306595

4.436564

0.129969

Based on an exact solution y = 2ex - 1, the error continues to increase and the percent error can be computed using the formula:

 LaTeX: \%\:error\:=\frac{\:\left|exact\:-\:approximate\right|}{exact}\cdot100%error=|exactapproximate|exact100

Thus the percent error is approximately 0.029 (0.129969/4.436564) or 2.9%. Additional calculations necessary to reduce the error must be carefully weighed in terms of accuracy required and the resulting accumulation of round-off errors.

Another example of using Euler's Method to solve a differential equation is presented below.

Use the interactive applet to explore how Euler's method can be used to solve a variety of differential equations with given initial conditions by CLICKING HERE. Links to an external site.

Numerical Solution Using Euler's Method Practice

Numerical Solution Using Euler's Method: Even More Problems!

Complete problems from your textbook and/or online resources as needed to ensure your complete understanding of the numerical solution of a differential equation using Euler's Method.

IMAGES CREATED BY GAVS