Solving $\ddot\Theta = -9.81\sin{\Theta},\ \ \Theta(0)=\frac{\pi}{4}, \ \ \dot{\Theta}(0) = 0.$ with RK method

101 Views Asked by At

Given the Heun's RK method $$k_1 = f(t_n, y_n),$$ $$k_2 = f(t_n+h,y_n +k_1h),$$ $$y_{n+1} = y_n + \frac{h}{2}(k_1 + k_2)$$ I'm asked to "perform one RK step for the following equation" $$\ddot\Theta = -9.81\sin{\Theta},\ \ \Theta(0)=\frac{\pi}{4}, \ \ \dot{\Theta}(0) = 0.$$

I'm not really sure how to how to do this. I attempt to rewrite the system to $$\dot{x_1} = x_2$$ $$\dot{x_2} = -9.81\sin{x_1}$$ by assigning $x_1 = \Theta, \ \ x_2 = \dot{\Theta}.$ Is this the right approach, if so how do I go from here?

1

There are 1 best solutions below

0
On BEST ANSWER

Given the system as

$$ \cases{\dot y_1 = y_2\\ \dot y_2 = a\sin y_1 } $$

This is an autonomous system then the recursion equations can be written as

$$ \cases{ k_1 = f(Y_n)\\ k_2 = f(Y_n+h k_1)\\ Y_n = Y_{n-1}+\frac h2(k_1+k_2) } $$

with

$$ f(Y) = \cases{Y(2)\\ a\sin Y(1)} $$

so with

$$ Y_0 = \cases{y^0_1\\ y^0_2} $$

we have for $n=1$

$$ \cases{k_1 = \cases{y^0_2\\ a\sin y^0_1}\\ k_2 = \cases{a h \sin y^0_1+y^0_2\\ a\sin(y^0_1+h y^0_2)}\\ Y_1 = \cases{y^0_1+h y^0_2+\frac 12 ah^2\sin y^0_1\\ y^0_2+\sin(y^0_1+h y^0_2)+\frac 12 a h( \sin y^0_1+\sin(y^0_1+h y^0_2))}} $$

etc.