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

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

y'=y-y2,y(0)=0.5;y(0.5)

Short Answer

Expert verified

The four decimal approximation of the indicated value y(0.5)using the RK4 method is 1.333.

Step by step solution

01

Runga-Kutta method

The general formulas used in the given problem are,

k1=hFxn,ynk2=hFxn+h2,yn+k12k3=hFxn+h2,yn+k22k4=hFxn+h,yn+k3

And,

yn+1=yn+16k1+2k2+2k3+k4

02

Determine the First order Runga-Kutta method

The given differential equation can be written as,

y'=F(x,y)F(x,y)=xy2-yx

The given boundary conditions can be written as,

y0=fx0x0=1y0=1h=0.1

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

The value of k1is calculated as,

k1=hFx0,y0=0.1×1×(1)2-11=0.1×(0)=0

The value of k2is calculated as,

k2=hFx0+h2,y0+k12=0.1×F1+0.12,1+02=0.1×F(1.05,1)=0.0098

The value of k3is calculated as,

k3=hFx0+h2,y0+k22=0.1×F1+0.12,1+(0.0098)2=0.1×F(1.05.1.005)=0.0103

The value of k4is calculated as,

k4=hFx0+h,y0+k3=0.1×F(1+0.1,1+0.0103)=0.1×F(1.1,1.0103)=0.0204

Now substitute the value of k1,k2,k3and k4in y1.

y1=y0+16k1+2k2+2k3+k4=1+16(0+(2×0.0098)+(2×0.0103)+0.0204)=1+16×(0+0.0196+0.0206+0.0204)=1.0101

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

x1=x0+h=1+0.1=1.1

Substitute the value of x1,y1and h in the following equations to get the values of k1,k2,k3,k4,

The value of k1is calculated as,

k1=hFx1,y1=0.1×1.1×(1.0101)2-1.01011.1=0.1×(0.2041)=0.0204

The value ofk2is calculated as,

k2=hFx1+h2,y1+k12

=0.1×F1.1+0.12,1.0101+0.02042=0.1×F(1.15,1.0203)=0.0310

The value of k3is calculated as,

k3=hFx1+h2,y1+k22=0.1×F1.1+0.12,1.0101+0.03102=0.1×F(1.15,1.0256)=0.0318

The value of k4is calculated as,

k4=hFx1+h,y1+k3=0.1×F(1.1+0.1,1.0101+0.0318)=0.1×F(1.2,1.0419)=0.0434

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

y2=y1+16k1+2k2+2k3+k4=1.0101+16(0.0204+(2×0.0310)+(2×0.0318)+0.0434)=1.0101+16×(0.0204+0.062+0.0636+0.0434)=1.0417

03

Compute the second order Runga-Kutta method

For n=2, the value ofx2is calculated as,

x2=x1+h=1.1+0.1=1.2

Substitute the value ofx2,y2and h in the following equations to get the values ofk1,k2,k3,k4,

The value ofk1is calculated as,

k1=hFx2,y2=0.1×1.2×(1.0417)2-1.04171.2=0.1×(0.4429)=0.0443

The value ofk2is calculated as,

k2=hFx2+h2,y2+k12=0.1×F1.2+0.12,1.0417+0.04432=0.1×F(1.25,1.069)=0.0574

The value ofk3is calculated as,

k3=hFx2+h2,y2+k22=0.1×F1.2+0.12,1.0417+0.05742=0.1×F(1.25,1.076)=0.0586

The value ofk4is calculated as,

k4=hFx2+h,y2+k3=0.1×F(1.2+0.1,1.0417+0.0586)=0.1×F(1.3,1.106)=0.0738

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

y3=y2+16k1+2k2+2k3+k4=1.0417+16(0.0443+(2×0.0574)+(2×0.0586)+0.0738)=1.0417+16×(0.0443+0.1148+0.1172+0.0738)=1.0989

04

Compute the third order of the Runga-Kutta method

Forn=3, the value ofx3is calculated as,

x3=x2+h=1.2+0.1=1.3

Substitute the value ofx3,y3and h in the following equations to get the values ofk1,k2,k3,k4,

The value ofk1is calculated as,

k1=hFx2,y2=0.1×1.3×(1.0989)2-1.09891.3=0.1×(0.7245)=0.0724

The value ofk2is calculated as,

k2=hFx3+h2,y3+k12=0.1×F1.3+0.12,1.0989+0.07242=0.1×F(1.35,1.1351)=0.0899

The value ofk3is calculated as,

k3=hFx3+h2,y3+k22=0.1×F1.3+0.12,1.0989+0.08992=0.1×F(1.35,1.1438)=0.0919

The value ofk4is calculated as,

k4=hFx3+h,y3+k3=0.1×F(1.3+0.1,1.0989+0.0919)=0.1×F(1.4,1.1908)=0.1135

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

y4=y3+16k1+2k2+2k3+k4=1.0989+16(0.0724+(2×0.0899)+(2×0.0919)+0.1135)=1.0989+16×(0.0724+0.1798+0.1838+0.1135)=1.1905

05

Compute the fourth order of Runga-Kutta method

For n=4, the value ofx4is calculated as,

x4=x3+h=1.3+0.1=1.4

Substitute the value ofx4,y4and h in the following equations to get the values ofk1,k2,k3,k4,

The value ofk1is calculated as,

k1=hFx4,y4=0.1×1.4×(1.1905)2-1.19051.4=0.1×(1.1338)=0.1134

The value ofk2is calculated as,

k2=hFx4+h2,y4+k12=0.1×F1.4+0.12,1.1905+0.11342=0.1×F(1.45,1.2472)=0.1395

The value ofk3is calculated as,

k3=hFx4+h2,y4+k22=0.1×F1.4+0.12,1.1905+0.13952=0.1×F(1.45,1.2602)=0.1434

The value ofk4is calculated as,

k4=hFx4+h,y4+k3=0.1×F(1.4+0.1,1.1905+0.1434)=0.1×F(1.5,1.334)=0.1780

=0.1×F(1.4+0.1,1.1905+0.1434)=0.1×F(1.5,1.334)=0.1780

Now substitute the value ofk1,k2,k3andk4in.y5

y5=y4+16k1+2k2+2k3+k4=1.1905+16(0.1134+(2×0.1395)+(2×0.1434)+0.1780)=1.1905+16×(0.1134+0.279+0.2868+0.1780)=1.3333

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

x5=x4+h=1.4+0.1=1.5

Therefore, the four decimal approximation of the indicated value y(1.5) using the RK4 method is 1.333.

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