Question #76736

Q. Apply Runge Kutta Method to slove an I.V.P. comlicated problem.

Expert's answer

Answer on Question #76736 – Math – Quantitative Methods

Question

Apply Runge Kutta Method to solve an I.V.P. complicated problem.

Solution

The motion of a material point of mass mm under the action of external forces is described by Newton's second law. Let the point move along the xx axis, then the function x(t)x(t) is the position of the point at time tt, it satisfies the ordinary differential equation of the second order mx=F(t,x,x)mx'' = F(t, x, x'). For example, balance of forces for damped harmonic oscillators:


x+2x+10x=0,x(0)=2,x(0)=5x'' + 2x' + 10x = 0, \quad x(0) = 2, \quad x'(0) = 5


The exact solution:


x(t)=et(73sin(3t)+2cos(3t))x(t) = e^{-t} \left( \frac{7}{3} \sin(3t) + 2 \cos(3t) \right)


For a numerical solution, we transform the second-order differential equation into a system of first-order differential equations by means of the change of variables:


y0(t)=x(t),y1(t)=x(t)y0(t) = x(t), \quad y1(t) = x'(t){y0(t)=x(t)=y1(t)y1(t)=x(t)=2y1(t)10y0(t),x(0)=y0(0)=2,x(0)=y1(0)=5\left\{ \begin{array}{c} y0'(t) = x'(t) = y1(t) \\ y1'(t) = x''(t) = -2 \cdot y1(t) - 10 \cdot y0(t) \end{array} \right., \quad x(0) = y0(0) = 2, \quad x'(0) = y1(0) = 5


Approximations calculated using the Runge-Kutta method of order 4. For this method, each step requires the use of the following four values (h-step size):


k1=hf(tn,yn)k_1 = h \cdot f(t_n, y_n)k2=hf(tn+12h,yn+12k1)k_2 = h \cdot f\left(t_n + \frac{1}{2} h, y_n + \frac{1}{2} k_1\right)k3=hf(tn+12h,yn+12k2)k_3 = h \cdot f\left(t_n + \frac{1}{2} h, y_n + \frac{1}{2} k_2\right)k4=hf(tn+h,yn+k3)k_4 = h \cdot f(t_n + h, y_n + k_3)


Then we calculate the approximation to the solution:


yn+1=yn+16(k1+2k2+2k3+k4)y_{n+1} = y_n + \frac{1}{6} \left( k_1 + 2k_2 + 2k_3 + k_4 \right)


For the system of equations:


{yn+10=yn0+16(k10+2k20+2k30+k40)yn+11=yn1+16(k11+2k21+2k31+k41)\left\{ \begin{array}{l} y_{n+1}^0 = y_n^0 + \frac{1}{6} \left( k_1^0 + 2k_2^0 + 2k_3^0 + k_4^0 \right) \\ y_{n+1}^1 = y_n^1 + \frac{1}{6} \left( k_1^1 + 2k_2^1 + 2k_3^1 + k_4^1 \right) \end{array} \right.


The difference of solutions:



Answer provided by https://www.AssignmentExpert.com

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS