Second Order Runge Kutta for Simple Harmonic Motion

Click For Summary
SUMMARY

The discussion focuses on applying the Second Order Runge-Kutta method to solve the ordinary differential equation for Simple Harmonic Motion (SHM), represented as d²x/dt² = -w²x. The transformation of this second-order equation into two first-order equations is established as dx/dt = v and dv/dt = -w²x. The participant successfully rewrote the equations but expressed uncertainty in implementing the Runge-Kutta method without a specified step size. The leading error term in the solution after the first time step h is confirmed to be proportional to h³.

PREREQUISITES
  • Understanding of ordinary differential equations (ODEs)
  • Familiarity with the Runge-Kutta methods, specifically the Second Order Runge-Kutta
  • Knowledge of Simple Harmonic Motion (SHM) principles
  • Basic calculus, particularly differentiation and integration techniques
NEXT STEPS
  • Study the implementation of the Second Order Runge-Kutta method in numerical analysis
  • Explore error analysis in numerical methods, focusing on leading error terms
  • Learn about the stability and convergence of numerical solutions for ODEs
  • Investigate the application of Runge-Kutta methods to other physical systems beyond SHM
USEFUL FOR

Students and professionals in mathematics, physics, and engineering who are working with numerical solutions of differential equations, particularly those interested in modeling oscillatory systems like Simple Harmonic Motion.

Abigail1997
Messages
6
Reaction score
0

Homework Statement


The ordinary differential equation describing shm is
d^2x/dt^2=-w^2x
where x is the displacement, t is the time and w is the frequency. If x=0 at t=0, the analytical solution is x=Asin(wt), where A is the amplitude.

1) Rewite equation 1 as two first oder ode's suitable for solution using Runge Kutta Methods
2)Determine the second order runge-kutta solution for this system after the first time step h and show the leading error term in x(h) is proportional to h^3

Homework Equations


k1=hf(xn,yn)
k2=hf(x+h, y+k1)
y_(n+1)=y_n+(1/2)k_1+(1/2)k_2

The Attempt at a Solution


I have completed part 1 and got dx/dt=v and dv/dt=-w^2x but I am unsure how to proceed. The lecturer didn't do a great job of explaining the method and I don't know how to do it when you have two equations and are not given the step size.
 
Physics news on Phys.org
The relate what you got and the equations of the Runge-Kutta algorithm, set ##y_1 \equiv x## and ##y_2 \equiv v##, and remember that
$$
\frac{d y_n}{dt} = f_n
$$
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 6 ·
Replies
6
Views
51K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 65 ·
3
Replies
65
Views
9K
  • · Replies 15 ·
Replies
15
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K