3
$\begingroup$

In this answer to How is the average distance between 2 objects orbiting around a third object calculated? I had to integrate

$$\int_0^{2 \pi}\sqrt{(a-\cos \theta)^2 + \sin^2 \theta} \ d\theta.$$

I tried to find the integral analytically with Wolfram Alpha but it returned an error message:

Standard computation time exceeded...

which surprised me; I'd figured that this was known and easily looked-up by the site.

Does this mean that there is no known analytical form for this definite integral? Or for some reason is it particularly challenging?

Wolfram Alpha chokes on a simple definite integral

$\endgroup$
7
  • 1
    $\begingroup$ The result is nasty! Assuming $a$ is real, we have $$\fbox{$2 \left(\sqrt{(a-1)^2} E\left(-\frac{4 a}{(a-1)^2}\right)+\sqrt{(a+1)^2} E\left(\frac{4 a}{(a+1)^2}\right)\right)\text{ if }\Re((a-2) a)>-1\land \Re(a (a+2))>-1$}$$ $\endgroup$
    – Moo
    Jul 18, 2020 at 13:57
  • 1
    $\begingroup$ If you need approximation formulae, let me know. $\endgroup$ Jul 18, 2020 at 13:58
  • $\begingroup$ @Moo "The result is nasty" is essentially the answer, thanks! ;-) $\endgroup$
    – uhoh
    Jul 18, 2020 at 14:12
  • 1
    $\begingroup$ @uhoh. The result is not nasty at all. $\endgroup$ Jul 18, 2020 at 14:34
  • 1
    $\begingroup$ wolframalpha.com/input/… gives the result immediately for the antiderivative. $\endgroup$ Jul 18, 2020 at 15:24

1 Answer 1

4
$\begingroup$

It is not an error message but just "Standard computation time exceeded".

What you should have obtained is $$I=\int_0^{2 \pi}\sqrt{(a-\cos (\theta))^2 + \sin^2 (\theta)} \ d\theta=$$ $$I=2 \left(\sqrt{(a-1)^2} E\left(-\frac{4 a}{(a-1)^2}\right)+\sqrt{(a+1)^2} E\left(\frac{4 a}{(a+1)^2}\right)\right)$$ provided, if $a$ is a real, that $$\Re(a (a+2))>-1\land \Re((a-2) a)>-1$$ where appear ellptic integrals of the second kind. In fact, this reduces to $$I=4(a+1)E\left(\frac{4 a}{(a+1)^2}\right)$$

$\endgroup$
4
  • $\begingroup$ Wolfram Alpha can certainly handle lengthy expressions, so is the reason that getting to this result is a challenge, requiring a large number of steps, substitutions, or dead-ends from which it must back-track and then try something else? I'm really after the "Why...?" here, thanks! $\endgroup$
    – uhoh
    Jul 18, 2020 at 14:15
  • $\begingroup$ @uhoh. Take the Pro version. It is just because you have limited ressources with the standard version. It is a quite long calculation. $\endgroup$ Jul 18, 2020 at 14:19
  • $\begingroup$ okay then "It is a quite long calculation" would help round out an answer to my question, ideally supported in some way. That it is long is probably well known to some, but not to others. $\endgroup$
    – uhoh
    Jul 18, 2020 at 14:29
  • $\begingroup$ I've just asked How does my expression end up as an elliptic integral of the second kind? $\endgroup$
    – uhoh
    Jul 19, 2020 at 7:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.