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