- #1
geniejhang
- 1
- 0
Homework Statement
I tried to solve mechanical system of particles.
I first tried with two particles rotating with respect to each other.
Of course, i solved this using computer with Runge kutta 4th order method.
Here's the problem.
I used the same method in C and Mathematica.
In mathematica it gives me exact result what i expected.
but in C, the distance of two particles is getting larger and larger.
What is should I do?
What's the problem?
PS. If I post wrong place, please let me know. Thanks
Homework Equations
[tex]\mathbf{F}=-G\frac{Mm}{r^2}\hat{\mathbf{r}}[/tex]
The Attempt at a Solution
Here's the source code.
Mathematica: http://mail.google.com/mail/?ui=2&i...&attid=0.2&disp=attd&realattid=f_fvn6ox701&zw
C: http://mail.google.com/mail/?ui=2&i...&attid=0.1&disp=attd&realattid=f_fvn6ordk0&zw
Last edited: