# 3-Body Simulation and Accuracy of Lambert Interplanetary Solver

I've found that using a Lambert solver together with the equations of the patched conic approximation for an interplanetary flight from Earth to Mars is quite inaccurate, when taking Earth's gravitational field into consideration. I guess this is to be expected since it is an approximation, but this has got me thinking: How does one accurately calculate an interplanetary trajectory between two planets if the perturbative effects of the target, and more importantly, source planet are taken into account? I suppose one way to fix the trajectory once out of the Earth's sphere of influence would be to run the Lambert solver again and apply the required delta-v to the spacecraft, but this seems like a very inefficient thing to do when fuel is limited. Are there more advanced methods than the Lambert + patched conic approach out there, and if so, does anyone have any links to papers written on these topics? Any help would be greatly appreciated.

P.S. This is the output I get from a Lambert solution when disregarding the gravitational effects of Earth and Mars (inner semi-circle is the orbit of Earth, outer semi-circle is the orbit of Mars, and the line joining the two is the spacecraft's trajectory):

And this is the output I get from a Lambert + patched conic solution when taking the gravitational effects of Earth and Mars into accout: