Assignment#4
Assignment#4
Assignment#4
1. Solve the following ODE from t=0 to 2 by (a) Euler with h =0.5 and 0.25, ii) With h=0.5
Heun’s method with h=0.5, iii) 4th order RK method with h=0.5 and 0.25. Euler: 0.1135
Heun: 1.884
RK4=2.513
dy
yt 3 1.5 y
dt
y(0)=1;
2. Solve the following second order differential equation by 2nd order RK (Ralston): Convert the
2 second order
d y
t y 0 ODE to two first
dt 2 order ODES.
Where, y0 4; y0 0 at x=4
y=45.615
Take h=0.1 and solve for x=0 to 4. Plot y versus x. Plot y versus x. dy/dt=
-6.2211
Use finer time step of 0.02s upto 0.5 secs and then coarser time step of 0.05s upto
5 seconds. Plot concentration and temperature Vs time, using separate scale for
temperature and concentration.
Calculate evolution of phases with time 2nd order RK (mid-point method) and
plot the evolution of H,M,W,F.C with time. Take time step =0.5 s and calculate
for 50 secs.