Q 3.7-6E

Question

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

Step-by-Step Solution

Verified
Answer

ϕ2(1)=0.6274ϕ4(1)=0.6227

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

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

 

Apply the chain rule.

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


Since f2(x,y)=1-y

 

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

 

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


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)=y-1f4(x,y)=1-y

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(1-yn)+0.2522(yn-1)


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

Where starting points are xo=0,y0=0

x1=0.25y1=0.21875

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

x2=0.5y2=0.389648x3=0.75y3=0.523163x4=1y4=0.627471

 

Therefore the approximation of the solution by the Taylor method of order 2 at point x=1

 

ϕ21=0.6274

5Step 5: Apply the recursive formulas for order 4

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

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

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


x1=0.25y1=0.216309


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


x2=0.5y2=0.385828x3=0.75y3=0.518679x4=1y4=0.622793



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


ϕ41=0.6227


The actual solution at x = 1


y(x)=1-e-xy(1)=0.632121


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


y(1)-ϕ21=0.00465y(1)-ϕ41=0.00933



Hence the solution is  

ϕ2(1)=0.6274ϕ4(1)=0.6227