> In the case of a planet going around the sun we know that the planet travels in an ellipse

That's a Newtonian approximation. Under General Relativity it is not true - the possible solutions are time varying, and I'm not even sure there are periodic orbits, nor even stable orbits. All N-body patterns radiate gravitational energy till the system collapses. I'm pretty sure there are no general closed form solution, and I think it's true there is not even a single case where the path is a closed form solution.

In general relativity it is closer to quasiperiodic.

Classical motion under an 1/r^2 field is really strange as a dynamical system because the periods of rotation, in-out and up-down motion are all the same which is why the motion closes as an ellipse. It is beautiful in a lot of ways but a godawful mess from the viewpoint of perturbation theory because these are always in resonance as opposed to only in resonance occasionally.

Ignoring gravitational radiation, in GR (or with secular perturbations from other planets) those periods no longer match up so the orbit goes in-and-out in not quite the same time it goes around and then you get a precession so it is still basically an ellipse but the angle of the ellipse changes and you'd see something like a spirograph if you draw it. It's a quasi-periodic orbit.

You can write down closed forms (often with special-function integrals) for things like 1/r^3 and it is the same story, the variables separate nicely because angular momentum is conserved.