# why do under-expanded engines have less than ideal thrust?

I've been looking into rocket propulsion a bit and got stumped on something. I read that the thrust generated by an engine can be determined by the following: $$F = \frac{w}{g}v_{e}+A_{e}(P_{e}-P_{a})$$ where $$\frac{w}{g}$$ is the mass flow rate, $$v_{e}$$ is the exhaust speed, $$A_{e}$$ is the exit area, $$P_{e}$$ is the exit pressure and $$P_{a}$$ is the ambient pressure. Apparently the max thrust can be obtained when the exit and ambient pressures are equal as this makes the second term zero. I don't understand this. Wouldn't you want to maximize $$P_{e}$$ so as to increase the value of $$F$$?

Hope this isn't a dumb question...

The hard part is that $$P_e$$ isn't a completely independent variable. As the gas expands past the throat, thermal energy is being converted into kinetic energy. The gas cools down and speeds up.
So if you shorten the nozzle (creating an underexpanded flow), there is greater pressure at the exit (good). But the exhaust speed $$v_e$$ is lower (bad). The $$\frac wg v_e$$ term will be smaller and total force will be smaller.