Where does energy go when performing a useless effort? I went to school one day, so I thought I was able to get this simple one.. but it looks like I'm not anymore. :(
One lonely little spaceship is resting into space. It has a small fuel capacity that it suddently burns to run away and finally reaches a speed $v$. Its tank is now empty, its kinetic energy $E = \frac{m v^2}{2}$ is exactly what it had in reserve, and it is equal to the work performed by the constant force $F$ it has just applied to itself over the run distance $d$ with $W = Fd = E$..
Now, instead of being free, it is tied with a rope to a wall. It does try to run away, burns its fuel.. But there is nothing to do, the rope is too strong. And it ends up with an empty tank and a null speed, a null kinetic energy, and the work $F$ has performed has been null all the time, for the rope's $-F$ has prevented any acceleration..
Where is its energy gone? The entire universe had energy $E$ all the time, the spaceship had $E$ initially (chemical potential) now $0$.. what is the system that had energy $0$ initially and now $E$, and why? what happened?
If it is only friction and heat within the rope and the wall, does it mean there is no way modeling a "perfect rope" without assuming that some energy is lost?
 A: The rocket motor generates thrust by acelerating the exhaust gases that it emits. The force on the rocket is equal to the change in momentum of the exhaust gases per second, i.e. the exhaust velocity times the exhaust mass per second.
For the rocket travelling in space the energy generated from burning the fuel goes partly into the kinetic energy of the rocket and partly into the kinetic energy of the exhaust gases.
In your second example where the rocket is fixed in position, because the rocket can't move all the energy goes into the kinetic energy of the exhaust gases. Were the energy ends up is going to depend on what happens to those exhaust gases. Some of the exhaust will hit the wall and heat it up, so some of the energy goes into heating the wall. The rest probably just swirls around in the atmosphere and eventually slows to a stop. It's energy will go into heating up the atmosphere.
A: The answer is quite simple. You can't see it because you've forgotten that you make an unphysical simplification when considering "tied to an immovable wall" type situations. What's unphysical about the situation is quite simple : there's no such thing as an immovable wall. Let's say the rocket is tied to the earth. To say where the lost chemical potential energy has gone you would need to take into account the minuscule change in velocity that the earth has undergone. Because the mass of the earth is enormous the change in velocity required to produce the right amount of kinetic energy will be small, hence creating the impression of an "immovable wall".
As a side note, it's better not to think of things in terms of $W = Fd$ in this situation. It isn't wrong to do so, it's just harder (although not by much) to take into account the forces in play when the rocket is attached to a string. In particular, because the actual distance moved in such a situation is minuscule and unmeasurable for all intents and purposes, I don't consider it to be the most intuitive view of the problem. In addition, it's not trivial to define the distance moved when we are progressively excluding some of the fuel as being part of the system. All in all, to resolve your apparent paradox, it's simpler to think about things in terms of "which form of energy turns into which form of energy" for this situation, rather than consider the work done on a system, which is not trivial to define when the mass of the system is changing over time.
It should be noted that you've completely glossed over this "change of mass" subtlety in your analysis. The work done on the rocket is not the only thing involved. There's also work done on the gas as it ejects. As the rocket mass tends to $\infty$ (which is the equivalent of tying it to a very massive wall) most of the kinetic energy will indeed go to the gas, and you can't just ignore it.
