Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Consider the initial-value problem y'=(x+y-1)2,y(0)=2. Use the improved Euler's method with h=0.1and h=0.05to obtain approximate values of the solution at x=0.5. At each step, compare the approximate value with the actual value of the analytic solution.

Short Answer

Expert verified

The approximated value ofy0.5 for h=0.1,y53.8254; and for h=0.05,y103.8840. The actual value ofy0.5 is 3.9082.

Step by step solution

01

Improved Euler's method

As per the Improved Euler's method, the solution of a linear differential equation of the formy'=f(x,y) is given as follows:

yn+1*=yn+hf(xn,yn)---(1)yn+1=yn+h2(fxn,yn+fxn+1,yn+1*)----(2)

02

Find the approximate value for the equation h = 0.1

The linear differential equation is given as follows:

y'=(x+y-1)2

The initial value is given as y0=2.

This implies thatx0=0and y0=2.

The given differential equation is of the form y'=f(x).

Then, f(x,y)=(x+y-1)2.

Obtain the solution of the given differential equation by Euler's method for h = 0.1.

Obtain the solution of the given differential equation by Euler's method for h = 0.1.

Substitute 0 for n into equation (1) to obtain the equation of y1*as:

y1*=y0+hfx0,y0

Substitute 0 forx0,2fory0and 0.1 for h intoy1*=y0+hfx0,y0as:

y1*=2+(0.1)f(0,2)y1*=2+(0.1)·(0+2-1)2y1*=2+0.1y1*=2.1

Substitute 0 for n into equation (2) as follows:

y1=y0+h2fx0,y0+fx1,y1*

Substitute 0 for x0,2for y0,0.1for x1,2.1for y1*and 0.1 for h into y1=y0+h2fx0,y0+fx1,y1*as:

y1=2+0.12(f(0,2)+f(0.1,2.1))y1=2+(0.05)(0+2-1)2+(0.1+2.1-1)2y1=2+(0.05)(2.44)y1=2.122

Therefore, the approximated value ofy1 ory(0.1) is 2.1220.

03

Finding the actual value for the equation

Now, to obtain the exact solution of the differential equation y'=(x+y-1)2, assume(x+y-1)as a variable t then the expression becomes as shown below:

dydt-1=t2dydt=t2+1

Now integrate the above expression by rearranging the similar variable terms on one side of the equation as follows:

dtt2+1=dxtan-1t=x+c

Back-substitute the value of t as (x+y-1)in the above expression and simplify as:

tan-1t=x+ctan-1(x+y-1)=x+cx+y-1=tan(x+c)y=1-x+tan(x+c)

Substitute the initial valuey(0)=2intoy=1-x+tan(x+c)and solve for integration constant c as:

2=1-0+tan(0+c)2-1=tanctanc=1c0.7854

Hence, the solution of the given differential equation is obtained as y=1-x+tan(x+0.7854)

Substitute 0.1 for x intoy=1-x+tan(x+0.7854)to obtain the actual value ofy(0.10)as:

y=1-x+tan(x+0.7854)y1-0.1+tan(0.1+0.7854)y0.9+1.2230y=2.1230

Therefore, the actual value of y1or y(0.1)is 2.1230.

Similarly, the value ofy(0.2),y(0.3),y(0.4) andy(0.5) are obtained as shown in Table 1 as:

xn

Approximated yn

Actual yn

0.00

2.0000

2.0000

0.10

2.1230

2.1230

0.20

2.3049

2.3085

0.30

2.5858

2.5958

0.40

3.0378

3.6050

0.50

3.8254

3.9082

04

Find the approximate value for the equation h = 0.05

Now for step size h = 0.05, calculate for the value of y(0.5) as shown below:

Substitute 0 for n into equation (1) to obtain the equation ofy1* as:

y1*=y0+hfx0,y0

Substitute 0 forx0,2 fory0 and 0.05 for h intoy1*=y0+hfx0,y0 as follows:

y1*=2+(0.05)f(0,2)y1*=2+(0.05)·(0+2-1)y1*=2+0.05y1*=2.05

Substitute 0 for n into equation (2) as:

y1=y0+h2fx0,y0+fx1,y1*

Substitute 0 for x0,2for y0,0.05for x1,2.05fory1* and 0.05 for h intoy1=y0+h2fx0,y0+fx1,y1* as follows:

y1=2+0.052(f(0,2)+f(0.05,2.05))y1=2+(0.025)(0+2-1)2+(0.05+2.05-1)2y1=2+(0.025)(2.21)y1=2.05525

Therefore, the approximated value ofy1 ory(0.05) is 2.0553.

05

Find the actual value for h = 0.05

Substitute 0.05 for x intoy=1-x+tan(x+0.7854) to obtain the actual value ofy(0.05) as:

y=1-x+tan(x+0.7854)y=1-0.05+tan(0.05+0.7854)y=0.95+1.1054y=2.0554

Therefore, the actual value ofy1 ory(0.05) is 2.0554.

Similarly, the value of y(0.1),y(0.15),y(0.20),y(0.25),y(0.30),y(0.35),y(0.40), are obtained as showny(0.45) andy(0.45) in Table 2.

xn

Approximated yn

Actual yn

0.00

2.0000

2.0000

0.05

2.0553

2.0554

0.10

2.1228

2.1230

0.15

2.2056

2.2061

0.20

2.3075

2.3085

0.25

2.4342

2.4358

0.30

2.5931

2.5958

0.35

2.7953

2.7997

0.40

3.0574

3.0650

0.45

3.4507

3.4189

0.50

3.8840

3.9082

Hence, The approximated value ofy0.5 for h=0.1,y53.8254; and for h=0.05,y103.8840. The actual value ofy0.5 is 3.9082.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Study anywhere. Anytime. Across all devices.

Sign-up for free