A computer will be required for the problem. In this Problem, an initial value problem and its exact solution are given. In each of these four problems, use the Runge–Kutta method with step sizes h = 0.1 and h = 0.05 to approximate to five decimal places the values x(1) and y(1). Compare the approximations with the actual values. x'' + x = sin t , x(0) = 0; x(t) = 1/2 (sin t - t cos t)

Advanced Engineering Mathematics
10th Edition
ISBN:9780470458365
Author:Erwin Kreyszig
Publisher:Erwin Kreyszig
Chapter2: Second-order Linear Odes
Section: Chapter Questions
Problem 1RQ
icon
Related questions
Question

A computer will be required for the problem. In this Problem, an initial value problem and its exact solution are given. In each of these four problems, use the Runge–Kutta method with step sizes h = 0.1 and h = 0.05 to approximate to five decimal places the values x(1) and y(1). Compare the approximations with the actual values.

x'' + x = sin t , x(0) = 0;

x(t) = 1/2 (sin t - t cos t)

Expert Solution
Step 1

Given

x''+x=sint, x0=0

and xt=12sint-tcost

and h=0.1

Step 2

Then

x''+x=sintx''=-x+sint

Consider x'=yx''=y'

  y'=-x+sintftn,xn,yn=-xn+sintn            ....1

Step 3

By using the Runge–Kutta method with h = 0.1

First iteration

k1=hy0=0.1×0=0k2=hy0+k12=0.10+02=0k3=hy0+k22=0.10+02=0k4=hy0+k3=0.10+0=0x1=x0+16k1+2k2+2k3+k4=0+160=0andk1=hft0,x0,y0=0.1-x0+sint0=0.1-0+sin0=0k2=hft0+h2,x0+k12,y0+k12=hf0+0.12,0+02,0+02=0.1-0+sin0.12=0.00499k3=hft0+h2,x0+k22,y0+k22=hf0+0.12,0+0.004992,0+0.004992=0.1-0.004992+sin0.12=0.00474k4=hft0+h,x0+k3,y0+k3=hf0+0.1,0+0.00474,0+0.00474=0.1-0.00474+sin0.1=0.00950y1=y0+16k1+2k2+2k3+k4=0+160+2×0.00499+2×0.00474+0.00950=0.00482and  t1=0.1

Second iteration 

k1=hy1=0.1×0.00482=0.000482k2=hy1+k12=0.10.00482+0.0004822=0.0005061k3=hy1+k22=0.10.00482+0.00050612=0.000507305k4=hy1+k3=0.10.00482+0.000507305=0.0005327305x2=x1+16k1+2k2+2k3+k4=0+160.000482+20.0005061+20.000507305+0.0005327305==0.00051

and

k1=hft1,x1,y1=0.1-x1+sint1=0.1-0+sin0.1=0.00998k2=hft1+h2,x1+k12,y1+k12=hf0.1+0.12,0+0.009982,0.00482+0.009982=0.1-0.009982+sin0.1+0.12=0.01444k3=hft1+h2,x1+k22,y1+k22=hf0.1+0.12,0+0.014442,0.00482+0.014442=0.1-0.014442+sin0.1+0.12=0.01422k4=hft1+h,x1+k3,y1+k3=hf0.1+0.1,0+0.01422,0.00482+0.01422=0.1-0.01422+sin0.2=0.01844y2=y1+16k1+2k2+2k3+k4=0.00482+160.00998+2×0.01444+2×0.01422+0.01844=0.01911

and  t2=0.2

Step 4

Third Iteration

k1=hy2=0.1×0.01911=0.001911k2=0.10.01911+0.0019112=0.00201k3=0.10.01911+0.002006552=0.00201k4=0.10.01911+0.0020113275=0.00211x3=0.00051+160.001911+20.00201+20.00201+0.00211=0.00252

and

k1=hft2,x2,y2=0.1-x2+sint2=0.1-0.00051+sin0.2=0.01981k2=hf0.2+0.12,0.00051+0.019812,0.01911+0.019812=0.1-0.00051+0.019812+sin0.2+0.12=0.02369k3=hf0.2+0.12,0.00051+0.023692,0.01911+0.023692=0.1-0.00051+0.023692+sin0.2+0.12=0.02350k4=hf0.2+0.1,0.00051+0.02350,0.01911+0.02350=0.1-0.00051+0.02350+sin0.2+0.1=0.02715y3=y2+16k1+2k2+2k3+k4=0.01911+160.01981+2×0.02369+2×0.02350+0.02715=0.04266

and  t3=0.3

Fourth iteration

k1=hy3=0.1×0.04266=0.004266k2=0.10.04266+0.0042662=0.00448k3=0.10.04266+0.004482=0.00449k4=0.10.04266+0.00449=0.004715x4=0.00252+160.004266+20.00448+20.00449+0.004715=0.00701

and

k1=hft3,x3,y3=0.1-x3+sint3=0.1-0.00252+sin0.3=0.02930k2=hf0.3+0.12,0.00252+0.029302,0.04266+0.029302=0.1-0.00252+0.029302+sin0.3+0.12=0.03257k3=hf0.3+0.12,0.00252+0.032572,0.04266+0.032572=0.1-0.00252+0.032572+sin0.3+0.12=0.03241k4=hf0.3+0.1,0.00252+0.03241,0.04266+0.03241=0.1-0.00252+0.03241+sin0.3+0.1=0.03544y4=y3+16k1+2k2+2k3+k4=0.04266+160.02930+2×0.03257+2×0.03241+0.03544=0.07511

and t4=0.4

steps

Step by step

Solved in 8 steps

Blurred answer
Knowledge Booster
Differential Equation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Advanced Engineering Mathematics
Advanced Engineering Mathematics
Advanced Math
ISBN:
9780470458365
Author:
Erwin Kreyszig
Publisher:
Wiley, John & Sons, Incorporated
Numerical Methods for Engineers
Numerical Methods for Engineers
Advanced Math
ISBN:
9780073397924
Author:
Steven C. Chapra Dr., Raymond P. Canale
Publisher:
McGraw-Hill Education
Introductory Mathematics for Engineering Applicat…
Introductory Mathematics for Engineering Applicat…
Advanced Math
ISBN:
9781118141809
Author:
Nathan Klingbeil
Publisher:
WILEY
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,
Basic Technical Mathematics
Basic Technical Mathematics
Advanced Math
ISBN:
9780134437705
Author:
Washington
Publisher:
PEARSON
Topology
Topology
Advanced Math
ISBN:
9780134689517
Author:
Munkres, James R.
Publisher:
Pearson,