I was reading the Wikipedia on Clairaut's Theorem (Symmetry of second derivatives) and the article accounts the significant amount of time and failed proofs occurred before the theorem was made fully rigorous by Schwarz in 1873. The article then gives an elementary proof of the theorem using essentially only the Mean Value Theorem, which was proven by Cauchy in 1823.
This makes me wonder why the theorem took 50 additional years after the Mean Value Theorem was proven to be made rigorous, when it does not seem to require many tools, and the ideas do not seem to be too difficult for a mathematician at the time to come across. I was wondering if anyone has any insight to what the field of analysis was like at the time and why there could be such a discrepancy? Could the act of discovering the right conditions (continuity of second partial derivatives) be part of it?