Q 3.6-3E

Question

Show that when the trapezoid scheme given in formula (8) is used to approximate the solution f(x)=ex of y'=y,y(0)=1 , at x = 1, then we get yn+1=1+h21-h2yn,n = 0, 1, 2, . . . , which leads to the approximation (1+h21-h2)1hfor the constant e. Compute this approximation for = 1, 10-1,10-2,10-3,and10-4and compare your results with those in Tables 3.4 and 3.5.

Step-by-Step Solution

Verified
Answer

h

y(1)=e

1

3

0.1

2.72055

0.01

2.71830

0.001

2.71828

0.0001

2.71828

1Step 1: Apply iteration rule for the trapezoidal scheme

Here  y'=y,y(0)=1

Apply the iteration rule for the trapezoidal scheme is 

yn+1=yn+h2[f(xn,yn)+f(xn+1,yn+1)]

In our case of differential equation our equation is 

yn+1=yn1+h21-h2

The interval is

b-an=1-0n=1n=hn=1h




2Step 2: Find the values of f(x) = e x

h

y(1)=e

1

3

0.1

2.72055

0.01

2.71830

0.001

2.71828

0.0001

2.71828

3Step 3: Substitute in the iteration rule for the trapezoidal scheme

Now,


y(1)=y(0+nh)=yny1=y(0)1+h21-h2=1+h21-h2y2=1+h21-h22...yn=1+h21-h2nyn=1+h21-h21h


Hence the solution is 

h

e

1

3

0.1

2.72055

0.01

2.71830

0.001

2.71828

0.0001

2.71828