I've tried it various ways using classical methods of calculus, but each have failed because of the implicit function of "x" to "cos x". At one point, I thought it would reduce to an Elliptic Integral, but even this cratered in the end.
I think numerical methods is your best bet, which is probably what many of readers have suggested using canned software programs.
I'm going to keep at it, I like the abuse. Hopefully I can prove the answer in my own lifetime!
Kenneth J Hueston, PEng
Principal
Sturni-Hueston Engineering Inc
Edmonton, Alberta Canada