Loading [MathJax]/extensions/TeX/boldsymbol.js

 

 

 

Building a code for the solar system, force equations

Introducing x=r\cos{(\theta)} , y=r\sin{(\theta)} and r = \sqrt{x^2+y^2}, we can rewrite F_{x}=-\frac{GM_{\odot}M_E}{r^2}\cos{(\theta)}=-\frac{GM_{\odot}M_E}{r^3}x, and F_{y}=-\frac{GM_{\odot}M_E}{r^2}\sin{(\theta)}=-\frac{GM_{\odot}M_E}{r^3}y, for the y direction.