Q 3.7-5E

Question

Use the Taylor methods of orders 2 and 4 with h = 0.25 to approximate the solution to the initial value problem y'=x+1-y,y(0)=1, at x = 1. Compare these approximations to the actual solution y=x+e-x evaluated at x = 1.

Step-by-Step Solution

Verified
Answer

ϕ21=1.3725ϕ41=1.3679

1Step 1: Find the value of f 2 (x,y)

Herey'=x+1-y,y(0)=1

 

Apply the chain rule.

 f2(x,y)=fx(x,y)+fy(x,y)f(x,y)


 Since f(x,y)=x+1-y

 

fx(x,y)=1fy(x,y)=-1

 

So, the equation is f2(x,y)=y-x

2Step 2: Evaluate the values of f 3 (x,y) and f 4 (x,y)

Apply the same procedure as step 1

 f3(x,y)=x-yf4(x,y)=y-x


3Step 3: Apply the recursive formulas for order 2

The recursive formula is

xn+1=xn+hyn+1=yn+hf(xn+yn)+h22!f2(xn+yn)+.....hpp!fp(xn+yn)xn+1=xn+0.25yn+1=yn+0.25(xn+1-yn)+0.2522(yn-xn)


4Step 4: Apply the initial condition and find the values of x and y

Where starting points are xo=0,y0=1.

 

x1=0.25y1=1.03125

 

Put all these values in recursive formulas for the other values.


x2=0.5y2=1.11035x3=0.75y3=1.22684x4=1y4=1.11035


Therefore, the approximation of the solution by the Taylor method of order 2 at point    

x = 1

 

ϕ21=1.3725

5Step 5: Apply the recursive formulas for order 4

xn+1=xn+0.25yn+1=yn+0.25(xn+1-yn)+0.2522(yn-xn)+0.2536(xn-yn)+0.25424(yn-xn)

6Step 6: Apply the initial condition and find the values of x and y

Where starting points are xo=0,y0=1.


x1=0.25y1=1.02881


Put all these values in recursive formulas for the other values.

x2=0.5y2=1.10654x3=0.75y3=1.22238x4=1y4=1.36789


Thus, the approximation of the solution by the Taylor method of order 4 at point 

X = 1


ϕ41=1.3679


The actual solution at x = 1

y(x)=x+e-xy(1)=1.3678794


Now combining the approximation with the actual solution at x = 1


y(1)-ϕ21=0.00462y(1)-ϕ41=0.00002

Hence the solution is ϕ2(1)=1.3725ϕ4(1)=1.3679