Use Runge-Kutta’s method of order two to determine approximate solutions for y(0;1) and y(0;2)
y′ = f(t,y) = ycos(t) y(0) = 2
"t_0=0, y_0=2"
"h=0.1"
"k_1=hf(t_n,y_n)"
"k_2=hf(t_n+{h \\over 2},y_n+{k_1 \\over 2})"
"n=0, t_0=0, y_0=2,"
"f(t_0, y_0)=2, k_1=0.2,"
"k_2=0.1(2+{0.2 \\over 2})\\cos(0+{0.1 \\over 2})=0.21\\cos(0.05)"
"y_1=2+0.21\\cos(0.05)\\approx2.2097"
"f(t_1, y_1)=2.1987, k_1=0.21987,"
"k_2=0.1(2.2097+{0.21987 \\over 2})\\cos(0.1+{0.1 \\over 2})"
"=0.22936"
"y_2=2.2097+0.22936\\approx2.4391"
"..."
Complete the table
Comments
Leave a comment