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 and 4 repeat the indicated problem using the RK4 method. First use h=0.2 and then use h=0.1 .

Approximatey(1.2) , wherey(x) is the solution of the given initial-value problem.

.x2y''2xy'+2y=0,y(1)=4,y'(1)=9

Find the analytic solution of the problem and compare the actual value of y (1.2) with y2.

Short Answer

Expert verified

The solution of the problem calculated using RK4 method is and the approximated value for y(0.2) is y2=6.00 when h=0.1 and 6.00 when h=0.2.

Step by step solution

01

Define RK4 Method

To cancel out lower-order error terms, the RK4 technique of integrating differential equations uses a trial step at the middle of an interval. When paired with a clever adaptive step-size procedure, this method is relatively simple and resilient, making it an excellent general option for solving differential equations. The formula used in this method is,

yn+1=yn+16k1+13k2+13k3+16k4+Oh5

02

Find the first order differential equations.

We have the second order of differential equation,

x2y''2xy'+2y=0(1)

with initial conditions

y(1)=4,y'(1)=9

and we have to approximate y(1.2)using RK4 method as the following technique.

First we have to assume that,

y'=u(a)

Then differentiate with respect to we have the following

y''=u'(b)

Substitute (a),(b) in equation (1).

x2u'2xu+2y=0(c)

Then from (a), (c) we can have the system of first order differential equations.

y'=f(x,u,y)=uu'=g(x,u,y)=2xu2x2y

Hence the first order differential equations are

u'=g(x,u,y)=2xu2x2y,y'=f(x,u,y)=u

03

Find the value of y1,u1 for h=0.2

Using RK4 method using the step h=0.2along with the conditions

x0,y0=(1,4),x0,u0=(1,9)we can have,

Find the approximate values using the formula,

yn+1=yn+h6k1+2k2+2k3+k4(1a)un+1=un+h6m1+2m2+2m3+m4(2a)

We have to find the constants k1,k2,k3,k4and m1,m2,m3,m4at n=0,h=0.2.

Since we have u0=9,y0=4we get,

k1=fx0,u0,y0=u0=9m1=gx0,u0,y0=2x0u02x2y0=21×9212×4=188=10

k2=fx0+12h,u0+12hm1,y0+12hk1=u0+12hm1=9+12×0.2×10=9+1=10

m2=gx0+12h,u0+12hm1,y0+12hk1=2x0+12hu0+12hm12x0+12h2y0+12hk1=21+12×0.29+12×0.2×1021+12×0.224+12×0.2×9=21.1(10)2(1.1)2(4.9)=18.181828.09917=10.0826

k3=fx0+12h,u0+12hm2,y0+12hk2=u0+12hm2=9+12×0.2×10.0826=9+1.00826=10.00826

m3=gx0+12h,u0+12hm2,y0+12hk2=2x0+12hu0+12hm22x0+12h2y0+12hk2=21+12×0.29+12×0.2×10.082621+12×0.224+12×0.2×10=21.1(10.00826)2(1.1)2(5)=18.196848.26446=9.9324

k4=fx0+h,u0+hm3,y0+hk3=u0+hm3=9+0.2×9.9324=9+1.9865=10.9865

m4=gx0+h,u0+hm3,y0+hk3=2x0+hu0+hm32x0+h2y0+hk3=21+0.2(9+0.2×9.9324)2(1+0.2)2(4+0.2×10.00826)=21.2(10.9865)2(1.2)2(6.001652)=18.310810.00275=8.308

After that when n=0 , substitute the value of constants

y1=y0+h6k1+2k2+2k3+k4=4+0.26[9+2(10)+2(10.00826)+10.9865]=4+0.26×(60.00112)=4+2.00=6

and

u1=u0+h6m1+2m2+2m3+m4=9+0.26[10+2(10.0826)+2(9.9324)+8.308]=9+0.26×(58.338)=9+1.9446=10.9446

04

Find the values of y2  for h=0.1

k1=fx0,u0,y0=u0=9m1=gx0,u0,y0=2x0u02x2y0=21×9212×4=188=10

k2=fx0+12h,u0+12hm1,y0+12hk1=u0+12hm1=9+12×0.1×10=9+0.5=9.5

m2=gx0+12h,u0+12hm1,y0+12hk1=2x0+12hu0+12hm12x0+12h2y0+12hk1=21+12×0.19+12×0.1×1021+12×0.124+12×0.1×9=21.05(9.5)2(1.05)2(4.45)=18.095248.07256=10.02268

k3=fx0+12h,u0+12hm2,y0+12hk2=u0+12hm2=9+12×0.1×10.02268=9+0.71=9.50113

m3=gx0+12h,u0+12hm2,y0+12hk2=2x0+12hu0+12hm22x0+12h2y0+12hk2=21+12×0.19+12×0.1×10.0226821+12×0.124+12×0.1×9.5=21.05(9.50113)2(1.05)2(4.475)=18.097408.11791=9.97949

k4=fx0+h,u0+hm2,y0+hk2=u0+hm3=9+0.1×9.97749=9+0.99775=9.99775

m4=gx0+h,u0+hm3,y0+hk3=2x0+hu0+hm32x0+h2y0+hk3=21+0.1(9+0.1×9.99775)2(1+0.1)2(4+0.1×9.97949)=21.1(9.99977)2(1.1)2(4.99795)=18.181418.26107=9.92034

y1=y0+h6k1+2k2+2k3+k4=4+0.16[9+2(9.5)+2(9.50113)+9.99775]=4+0.16×(57.00)=4+0.95=4.95

u1=u0+h6m1+2m2+2m3+m4=9+0.16[10+2(10.02268)+2(9.97949)+9.92034]=9+0.16×(59.9247)=9+0.9987=9.9987

After that we can find the value of x and u using other constants as shown in the table below. Then we get the value of y2=6.00.

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