11.11.2014 Views

Introductory Differential Equations using Sage - William Stein

Introductory Differential Equations using Sage - William Stein

Introductory Differential Equations using Sage - William Stein

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1.7. NUMERICAL SOLUTIONS II - RUNGE-KUTTA AND OTHER METHODS 43<br />

The plot of the approximation to x(t) is given in Figure 1.14.<br />

Figure 1.14: Euler’s method with h = 1/3 for x ′′ − 3x ′ + 2x = 1, x(0) = 0, x ′ (0) = 1.<br />

Exercise: Use <strong>Sage</strong> and Euler’s method with h = 1/3 for the following problems:<br />

1. (a) Use Euler’s method to estimate x(1) if x(0) = 1 and dx<br />

dt = x + t2 , <strong>using</strong> 1,2, and<br />

4 steps.<br />

(b) Find the exact value of x(1) by solving the ODE (it is a linear ODE).<br />

2. Find the approximate values of x(1) and y(1) where<br />

{ x ′ = x + y + t, x(0) = 0,<br />

y ′ = x − y, y(0) = 0,<br />

3. Find the approximate value of x(1) where x ′ = x 2 + t 2 , x(0) = 1.<br />

1.7 Numerical solutions II - Runge-Kutta and other methods<br />

The methods of 1.6 are sufficient for computing the solutions of many problems, but often<br />

we are given difficult cases that require more sophisticated methods. One class of methods<br />

are called the Runge-Kutta methods, particularly the fourth-order method of that class<br />

since it achieves a popular balance of efficiency and simplicity. Another class, the multistep<br />

methods, use information from some number m of previous steps. Within that class, we<br />

will briefly describe the Adams-Bashforth method. Finally, we will say a little bit about<br />

adaptive step sizes - i.e. changing h adaptively depending on some local estimate of the<br />

error.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!