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'=xy+y,y(0)=1;y(0.5)

Short Answer

Expert verified

The four decimal approximation of the indicated valuey0.5using the RK4 method is 1.7561

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)=xy+y

The given boundary conditions can be written as,

y0=fx0x0=0h=0.1y0=1

For n=0,

Substitute the value ofx0,y0and h in the following equations to get the values ofk1,k2,k3,k4,

get the values ofk1,k2,k3,k4,

k1=hFx0,y0=0.1×((0×1)+(1))=0.1×(1)=0.1

The value ofk2is calculated as,

k2=hFx0+h2,y0+k12=0.1×F0+0.12,1+0.12=0.1×F(0.05,1.05)=0.108

The value ofk3is calculated as,

k3=hFx0+h2,y0+k22=0.1×F0+0.12,1+0.107722=0.1×F(0.05,1.05386)=0.10793

The value ofk4is calculated as,

k4=hFx0+h,y0+k3=0.1×F(0+0.1,1+0.10793)=0.1×F(0.1,1.108)=0.1164

Now substitute the value ofk1,k2,k3andk4iny1.

y1=y0+16k1+2k2+2k3+k4=1+16(0.1+2(0.108)+2(0.10793)+(0.1164))=1+16×(0.1+0.116+0.221586+0.1164)=1.1079

For n=1, the value ofx1is calculated as,x1=x0+h=0+0.1=0.1

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

k1=hFx1,y1=0.1×((0.1)(1.1079)+(1.1079))=0.1×(0.1000)=0.11634

The value ofk2is calculated as,

k2=hFx1+h2,y1+k12=0.1×F0.1+0.12,1.1079+(0.11634)2=0.1×F(0.15,1.6896)=0.15533

The value ofk3is calculated as,

k3=hFx1+h2,y1+k22=0.1×F0.1+0.12,1.1079+(0.15533)2=0.1×F(0.15,1.88454)=0.1655465

The value ofk4is calculated as,

k4=hFx1+h,y1+k3=0.1×F(0.1+0.1,1.1079+(0.1655465))=0.1×F(0.2,1.27345)=0.138316

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

y2=y1+16k1+2k2+2k3+k4=1.1079+16((0.11634)+2(0.15533)+2(0.1655465)+(0.138316))=1.2337

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

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

The value ofk1is calculated as

k1=hFx2,y2=0.1×((0.2)(1.2337)+(1.2337))=0.1×(1.35746)=0.135746

The value ofk2is calculated as,

k2=hFx2+h2,y2+k12=0.1×F0.2+0.12,1.2337+(0.135746)2=0.1×F(0.25,1.91243)

=0.1861

The value ofk3is calculated as,

k3=hFx2+h2,y2+k22=0.1×F0.2+0.12,1.2337+(0.1861)2=0.1×F(0.25,1.32675)=0.148354

The value ofk4is calculated as,

k4=hFx2+h,y2+k3=0.1×F(0.2+0.1,1.2337+(0.148354))=0.1×F(0.3,1.3821)=0.1591

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

y3=y2+16k1+2k2+2k3+k4=1.2337+16((0.135746)+2(0.1861)+2(0.148354)+(0.1591))=1.2337+16((0.135746)+2(0.1861)+2(0.148354)+(0.1591))=1.3807

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 h in the following equations, to get the values of k1,k2,k3,k4,

The value of k1is calculated as,

k1=hFx3,y3=0.1×((0.3)(1.3807)+(1.3807))=0.1×(1.595026)=0.1595026

The value of k2is calculated as,

k2=hFx3+h2,y3+k12=0.1×F0.3+0.12,1.3807+(0.1595026)2=0.1×F(0.35,1.4605)=0.171965

The value of k3is calculated as,

k3=hFx3+h2,y3+k22=0.1×F0.3+0.12,1.3807+(0.171965)2=0.1×F(0.35,1.4669)=0.17245

The value of k4is calculated as,

k4=hFx3+h,y3+k3=0.1×F(0.3+0.1,1.3807+(0.17245))=0.1×F(0.4,1.55315)=0.18675

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

y4=y3+16k1+2k2+2k3+k4=1.3807+16((0.1595026)+2(0.171965)+2(0.17245)+(0.18675))=1.3807+16×(0.0302+0.07073+0.0708+0.04065)=1.5531

05

Compute the fourth order of the Runga-Kutta method

For n=4, the value of x4is calculated as,x4=x3+h=0.3+0.1=0.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×((0.4)(1.5531)+(1.5531))=0.1×(1.867474)=0.1867474

The value ofk2is calculated as,

k2=hFx4+h2,y4+k12=0.1×F0.4+0.12,1.5531+(0.1867474)2=0.1×F(0.45,1.6464737)=0.20241

The value ofk3is calculated as,

k3=hFx4+h2,y4+k22=0.1×F0.4+0.12,1.5531+(0.20241)2=0.1×F(0.45,1.654305)=0.203064

The value ofk4is calculated as,

k4=hFx4+h,y4+k3=0.1×F(0.4+0.1,1.5531+(0.203064))=0.1×F(0.5,1.756164)=0.22033

Now substitute the value ofk1,k2,k3andk4iny5.

y5=y4+16k1+2k2+2k3+k4=1.5531+16((0.1867474)+2(0.20241)+2(0.203064)+(0.22033))=1.5531+16×(0.1867474+0.40482+0.406128+0.22033)=1.7561

Forn=5, the 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 1.7561

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

Repeat Problem 19 using the improved Euler's method, which has a global truncation error O(h2). See Problem 5. You might need to keep more than four decimal places to see the effect of reducing the order of error.

In Problems 1-10 use the finite difference method and the indicated value of n to approximate the solution of the given boundary-value problem.

y"y=x2,      y(0)=0,      y(1)=0;     n=4

Consider the boundary-value problem y"+xy=0,y(0)=1,y(1)=-1.

(a) Find the difference equation corresponding to the differential equation. Show that fori=0,1,2,...,n-1 , the difference equation yields equations in n+1unknowsy-1,y0,y1,y2,...,yn-1 . Herey-1 and y0are unknowns, since y-1represents an approximationy to at the exterior pointx=-h and y0is not specified atx=0 .

(b) Use the central difference approximation (5) to show thaty1-y-1=2h . Use this equation to eliminatey-1 from the system in part (a).

(c) Use n=5and the system of equations found in parts (a) and (b) to approximate the solution of the original boundary-value problem.

Construct a table comparing the indicated values y(x)of using Euler's method, the improved Euler's method, and the RK4 method. Compute to four rounded decimal places. First use h=0.1and then use h=0.05.

y=2Inxy,y(1)=2;y(1.1),y(1.2),y(1.3),y(1.4),y(1.5)

In Problems \(5 - 8\)use the Adams-Bashforth-Moulton method to approximate \(y(1.0)\), where \(y(x)\) is the solution of the given initial-value problem. First use \(h = 0.2\)and then use \(h = 0.1\).Use the \(RK4\) method to compute \({y_1},{y_2}\)and \({y_3}\).

\(y' = y + \cos x,y(0) = 1\).

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