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 withto obtain a four decimal approximation of the indicated value.

y'=x+y2,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.1266

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,yFx,y=x+y2

The given boundary conditions can be written as,

y0=fx0x0=0y0=0h=0.1

For,

Substitute the value of x0,y0and hin the following equations to get the values of k1,k2,k3,k4,

The value of k1is calculated as,

k1=hFx0,y0=0.10+02=0.1×0=0

The value of k2is calculated as,

k2=hF(x0+h2,y0+k1)=0.1×F0+0.12,0+02=0.1×F0.05,0=0.005

The value of k3is calculated as,

k3=hF(x0+h2,y0+k22)=0.1×F0+0.12,0+0.0052=0.1×F0.05,0.0025=0.0050

The value of k4is calculated as,

k4=hFx0+h,y0+k3=0.1×F0+0.1,0+0.0050=0.1×F0.1,0.0050=0.0100

Now substitute the value of k1,k2,k3,k4 in y1.

y1=y0+16k1+2k2+2k3+k4=0+160+20.005+20.0050+0.0100=0.0050

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,

localid="1668412846573" k1=hFx1,y1=0.10.1+0.0052=0.1×0.1000=0.0100

The value of k2is calculated as,

localid="1668412877343" k2=hF(x1+h2,y1+k12)=0.1×F0.1+0.12,0.005+0.01002=0.1×F0.15,0.0100=0.0150

The value of k3is calculated as,

localid="1668412859255" k3=hF(x1+h2,y1+k22)=0.1×F0.1+0.12,0.005+0.01502=0.1×F0.15,0.01252=0.01502

The value of k4is calculated as,

k4=hFx1+h,y1+k3=0.1×F0.1+0.1,0.005+0.01502=0.1×F0.2,0.0201=0.0201

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

y2=y1+16k1+2k2+2k3+k4=0.005+160.01502+20.01502+20.001502+0.0201=0.020

03

Compute the second order Runga-Kutta method

Forn=2, the value ofx2is calculated as,

x2=x1+h=0.1+0.1=0.2

Substitute the value ofx2,y2andhin the following equations to get the values ofk1,k2,k3,k4,

The value ofis calculated as

k1=hFx2,y2=0.10.2+0.0202=0.1×0.1001=0.0201

The value ofis calculated as,

k2=hF(x2+h2,y2+k12)=0.1×F0.2+0.12,0.020+0.02012=0.1×F0.25,0.03002=0.0251

The value ofis calculated as,

k3=hF(x2+h2,y2+k22)=0.1×F0.2+0.12,0.020+0.02512=0.1×F0.25,0.1455=0.02712

The value ofis calculated as,

k4=hFx2+h,y2+k3=0.1×F0.2+0.1,0.020+0.02712=0.1×F0.3,0.04712=0.03023

Now substitute the value ofk1,k2,k3,k4andiny3.

y2=y1+16k1+2k2+2k3+k4=0.020+160.0201+20.0251+20.02712+0.03023=0.045

04

Compute the third order of Runga-Kutta method

Forn=3, the value ofX3is calculated as,

x3=x2+h=0.2+0.1=0.3

Substitute the value ofx3,y3andhin the following equations to get the values ofk1,k2,k3,k4

The value ofis calculated as,

role="math" localid="1668420211863" k1=hFx3,y3=0.10.3+0.04512=0.1×0.1001=0.0302

The value ofis calculated as,

role="math" localid="1668420199805" k2=hF(x3+h2,y3+k12)=0.1×F0.3+0.12,0.0451+0.03022=0.1×F0.35,0.0602=0.0354

The value ofis calculated as,

role="math" localid="1668420229196" k3=hF(x3+h2,y3+k22)=0.1×F0.3+0.12,0.0451+0.03542=0.1×F0.35,0.0628=0.0354

The value ofis calculated as,

role="math" localid="1668420243644" k4=hFx3+h,y3+k3=0.1×F0.3+0.1,0.0451+0.0354=0.1×F0.4,0.0805=0.04065

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

role="math" localid="1668420352363" y4=y3+16k1+2k2+2k3+k4=0.0451+160.0302+20.0354+20.0354+0.04065=0.08050

05

Compute the fourth order of Runga-Kutta method

For n=4,the value of x4is 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=hFx3,y3=0.10.4+0.080502=0.1×0.4064=0.04065

The value ofk2is calculated as,

k2=hF(x4+h2,y4+k12)=0.1×F0.4+0.12,0.0805+0.040652=0.1×F0.35,0.10083=0.04602

The value ofk3is calculated as,

k3=hF(x4+h2,y4+k22)=0.1×F0.4+0.12,0.0805+0.046022=0.1×F0.35,0.10351=0.0461

The value ofk4is calculated as,

k4=hFx3+h,y3+k3=0.1×F0.4+0.1,0.0805+0.0461=0.1×F0.5,0.1266=0.052

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

y5=y4+16k1+2k2+2k3+k4=0.0805+160.04605+20.04602+20.0461+0.052=0.1266

Forn=5the value ofx5is calculated as,

x5=x4+h=0.4+0.1=0.5

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

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