1. ## Integral

Find $\displaystyle \int\frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)(a^2-ax+x^2)^3}}\;{dx}$ (where $a$ is a constant, of course).

2. Let me try

Rewirte the integrand :

$= \frac{a(\frac{a^2}{x^2}-1)}{\sqrt{( \frac{a^2}{x} + a + x) ( \frac{a^2}{x} - a + x )^3 } }$

Then substitute $\frac{a^2}{x} + x = ay$

$(\frac{a^2}{x^2} - 1 ) dx = -ady$

The integral becomes :

$- \int \frac{a^2 dy}{ \sqrt{ (ay+a)( ay-a)^3 } }$

$= -\int \frac{dy}{\sqrt{(y+1)(y-1)^3 } }$

Sub. $y = \frac{t+1}{t-1}$

$dy = -\frac{2dt}{(t-1)^2 }$

The integral

$= \int \frac{1}{\sqrt{\frac{2t}{t-1}( \frac{2}{t-1} )^3} }~ \frac{2dt}{(t-1)^2 }$

$= \frac{1}{2} \int \frac{dt}{\sqrt{t} }$

$= \sqrt{t} + C$

But $t = \frac{y+1}{y-1}$ we have

$= \sqrt{ \frac{y+1}{y-1} } + C$

$= \sqrt{ \frac{ a^2 + ax+ x^2 }{ a^2 - ax + x^2 }} + C$

3. You have totally annihilated it!

Now that I've the answer, I see that it could have been done it in the following way:

Rewrite the integrand:

$\displaystyle \frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)(a^2-ax+x^2)^3}}$

$= \displaystyle \frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)}\sqrt{(a^2-ax+x^2)^3}}$

$$\displaystyle = \frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)}\sqrt{(a^2-ax+x^2)}(a^2-ax+x^2)}$$

$\displaystyle = \frac{a(a^2-x^2)\sqrt{(a^2+ax+x^2)}}{(a^2+ax+x^2)((a^2-ax+x^2)\sqrt{(a^2-ax+x^2)}}$

$\displaystyle = \frac{a(a^2-x^2)}{(a^2+ax+x^2)((a^2-ax+x^2)}\cdot \frac{\sqrt{(a^2+ax+x^2)}}{\sqrt{(a^2-ax+x^2)}}$

Let $\displaystyle t = \frac{\sqrt{(a^2+ax+x^2)}}{\sqrt{(a^2-ax+x^2)}}$ (One would have to employ clairvoyance to spot that substitution without knowing the answer beforehand )

Then $\displaystyle \ln{t} = \ln\left\{\frac{\sqrt{a^2+ax+x^2}}{\sqrt{a^2-ax+x^2}}\right\}$

$\displaystyle = \ln\left(\sqrt{a^2+ax+x^2}\right)+\ln\left(\sqrt{a ^2-ax+x^2}\right)$

$\displaystyle= \frac{1}{2}\ln\left(a^2+ax+x^2\right)+\frac{1}{2}\ ln\left(a^2-ax+x^2\right)$

$\displaystyle \Rightarrow \left(\frac{1}{t}\right)\frac{dt}{dx} = \frac{2x+a}{2(a^2+ax+x^2)}-\frac{2x-a}{2(a^2-ax+x^2)}$

$\displaystyle \Rightarrow \left(\frac{1}{t}\right)\frac{dt}{dx} = \frac{(2x+a)(a^2-ax+x^2)-(2x-a)(a^2+ax+x^2)}{2(a^2+ax+x^2)(a^2-ax+x^2)}$

$\displaystyle \Rightarrow \left(\frac{1}{t}\right)\frac{dt}{dx} = \frac{2 a^3-2ax^2}{2(a^2+ax+x^2)(a^2-ax+x^2)} = \frac{ a(a^2-x^2)}{(a^2+ax+x^2)(a^2-ax+x^2)}$

$\displaystyle \Rightarrow \frac{dt}{dx} = \frac{ a(a^2-x^2)}{(a^2+ax+x^2)(a^2-ax+x^2)}\cdot \frac{\sqrt{(a^2+ax+x^2)}}{\sqrt{(a^2-ax+x^2)}}$

$\displaystyle \Rightarrow {dx} = \frac{(a^2+ax+x^2)(a^2-ax+x^2)}{a(a^2-x^2)}\cdot \frac{\sqrt{(a^2-ax+x^2)}}{\sqrt{(a^2+ax+x^2)}}\;{dt}$

$\displaystyle \therefore I = \int \frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)(a^2-ax+x^2)^3}}\;{dx}$

$\displaystyle = \int \bigg\{\frac{a(a^2-x^2)}{(a^2+ax+x^2)((a^2-ax+x^2)}\cdot \frac{\sqrt{(a^2+ax+x^2)}}{\sqrt{(a^2-ax+x^2)}}\bigg\}\bigg\{\frac{(a^2+ax+x^2)(a^2-ax+x^2)}{a(a^2-x^2)}\cdot \frac{\sqrt{(a^2-ax+x^2)}}{\sqrt{(a^2+ax+x^2)}}\right\}\bigg\}\;{dt }$

The integrand cancels to 1 (since the two products are inverse to each other), therefore $I = t+k$.

Hence $\displaystyle \int \frac{a(a^2-x^2)}{\sqrt{(a^2+ax+x^2)(a^2-ax+x^2)^3}}\;{dx} = \frac{\sqrt{(a^2+ax+x^2)}}{\sqrt{(a^2-ax+x^2)}}+k.$