I'm trying to graph the earth's trajectory around the sun (assuming the sun is in a constant position), and I have devised the following Mathematica input, but I am having trouble getting the input to graph anything meaningful. Could someone please look over what I have and tell me if there are any errors? NDSolve[{x''[t] == grav*x[t]/((x[t])^2 + (y[t])^2), y''[t] == grav*y[t]/((x[t])^2 + (y[t])^2), x[0] == 149.6*10^9, y[0] == 0, x'[0] == 0, y'[0] == 30000 }, {x, y}, {t, 10000000}]
I'm modelling the path as a system of differential equations, but I'm not sure it works out. The numbers I have gotten are directly from real world data..
I'm using newton's law of gravity, that is F=gmM/r^2. here I'm taking grav to be equal to gM, or the magnitude of acceleration that the earth would experience
Join our real-time social learning platform and learn together with your friends!