Why can electric cars recoup energy from braking, but a spaceship cannot?
The main point is that the space-ship is a closed system and the car is not
Consider that to conserve momentum we need to give something else the momentum our decelerating object had before.
- In the case of the space-ship this requires ejecting something in the opposite direction to the direction of travel. We need to put energy in to do this.
- In the case of the car we have been connected to the road the whole time and because of this friction we need to continuously provide energy in order not to decelerate. So our wheels are turning and because of the connection with the road friction will decelerate us, what electric cars do is to add an extra resistive force to the turning of the wheels (which is needed to keep going) and make use of the energy gained from this.
So because space-ships don't require any further thrust to maintain a constant speed we have no process to steal the energy from. If you could provide a resistive force on the space-ship you could regain some of the energy but it would have to be outside the space-ship (a magnetic field emitted from a series of space stations for example).
You have to be moving relative to something else which you can impart energy to.
There is one particular omission in the existing answers that I'd like to rectify.
It is that there is a very special context in which you can do the problem, which answers the question in the affirmative with very little actual effort. In this reference frame the travelling spaceship appears to start at rest and then starts moving backwards.
Modern physics generally recognizes that you can do the same physics in a bunch of different frames of reference which are related by some sort of transformation group. You may choose any frame you like, they all give the same physics. In classical physics this is done by the Galilean transformation $$(\vec r,~~ t) \mapsto (\vec r - \vec v~t,~~ t),$$ for any constant velocity vector $\vec v.$ As you can see, anything which is moving forwards with velocity $\vec v,$ having $\vec r(t) = \vec r_0 +\vec v ~ t,$ is suddenly stationary with respect to us after performing this transformation: that is a nice way to see "oh, this corresponds to moving forward with speed $v$ relative to my prior situation."
Since we're talking about a spaceship you might wonder if the strange rules of relativity will mess with this explanation, but in fact they won't. Actually, for small velocity changes special relativity only changes this an insignificant bit: instead of that Galilean transform we instead must use$$(\vec r,~~ t) \mapsto (\vec r - \vec v~t,~~ t - \vec v \cdot \vec r /c^2).$$ The only catch is that any "big" acceleration needs to be made out of a lot of these little accelerations, which didn't matter for classical physics when the $t$ component kept its fixed identity, but now matters a lot more when you have both components intertwining. But I promise we won't be using these strange little simultaneity shifts in the following talk.
Our special reference frame
Anyway, the point is: all of the laws of physics are perfectly valid in the reference frame that travels alongside the spaceship once it is moving at its cruising speed, and they are perfectly valid in the reference frame that travels alongside the car. And the laws that we're interested in are the laws of conservation for energy and momentum.
Now think of what "braking" looks like in this reference frame: it looks like the spaceship/car which was at rest, now starts moving backwards. So it gains kinetic energy where it previously had none, and gains momentum where it previously had none.
But what do the conservation laws state? They state that in this reference frame, something can only brake (get negative momentum) by causing other things to move "more forwards" than they were moving before (get positive momentum). The usual way to do this is to fire a rocket engine forwards: this takes rocket fuel which was "not moving" and propels it "forwards," and this will always cost energy: you now have two moving entities (your spaceship, the spent fuel) moving opposite to each other with some kinetic energy. In our special reference frame we can see that this demands energy expenditure: first we have 0 kinetic energy, then we have nonzero kinetic energy.
But if you're slowing down with an atmosphere or braking against a road, that looks subtly different in this reference frame. In this reference frame, that means that there is something (let's say it has mass $M$, though of course that's an idealization for a road or an atmosphere) coming towards you with velocity $-\vec v$, and you are going to grab hold of it or perhaps (like with solar sails) bounce it off of you, in order to gain momentum in the $-\vec v$ direction.
If you think about that for a second, you'll realize that you're not necessarily sure where the energy will end up. This big thing $M$ is going to be moving backwards slower, say at velocity $-v'$ and your little spaceship/car $m$ is going to be moving backwards faster, say at velocity $-u$. Since $v' < v$ it's not clear whether $\frac 12 M (v')^2 + \frac 12 m u^2$ is going to be greater or less than $\frac 12 M v^2$, corresponding to either requiring your input of energy or else allowing you to siphon off some energy and "regeneratively brake". So let's derive the condition.
So our car/spaceship has mass $m$ and starts off with speed $0$ and it ends up with velocity $-u$, and the object it interacts with has velocity $-v$ and mass $M$, and ends up with velocity $-v'.$ Conservation of momentum says that $M v' + m u = M v,$ so that $v' = v - \frac mM u.$ The resulting change in kinetic energy is $$\frac 12 M \left(v - \frac mM u\right)^2 + \frac 12 m u^2 - \frac 12 M v^2 = - m v u + \frac 12 m \left(1 + \frac mM\right)u^2.$$If this change in kinetic energy is negative then that means that the missing kinetic energy could be collected, having a magnitude $$E = mu\left(v - \frac12 \left (1 + \frac mM\right) u\right).$$ Taking the limit as $M \gg m$ we see that this condition is actually $u < 2v$ for the possibility of energy regeneration. This threshold $u =2v$ has an intuitive explanation back in the reference frame that moves along with the ground, where it says "you cannot possibly regenerate any more energy if you stop your car regenerating 100% of that energy and then use it to drive yourself in reverse, so you were going at speed $+v$ and now you go at speed $-v.$" But for any velocity $u$ (relative to the road) where $-v < u < v$ it is hypothetically possible to regenerate some energy. The same applies to the spaceship, it could hypothetically grab enough energy to hurl itself in an arbitrary direction at the same speed as it came in.
So: we see from the co-moving reference frame that yes, regenerating energy is possible, but only if you slow down (by some tiny fraction) some massive object which is moving through the space. You can also see this principle applied for example in gravitational slingshots: to complete a gravitational assist, you want to pass behind a planet as it follows its orbit about the Sun; this means that your gravity will pull backwards on that planet, and its corresponding gravitational pull on you is going to give you a lot more kinetic energy. If you tried to get a gravitational assist going in front of the planet (again, in terms of the direction it is going in its orbit), you would find yourself exiting with much less speed than when you went in.
Technically if the space ship could find something to brake against, it could regain some energy. You would need a braking system devised to take advantage of resistance or drag where ever you could find it. Maybe in a planet's atmosphere or gravity in some way, or even a large contraption designed to catch the spaceship and extract energy from the process. You could go on and on. For every action there is an opposite action.