We'll be simulating the spacecraft's trajectory given a few initial conditions:?\(t_0,r_0\ \text{and}\ v_0\). We will not be using our mighty engines, we'll just coast freely.? What is it that affects our trajectory here? Just the gravitational pull from all the planets. We look first at the gravitational pull from one planet.
\(F = \dfrac{GM_pm}{|\vec r-\vec r_p|^2}\cdot\dfrac{\vec r-\vec r_p}{|\vec r-\vec r_p|}\)
A bit to unpack here. G is the gravitational constant, \(M_p\) is the mass of the planet, m is the mass of the spacecraft, \(\vec r\) is the position vector of the spacecraft with respect to the sun at origin, \(\v