# Integral too slow and with conditionals

When I try to solve this integral: $$\int_{-a}^a \frac{x}{\left(x^2+y^2\right)^{3/2}} \, dy$$

it's return

ConditionalExpression[(2 a)/(x Sqrt[a^2 + x^2]),
Im[x]^2 <=
Re[x]^2 && (Im[x/a] > 1 || Im[x/a] < -1 ||
Re[x/a] !=
0) && (Sqrt[-((Im[x] Re[x])/(Im[a] Re[a]))] ∉
Reals ||
Im[x] (Im[x] + (Re[a] Re[x])/Im[a]) <=
Re[x] ((Im[a] Im[x])/Re[a] + Re[x]) ||
Re[Sqrt[-((Im[x] Re[x])/(Im[a] Re[a]))]] >= 1)]


and takes 37s to solve!

Is there any particular reason? Is there a way to obtain only the [] part ?

• use assumptions Integrate[x/(x^2 + y^2)^(3/2), {y, -a, a}, Assumptions -> (x | y) \[Element] Reals && x > 0 && a > 0]. This is likely a duplicate, but I can't find which one. – chuy Aug 5 '14 at 17:29
• I get it now!Now how can i do this automatic with something like $Pre ... – Kafkarudo Aug 5 '14 at 17:53 • you can do $Assumptions = {(x | y) \[Element] Reals && x > 0 && a > 0} instead of giving the option to Integrate (be aware though that only functions that take an assumptions argument actually use the \$Assumptions variable.. ) – george2079 Aug 5 '14 at 18:52

You can throw your assumptions into Assuming as follows:

Assuming[{y ∈ Reals, x > 0, a > 0}, Integrate[x/(x^2 + y^2)^(3/2), {y, -a, a}]] Sometimes it is good to find the general integration and then find the bounded one using substitution.

int[y_] = Integrate[x/(x^2 + y^2)^(3/2), y];
int[a] - int[-a]

(*(2 a)/(x Sqrt[a^2 + x^2])*)