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'=2y,y(0)=1. The analytic solution isy=e2x.

(a) Approximate y(0.1)using one step and Euler's method.

(b) Find a bound for the local truncation error iny1.

(c) Compare the error iny1with your error bound.

(d) Approximate y(0.1)using two steps and Euler's method.

(e) Verify that the global truncation error for Euler's method is O(h)by comparing the errors in parts (a) and (d).

Short Answer

Expert verified
  1. The approximate value of y(0.1) for the initial value problem y'=2y,y(0)=1is 1.2.
  2. The bound for local truncation error in y1for the initial value problem y'=2y,y(0)=1is 0.0244.
  3. The actual error of 0.0214 is less than the obtained truncation error of 0.0244 in subpart (b).
  4. The approximate value of y(0.1) using two steps of Euler's method for the initial value problem y'=2y,y(0)=1is 1.21.
  5. The actual error when h = 0.05 is approximately half of the actual error when h = 0.1.

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 form y'=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)

Euler's method:

As per Euler's method, the solution of the equation of the form y'=f(x,y)is given as follows:

localid="1664205336839" yn+1=yn+hf(xn,yn)

02

a) Finding the approximate value for the equation h = 0.1

The initial value problem is y'=2ysuch that the value of y(0) is 1. The analytic solution is y=e2x.

The initial value problem is given as follows: y'=2y

The initial value is given as y(0) = 1. This implies thatx0=0andy0=1.

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

f(x,y)=2y

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

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

yn+1*=yn+hfxn,yn(1)yn+1=yn+h2fxn,yn+fxn+1,yn+1*(2)

Substitute 0 for n in equation (1) to obtain the equation ofy1as shown below.

y1=y0+hfx0,y0

Substitute 0 forx0,1fory0and 0.1 for h in the above equation.

y1=1+(0.1)f(0,1)y1=1+(0.1)·(2)y1=1+0.2y1=1.2

Thus, the approximate value of y(0.1) for the initial value problemy'=2y,y(0)=1is 1.2.

03

b) Finding the upper bound value for local truncation error

The bound for local truncation error in y1for the initial value problem y'=2y,y(0)=1.

Consider the equation y=e2x.

Differentiate the equation y=e2xwith respect to x as follows:

y'=2e2x

Further, differentiate the equation y'=2e2xwith respect to as follows:

y"=4e2x

The local truncation error of the function y"=4e2xis as follows:

y"(c)h22=4e2ch22-----(2)

The value of c is defined as follows:

xn<c<xn+1

Now substitute 0 for n in the above equation.

x0<c<x1<0.1

0<cx0=0andx1=0.1

Substitute 0.1 for c and 0.1 for h in equation (2) to obtain the upper bound for the local truncation error.

y"(c)h22=4e2(0.1)(0.1)22y"(c)h22=4e0.20.012y"(c)h22=0.02e0.2y"(c)h22=0.0244

Thus, the upper bound of the local truncation error for the initial value problem y'=2y,y(0)=1is 0.0244.

04

c) The comparison of the error in y1 with obtained error bound in subpart (b).

From subpart (a), the obtained value ofy1is 1.2.

From subpart (b), the considered function for truncation error isy=e2x.

Now substitute 0.1 for x in the equationy=e2xand solve.

y(0.1)=e2(0.1)y(0.1)=e0.2y(0.1)=1.2214

The actual error is calculated by the equation as follows:

actual error=y(0.1)-y1-----(3)

Substitute 1.2214 fory(0.1)and 1.2 fory1in equation (3).

role="math" localid="1664202242322" ActualError=1.2214-1.2ActualError=0.0214

Thus, the actual error of 0.0214 is less than the obtained truncation error of 0.0244 in subpart (b).

05

d) Approximate y(0.1) using two steps and Euler's method.

The initial value problem is given as follows:

y'=2y

The initial value is given asy0=1. This implies thatx0=0andy0=1.

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

f(x,y)=2y

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

The solution to the initial value problem of the formy'=fx,yby the Euler's method is given as follows:

yn+1=yn+hfxn,yn(4)

Substitute 0 for n in equation (4) to obtain the equation ofy1as shown below.

y1=y0+hfx0,y0

Substitute 0 forx0,1fory0and 0.05 for h in the above equation.

y1=1+(0.05)f(0,1)y1=1+(0.05)·(2)y1=1+0.1y1=1.1

Substitute 1 for n in equation (4) to obtain the equation ofy2as shown below.

y2=y1+hfx1,y1

Substitute 0.05 for x1,1.1for y1and 0.05 for h in the above equation.

y2=1.1+(0.05)f(0.05,1.1)y2=1.1+(0.05)·(2(1.1))y2=1.1+0.11y2=1.21

Thus, the approximate value of y(0.1)for initial value problem y'=2y,y(0)=1is 1.21.

06

e) Verify that the global truncation error for Euler's method is  O(h)  by comparing the errors in parts (a) and (d).

From subpart (d), the obtained value ofy1is 1.21.

From subpart (b), the considered function for truncation error isy=e2x.

Now substitute 0.1 for x in the equationy=e2xand solve.

y(0.1)=e2(0.1)y(0.1)=e0.2y(0.1)=1.2214

The actual error is calculated by the equation as follows:

Actual error x=y(0.1)-y1------(5)

Substitute 1.2214 for y(0.1) and 1.21 for y1in equation (5)

Actualerror=1.2214-1.21Actualerror=0.0114

Thus, the actual error in subpart (d) when step size is halved (h = 0.05) is 0.0114. The actual error when the step size (h = 0.1) is 0.0214.

The actual error when h = 0.05 is approximately half of the actual error when h = 0.1.

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

Most popular questions from this chapter

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free