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

Use the RK4 method withh=0.1to approximatey(0.5), wherey(x)is the solution of the initial-value problemy'=(x+y-1)2,y(0)=2. Compare this approximate value with the actual value obtained in Problem 11 in Exercises 9.1.

Short Answer

Expert verified

The approximated and actual value of y(0.5)for step size h=0.1is 3.9078 and 3.9082, respectively.

Step by step solution

01

Runga-Kutta method

The solution of a linear differential equation of the form y'=f(x,y) is given as follows: yn+1=yn+h6k1+2k2+2k3+k4, here

k1=fxn,ynk2=fxn+h2,yn+hk12k3=fxn+h2,yn+hk22k4=fxn+h,yn+hk3

The linear differential equation is given as follows:

y'=(x+y-1)2

It is given that for the Runga-Kutta method of the fourth order, the value of h is 0.1

As per the Runga-Kutta method of the fourth order, the value of yn+1is given as follows:

yn+1=yn+16k1+2k2+2k3+k4... (1)

Here, the value of k1,k2,k3and k4is given as follows:

k1=fxn,ynk2=fxn+h2,yn+hk12k3=fxn+h2,yn+hk22k4=fxn+h,yn+hk3

The differential equation y'=(x+y-1)2is of the form y'=f(x,y).

This implies that f(x,y)=(x+y-1)2.

It is given that the initial value isy(0)=2.

So, the value of x0is 0 and the value of y0is 2.

To calculate the value of y1substitute n=0in equation (1).

y1=y0+h6k1+2k2+2k3+k4...(2)

02

Calculate the value of k1,k2,k3 and k4.

Calculate the value of k,k2,k3and k4as follows:

k1=fx0,y0=(0+2-1)2=(1)2=1

Therefore, the value of k1is 1

k2=fx0+0.12,y0+(0.1)(1)2=f((0.05),(2.05))=(0.05+2.05-1)2=1.21

Therefore, the value of k2is 1.21.

k3=fx0+0.12,y0+(1.21)·(0.1)2=f((0.05),(2.0605))=(0.05+2.0605-1)2=1.23321

Therefore, the value of k4is 1.23321.

k4=fx0+0.1,y0+(0.1)(1.23321)=f((0.1),(2.123321))=(0.1+2.123321-1)2=1.496514

Substitute the value of k1,k2,k3andk4in equation (2).

y1=2+0.16(1+2·(1.21)+2·(1.23321)+1.496514)=2+0.16(7.382934)=2+0.1230489=2.1230489

Therefore, the value of y1is 2.1230489.

03

Obtain the exact solution of the differential equation

Now, to obtain the exact solution of the differential equation y'=(x+y-1)2, assume 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.

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

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

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

Substitute the initial value y(0)=2in the above equation to solve for integration constant c.

2=1-0+tan(0+c)2-1=tanc

tanc=1c=0.7854

Hence, the solution of the given differential equation is obtained, as shown below.

y=1-x+tan(x+0.7854)

Substitute 0.1 for x to obtain the actual value of y(0.10).

y=1-x+tan(x+0.7854)=1-0.1+tan(0.1+0.7854)=0.9+1.2230=2.1230

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

Similarly, calculate the actual and approximated value of y(0.2),y(0.3),y(0.4)and y(0.5)as shown in Table 1.

The approximated and actual value of y(0.5) for step size h=0.1is 3.9078¯and 3.9082¯respectively.

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