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

Question: In Problems 3-12 use the RK4 method withh=0.1to obtain a four decimal approximation of the indicated value.

y'=(x-y)2,y(0)=0;y(0.5)

Short Answer

Expert verified

Therefore, the four decimal approximation of the indicated value y0.5using the RK4 method is 0.5493

Step by step solution

01

Runga-Kutta method

The general formulas used in the given problem are,

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

And,

yn+1=yn+h6k1+k2+k3+k4

02

Determine the First order Runga-Kutta method

The given differential equation can be written as,

y=Fx,yF(x,y)=(x-y)2

The given boundary conditions can be written as,

y0=x0x0=0y0=0.5h=0.1

For n=0, substitute the value of x0,y0and hin the following equations to get the values of k1,k2,k3,k4.

The value ofk1is calculated as,

k1=hF(x0,y0)=0.1×0-0.52=0.1×0.25=0.025

The value of k2is calculated as,

k2=hF(x0+h2,y0+k1)=0.1×F0+0.12,0.5+0.0252=0.1×F0.05,0.5125=0.0212

The value of k3is calculated as,

k3=hF(x0+h2,y0+k22)=0.1×F0+0.12,0.5+0.02132=0.1×F0.05,0.5106=0.0212

The value of k4is calculated as,

k4=hFx0+h,y0+k3=0.1×F0+0.1,0.5+0.0212=0.1×F0.1,0.5212=0.0177

Now substitute the k1,k2,k3,k4value of and in y1.

y1=y0+16k1+2k2+2k3+k4=0.5+160.025+20.0213+20.0212+0.0177=0.5210

For n=1, the value of x1is calculated as,

x1=x0+h=0+0.1=0.1

Substitute the value of x1y1and hin the following equations to get the values of k1,k2,k3,k4.

The value of k1is calculated as,

k1=hF(x1,y1)=0.1×0.1-0.52102=0.1×0.1775=0.0177

The value of k2is calculated as,

role="math" localid="1668428323941" k2=hF(x1+h2,y1+k12)=0.1×F0.1+0.12,0.5210+0.01772=0.1×F0.15,0.5299=0.0144

The value of k3is calculated as,

k3=hF(x1+h2,y1+k22)=0.1×F0.1+0.12,0.5210+0.01442=0.1×F0.15,0.5282=0.0143

The value of k4is calculated as,

k4=hFx1+h,y1+k3=0.1×F0.1+0.1,0.5210+0.0143=0.1×F0.2,0.5353=0.0112

Now substitute the value ofk1,k2,k3,k4 in y2.

y2=y1+16k1+2k2+2k3+k4=0.5210+160.0177+20.0144+20.0143+0.0200=0.5368

03

Compute the second order Runga-Kutta method

For n=2, the value of x2is calculated as,

x2=x1+h=0.1+0.1=0.2

Substitute the value of x2,y2and hin the following equations to get the values of k1,k2,k3,k4

The value of k1is calculated as,

k1=hF(x2,y2)=0.1×0.2-0.53682=0.1×0.1135=0.0113

The value of k2is calculated as

k2=hF(x2+h2,y2+k12)=0.1×F0.2+0.12,0.5368+0.01132=0.1×F0.25,0.5415=0.0085

The value of k3is calculated as,

k3=hF(x2+h2,y2+k22)=0.1×F0.2+0.12,0.5368+0.00852=0.1×F0.25,0.5410=0.0085

The value of k4is calculated as,

k4=hFx2+h,y2+k3=0.1×F0.2+0.1,0.5368+0.0085=0.1×F0.3,0.5453=0.0060

Now substitute the value of k1,k2,k3,k4in y3.

y3=y2+16k1+2k2+2k3+k4=0.5368+160.0113+20.0085+20.0085+0.0060=0.5443

04

Compute the third order of Runga-Kutta method

For n=3, the value of x3is calculated as,

x3=x2+h=0.2+0.1=0.3

Substitute the value of x3,y3and hin the following equations to get the values of k1,k2,k3,k4,

The value of k1is calculated as,

k1=hF(x3,y3)=0.1×0.3-0.54432=0.1×0.0597=0.0059

The value of k2is calculated as,

k2=hF(x3+h2,y3+k12)=0.1×F0.3+0.12,0.5443+0.00592=0.1×F0.35,0.5473=0.0039

The value of k3is calculated as,

role="math" localid="1668430349021" k3=hF(x3+h2,y3+k22)=0.1×F0.3+0.12,0.5443+0.00392=0.1×F0.35,0.5473=0.0039

The value of k4is calculated as,

k4=hFx3+h,y3+k3=0.1×F0.3+0.1,0.5368+0.0039=0.1×F0.4,0.5481=0.0022

Now substitute the value of k1,k2,k3,k4in y4.

y4=y3+16k1+2k2+2k3+k4=0.5443+160.0059+20.0039+20.0039+0.0022=0.5482

05

Compute the fourth order of Runga-Kutta method

For n=4, the value of x4s calculated as,

x4=x3+h=0.3+0.1=0.4

Substitute the value of x4,y4and hin the following equations to get the values of k1,k2,k3,k4,

The value of k1is calculated as,

k1=hF(x4,y4)=0.1×0.4-0.54822=0.1×0.0219=0.0022

The value of k2is calculated as,

k2=hF(x4+h2,y4+k12)=0.1×F0.4+0.12,0.5482+0.00222=0.1×F0.45,0.5493=0.00099

The value of k3is calculated as,

k3=hF(x4+h2,y4+k22)=0.1×F0.4+0.12,0.5482+0.000992=0.1×F0.45,0.5487=0.00099

The value of k4is calculated as,

k4=hFx3+h,y3+k3=0.1×F0.4+0.1,0.5482+0.00099=0.1×F0.5,0.5492=0.00024

Now substitute the value of k1,k2,k3,k4in y5.

y5=y4+16k1+2k2+2k3+k4=0.5482+160.3037+20.00099+20.00099+0.00024=0.5493

For n=5, the value of x5is calculated as,

x5=x4+h=0.4+0.1=0.5

Therefore, the four decimal approximation of the indicated value using the RK4 method is 0.5493

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