# Mathematica just takes infinite time to solve this

Can You help? I don't even care about the exact solution. I will be satisfied by the series expansion of the result around a=0.

I tried to solve by series expansion and the same result .. infinite time!!

Series[Integrate[r ((r Cos[x] - a)/((a^2 + r^2 - 2 a r Cos[x])^1.5 Sqrt[1 - (r \[Omega])^2/C^2])),{x, 0, 2 Pi}, {r, a, (C/\[Omega])}] - Integrate[
r ((r Cos[x] - a)/((a^2 + r^2 - 2 a r Cos[x])^1.5 Sqrt[1 - (r \[Omega])^2/C^2])),{x, 0, 2 Pi}, {r, 0, a}], {a, 0,3}]


I have even tried to plot vs "a", it doesn't give anything useful:

Plot[Integrate[r ((r Cos[x] - a)/((a^2 + r^2 - 2 a r Cos[x])^1.5 Sqrt[1 - (r \[Omega])^2/C^2])),{x, 0, 2 Pi}, {r, a, (C/\[Omega])}] - Integrate[
r ((r Cos[x] - a)/((a^2 + r^2 - 2 a r Cos[x])^1.5 Sqrt[1 - (r \[Omega])^2/C^2])),{x, 0, 2 Pi}, {r, 0, a}], {a, 0,(C/Omega)}]


• How about solving it numerically as a function of the constants? Just look at the first integral first. Specify values for the constants and then use NIntegrate. First however, learn how Mathematica numerically solves multiple integrals by first setting up a simple one in which you know the answer. Get that working, then set up yours. – Dominic May 25 '19 at 8:37
• There are clearly some issues here, such as 1) Using C as a constant when it is a predefined function in Mathematica and 2) Using square brackets instead of standard parentheses. I would suggest fixing these issues before even trying to do the integration – wilsnunn May 25 '19 at 9:02

tl;dr – this integral diverges.

The integrand: (using an exponent of 3/2 instead of 1.5)

F = (r (-a + r Cos[x]))/(Sqrt[1 - (r^2 ω^2)/C^2] (a^2 + r^2 - 2 a r Cos[x])^(3/2));


integrate over $$x$$, separately for the two parts:

F1 = Assuming[0 < r < a, Integrate[F, {x, 0, 2 Pi}] // FullSimplify];
F2 = Assuming[0 < a < r, Integrate[F, {x, 0, 2 Pi}] // FullSimplify];


these need to be integrated over $$r$$ now, which diverges:

Integrate[F1, {r, 0, a}]
(* diverges *)

Integrate[F2, {r, a, C/ω}]
(* diverges *)


You can see why by looking at the series expansions of F1 and F2 around $$r=a$$: they both diverge as $$1/(r-a)$$,

Assuming[0 < r < a && ω > 0 && C > ω a,
Series[F1, {r, a, -1}] // FullSimplify]


$$\frac{2 C}{(r - a)\sqrt{C^2 - a^2 \omega^2}} + \mathcal{O}[(r-a)^0]$$

Assuming[0 < a < r && ω > 0 && C > ω a,
Series[F2, {r, a, -1}] // FullSimplify]


$$\frac{2 C}{(r - a)\sqrt{C^2 - a^2 \omega^2}} + \mathcal{O}[(r-a)^0]$$

• I tried this code, it does not end calculation: F = (r (-a + r Cos[x]))/(Sqrt[ 1 - (r^2 [Omega]^2)/C^2] (a^2 + r^2 - 2 a r Cos[x])^(3/2)); F2 = Assuming[0 < a < r, Integrate[F, {x, 0, 2 Pi}] // FullSimplify]; Assuming[0 < a < r && [Omega] > 0 && C > [Omega] a, Series[F2, {r, a, -1}] // FullSimplify] – Ahmed Kamal Kassem May 26 '19 at 2:50
• @أحمدكمال what is your $Version of Mathematica? On mine this code runs fine: "12.0.0 for Mac OS X x86 (64-bit) (April 7, 2019)" – Roman May 26 '19 at 5:07 • Home edition, version: 9.0.1.0 – Ahmed Kamal Kassem May 26 '19 at 6:38 • I downloaded version 12 (trial version), I got the same result that you got. Many thanks – Ahmed Kamal Kassem May 26 '19 at 7:49 • @أحمدكمال it's the Big O notation indicating (loosely speaking) that the next-order term in the series expansion is proportional to$(r-a)^0\$. in other words, there are no more divergent terms and the next-order term is a constant. See also the documentation of Series and O, as well as this tutorial on power series. – Roman May 26 '19 at 8:55