Question

In: Computer Science

develop a vba computer code to solve the initial value first ODE:dy/dt =(4y)/t with the initial...

develop a vba computer code to solve the initial value first ODE:dy/dt =(4y)/t with the initial condition of y (1)=2 with a time step of 0.05 for the time interval 1 <=t<= 2 for the euler method,2nd order runge-kutta method and the 4th order runge-kutta method

Solutions

Expert Solution

Given DE =

The eulers formula is given by

the initial value t0 and y0 are given as 1 and 2 respectively.

Using Excel sheet solving for t.

The modified Eulers method also known as Runge Kutta method of second order.

The formula is given by

where

Now using Runge Kutta method of fourth order we have

Where

Where , ,  ,  .

Since =0.05 the step size is small the accuracy increases.

Using Excel spread sheets computing the values by all the three methods.


Related Solutions

Solve listed initial value problems by using the Laplace Transform: 3.      yll + 4y = t −...
Solve listed initial value problems by using the Laplace Transform: 3.      yll + 4y = t − 1,    y(0) = 1, yl(0) = −1
Solve the initial value problem: Y''-4y'+4y=f(t) y(0)=-2, y'(0)=1 where f(t) { t if 0<=t<3 , t+2...
Solve the initial value problem: Y''-4y'+4y=f(t) y(0)=-2, y'(0)=1 where f(t) { t if 0<=t<3 , t+2 if t>=3 }
Solve the following initial value problems (1) dy/dt = t + y y(0) = 1 so...
Solve the following initial value problems (1) dy/dt = t + y y(0) = 1 so y(t) = (2)  dy/dt = ty y(0) = 1 so y(t) =
Solve the given initial value problem by undetermined coefficients (annihilator approach). y'' − 4y' + 4y...
Solve the given initial value problem by undetermined coefficients (annihilator approach). y'' − 4y' + 4y = e^4x + xe^−2x y(0) = 1 y'(0) = −1
solve the first order equation with initial value y’ +3/4y = x^6,; y(1) =2
solve the first order equation with initial value y’ +3/4y = x^6,; y(1) =2
Solve the initial value problem: y'' + 4y' + 4y = 0; y(0) = 1, y'(0)...
Solve the initial value problem: y'' + 4y' + 4y = 0; y(0) = 1, y'(0) = 0. Solve without the Laplace Transform, first, and then with the Laplace Transform.
You are required to develop a computer code that that can solve systems of ODE. The...
You are required to develop a computer code that that can solve systems of ODE. The code should request the user to choose one of the following methods for solving the system: ? Euler ? 4th Order Runge Kutta  
Solve the given initial-value problem. dx/dt = y − 1 dy/dt = −6x + 2y x(0)...
Solve the given initial-value problem. dx/dt = y − 1 dy/dt = −6x + 2y x(0) = 0, y(0) = 0
Take the Laplace transform of the following initial value and solve for Y(s)=L{y(t)}: y′′+4y={sin(πt) ,0, 0≤t<11≤t...
Take the Laplace transform of the following initial value and solve for Y(s)=L{y(t)}: y′′+4y={sin(πt) ,0, 0≤t<11≤t y(0)=0,y′(0)=0 Y(s)= ?    Hint: write the right hand side in terms of the Heaviside function. Now find the inverse transform to find y(t). Use step(t-c) for the Heaviside function u(t−c) . y(t)= ?
Solve the initial value problem below using the method of Laplace transforms. y'' - 4y' +...
Solve the initial value problem below using the method of Laplace transforms. y'' - 4y' + 8y = 5e^t y(0) = 1 y'(0) = 3
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT