In: Computer Science
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
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.