There are already many questions on Physics SE asking for a proof of the maximum possible efficiency of Carnot's engine. However, none of them (at least the ones which I looked up) contain a mathematically rigorous proof involving variational calculus.
When I felt like proving it, the natural thought was to use variational calculus, but I am just not sure how to do this. Also, is it even possible to prove it using calculus of variations? If yes, then how?