How can you work out the most efficient path of a space shuttle going into space, taking into account gravity and atmosphere loss? Taking into account gravity and atmosphere loss acting on the shuttle, how would you be able to plot a graph of horizontal distance against vertical altitude of a spacecraft going into orbit? Could you first plot a standard curve and change it to minimise gravity and atmospheric force? I know there are lots of different losses and details about fuel but would you be able to plot a graph of a trajectory that would minimise gravity loss and atmosphere loss?
 A: The must efficient way would be to add velocity to that at which the shuttle already move around the center of our planet, ie go eastward. However
• the target will be a LEO or so, we do not want to orbit at launch tower altitude; 
• we must leave the denser, most dragging atmosphere as soon as possible. Not too soon as for the high dynamic pressure will be unsustainable by the vessel. Speed and dynamic load must be balanced until the shuttle leave the atmosphere and further accelerate to orbital speed.
As such the shuttle goes vertically - indeed we said lift-off - to clean the launch pad. Soon the throttle is reduced to keep a safe load . After the denser part of the atmosphere is cleared, full thrust is applied again. 
Also soon after lift-off the shuttle does a roll manoeuvre to start adding velocity towards prograde orbit while climbing.
The optimal path is, in simple words, a compromise between climbing at the right speed and going prograde adding tangential velocity.
Vector summation shows that launching  and keeping vertical never can be an efficient way to go to orbit. Even in the ridiculous case in which the target orbital speed would be that already possessed by the vehicle at pad and ignoring losses, adding prograde velocity will result on achieving that orbit by burning less fuel.
An actual shuttle going just up will soon fall back. And likely westward the launching.
For an actual plot things are really messy. I would try with "just" a delta V minimisation ignoring drag to start. Then adding atmosphere even in simplified shell firms. I have just read some. I am not really in differential equations and atmosphere modelling. 
Actual ascent profiles are available in the web. Additional info: if you are interested on the argument you can find amazing the free package Orbiter 2016, an orbital fly simulator for at least Windows os.
A: The most efficient route is simple = straight up.
The actual trajectory is mostly complicated because you need to control aerodynamic loads on different parts of the structure, allow for maneuvers to a possible emergency landing, take into account the pad facing the wrong way and end up heading in the right direction in orbit 
