Calculating $\int_{-a}^{a} \frac{x\cdot dy}{(x^2+y^2)^{3/2}}$ requires unusual substitution? Can someone help me understand how to solve this integral? The official solution says to substitute $y=x\cdot \tan(u)$ and $dy=x\cdot \sec^2(u)du$, but I don't understand how I should know that myself.
Here is the integral:
$$\int_{-a}^{a} \frac{x\cdot dy}{(x^2+y^2)^{3/2}}$$
A step-through solution would be appreciated. I haven't done integrals in a while so it would be helpful if you can explain any particularly complicated steps.
Thank you!!!
 A: Let us go slowly and consider $$I=\int \frac{x\cdot dy}{(x^2+y^2)^{3/2}}$$ in which $x$ is whatever you want (it is a constant for the problem).
So, make a first change of variable $y=z x$, $dy=x dz$. So $$I=\int \frac{x^2}{\left(x^2+x^2 z^2\right)^{3/2}}\,dz=\frac 1x \int \frac {dz}{(1+z^2)^{3/2}}$$
I am sure that you can take from here
A: Let $$\displaystyle  I = \int \frac{x}{(x^2+y^2)^{\frac{3}{2}}}dy\;,$$ Here $x$ is Constant.
Here  Denominator is in the form of $(x^2+y^2)$
So we will put $y=x\tan \phi,$ Then $\displaystyle dy = d(x\tan \phi)=x\frac{d}{d\phi}\left[\tan \phi\right]d\phi$
so we get $\displaystyle dy = x\sec^2 \phi d\phi$
So Integral $$\displaystyle I = \int\frac{x^2\cdot \sec^2 \phi}{x^3\sec^3 \phi}d\phi\;,$$ Here we put $(1+\tan^2 \phi) = \sec^2 \phi$$
So we get $$\displaystyle \frac{1}{x}\int \cos \phi d\phi = \frac{\sin \phi}{x}+\mathcal{C}$$
Now above we take $\displaystyle y=x\tan \phi\Rightarrow \tan \phi = \frac{y}{x}$
So Using Right angle $\triangle\;,$ We get $\displaystyle \sin \phi = \frac{y}{\sqrt{x^2+y^2}}$
So Integral $$\displaystyle I = \frac{y}{x\sqrt{x^2+y^2}}+\mathcal{C}$$
So $$\displaystyle \int_{-a}^{a}\frac{y}{(x^2+y^2)^{\frac{3}{2}}} = \left[\frac{y}{x\sqrt{x^2+y^2}}\right]_{-a}^{a} $$
$$\displaystyle = \left[\frac{a}{x\sqrt{x^2+a^2}}\right]-\left[-\frac{a}{x\sqrt{x^2+a^2}}\right] = \left[\frac{2a}{x\sqrt{x^2+a^2}}\right]$$
