Rochefort said:
Well I know that C=\int^{B}_{0}\sqrt {1+\dfrac {A^{2}}{B^{2}}\cos^{2}\left(\dfrac {x}{B}\right) }dx
...
But I was wondering if I could find the value of A when knowing the values of B and C.
By substituting y = x/B and using \cos^2 y = 1 - \sin^2 y, you can rewrite<br />
C=\int^{B}_{0}\sqrt {1+\dfrac {A^{2}}{B^{2}}\cos^{2}\left(\dfrac {x}{B}\right) }dx as <br />
C = B \sqrt{1 + \frac{A^2}{B^2}} <br />
\int_0^1 \sqrt{1 - \frac{A^2}{A^2 + B^2}\sin^2 y}\,dy = \sqrt{A^2 + B^2} E\left(1,\frac{A}{\sqrt{A^2 + B^2}}\right) where E(\phi,k) is the
incomplete elliptic integral of the second kind,<br />
E(\phi,k) = \int_0^\phi \sqrt{1 - k^2 \sin^2 y}\,dy. This suggests that it would be easier to work with k = A/\sqrt{A^2 + B^2} and B rather than A and B; you would then have <br />
C = \frac{B}{\sqrt{1 - k^2}} E(1,k), and knowing k you can recover A using
A = \frac{Bk}{\sqrt{1 - k^2}}.
You can expand \sqrt{1 - k^2 \sin^2 y} as a
binomial series in k^2 \sin^2y, which can be integrated term by term (since the integral of \sin^{2n} y
is known) to end up with a polynomial in k^2; but you're still going to have to solve for k numerically.
It would thus seem necessary to use a
root-finding algorithm to solve <br />
\frac{B}{\sqrt{1 - k^2}} E(1,k) - C = 0<br /> for k and to integrate numerically (or, if possible, use a library function to evaluate E(1,k)) at each step of that algorithm.