Books
in black and white
Main menu
Share a book About us Home
Books
Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics
Ads

Elementary Differential Equations and Boundary Value Problems - Boyce W.E.

Boyce W.E. Elementary Differential Equations and Boundary Value Problems - John Wiley & Sons, 2001. - 1310 p.
Download (direct link): elementarydifferentialequations2001.pdf
Previous << 1 .. 242 243 244 245 246 247 < 248 > 249 250 251 252 253 254 .. 609 >> Next

e~* + e3t e~* — e3t
τ() = —2—, ^(t) = —4—. (10)
Let us first use the Euler method. For this problem fn = xn — 4yn and gn = — xn + Σο ; hence
f, = 1 — (4)(0) = 1, g0 = -1 + 0 = -1.
Then, from the Euler formulas (4) and (5) we obtain
x1 = 1 + (0.1)(1) = 1.1, Σ1 = 0 + (0.1)(—1) = -0.1.
At the next step
f1 = 1.1 — (4)(—0.1) = 1.5, g1 = -1.1 + (—0.1) = -1.2.
Consequently,
x2 = 1.1 + (0.1)(1.5) = 1.25, y2 = -0.1 + (0.1)(—1.2) = -0.22.
8.6 Systems of First Order Equations
457
The values of the exact solution, correct to eight digits, are τ(0.2) = 1.3204248 and ¦τ-(0.2) = —0.25084701. Thus the values calculated from the Euler method are in error by about 0.0704 and 0.0308, respectively, corresponding to percentage errors of about 5.3% and 12.3%.
Now let us use the Runge-Kutta method to approximate τ(0.2) and ty(0.2). With h = 0.2 we obtain the following values from Eqs. (7):
, / f(1.15, —0.12)\ _ / 1.63 \
k°3 = V.g(115, —0.12)σ = \—1.27) ;
k ( f (1.326, —0.254)\ ( 2.342\
^o4 = yg(1.326, —0.254) j = y—1.580y .
Then, substituting these values in Eq. (6), we obtain
/Λ 02 f 9.602\ / 1.3200667 \
x! = \0/ + 6 V—7.52/ = \—0.25066667J ^
These values of x1 and y1 are in error by about 0.000358 and 0.000180, respectively, with percentage errors much less than one-tenth of 1%.
This example again illustrates the great gains in accuracy that are obtainable by
using a more accurate approximation method, such as the Runge-Kutta method. In
the calculations we have just outlined, the Runge-Kutta method requires only twice
as many function evaluations as the Euler method, but the error in the Runge-Kutta
method is about 200 times less than the Euler method.
PROBLEMS In each of Problems 1 through 6 determine approximate values of the solution x = τ(΄),
³ y = ft(t) of the given initial value problem at t = 0.2, 0.4, 0.6, 0.8, and 1.0. Compare the results obtained by different methods and different step sizes.
(a) Use the Euler method with h = 0.1.
(b) Use the Runge-Kutta method with h = 0.2.
(c) Use the Runge-Kutta method with h = 0. 1.
> 1. x = x + y + t, Σ = 4x — 2y; x(0) = 1, y(0) = 0
> 2. x = 2x + ty, y = xy; x(0) = 1, y(0) = 1
> 3. x = —tx — y — 1, y = x; x(0) = 1, y(0) = 1
> 4. x = x — y + xy, y = 3x — 2y — xy; x(0) = 0, y(0) = 1
> 5. x = x(1 — 0.5x — 0.5y), y = y(—0.25 + 0.5x); x(0) = 4, y(0) = 1
> 6. x = exp(—x + y) — cos x, y = sin(x — 3y); x(0) = 1, y(0) = 2
> 7. Consider the example problem X = x — 4y, y = —x + y with the initial conditions
x(0) = 1 and y(0) = 0. Use the Runge-Kutta method to solve this problem on the interval 0 < t < 1. Start with h = 0.2 and then repeat the calculation with step sizes h = 0.1, 0.05, each half as long as in the preceding case. Continue the process until
458
Chapter 8. Numerical Methods
the first five digits of the solution at t = 1 are unchanged for successive step sizes. Determine whether these digits are accurate by comparing them with the exact solution given in Eqs. (10) in the text.
> 8. Consider the initial value problem
x" + t2 X + 3x = t, x (0) = 1, Σ (0) = 2.
Convert this problem to a system of two first order equations and determine approximate values of the solution at t = 0.5 and t = 1.0 using the Runge-Kutta method with h = 0.1.
> 9. Consider the initial value problem X = f (t, x, y) and f = g(t, x, y) with x(t0) = x0
and y(t0) = y0. The generalization of the Adams-Moulton predictor-corrector method of Section 8.4 is
xn+1 = xn + 24h(55 Λ - 59 fn-1 + 37 fn-2 - 9 fn-3)’
Σο+1 = Σο + 24h(55gn - 59gn-1 + 37gn-2 - 9gn-3)
and
xn+1 = xn + 24h(9 fn+1 + 19 fn - 5 fn-1 + fn-2'),
Previous << 1 .. 242 243 244 245 246 247 < 248 > 249 250 251 252 253 254 .. 609 >> Next