Q5.3-16E

Question

In Problems 14–24, you will need a computer and a programmed version of the vectorized classical fourth-order Runge–Kutta algorithm. (At the instructor’s discretion, other algorithms may be used.)†

Using the vectorized Runge–Kutta algorithm for systems with h=0.175, approximate the solution to the initial value problem x'=2x-y;x(0)=0,y'=3x+6y;y(0)=-2 at t=1

Compare this approximation to the actual solution.

Step-by-Step Solution

Verified
Answer

The solution is y1=-423.48 and x1=127.77.

1Transform the equation

Write the equation as x'=2x-y and y'=3x+6y

 

The transformation of the equation is:

x'1t=x2tx1t=ytx2t=2x-x1x'2t=y'(tx'2t=3x+6x1t


The initial conditions are:

x(0)=0y(1)=-2


2Apply Runge –Kutta method

For the solution, apply the Runge-Kutta method in MATLAB, and the solution is y1=-423.48 and x1=127.77.

3Compare this approximation to the actual solution x ( t ) = e 5 t - e 3 t , y ( t ) = e 3 t - 3 e 5 t

By putting the value of t=1

x1=e5-e3=128.32y1=e3-3e5=-425.15

 

Therefore, the approximation solution is x1=128.32 and y1=-425.15.