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 m under the action of external forces is described by Newton's second law. Let the point move along the x axis, then the function x(t) is the position of the point at time t, it satisfies the ordinary differential equation of the second order mx′′=F(t,x,x′). For example, balance of forces for damped harmonic oscillators:
x′′+2x′+10x=0,x(0)=2,x′(0)=5
The exact solution:
x(t)=e−t(37sin(3t)+2cos(3t))
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)=y1(t)y1′(t)=x′′(t)=−2⋅y1(t)−10⋅y0(t),x(0)=y0(0)=2,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=h⋅f(tn,yn)k2=h⋅f(tn+21h,yn+21k1)k3=h⋅f(tn+21h,yn+21k2)k4=h⋅f(tn+h,yn+k3)
Then we calculate the approximation to the solution:
yn+1=yn+61(k1+2k2+2k3+k4)
For the system of equations:
{yn+10=yn0+61(k10+2k20+2k30+k40)yn+11=yn1+61(k11+2k21+2k31+k41)
The difference of solutions:

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