Evaluate the integral
$$\int _0^a\:\frac{dx}{\left(a^2+x^2\right)^{\frac{3}{2}}}. \quad a>0$$
So this is what I did:
$$x=a\tan\theta, \ dx = a\sec^2\theta d\theta,\\ \int _0^a\frac{a\sec^2\theta }{\left(a^2+a\tan\theta \right)^{\frac{3}{2}}}\,d\theta.$$
I'm not sure if I did the above step correctly because I looked that the next step is supposed to be:
$$\int _0^{\frac{\pi }{4}}\frac{\sec^2\theta }{\left(a^2\left(1+\tan^2\theta \right)\right)^{\frac{3}{2}}}\,d\theta.$$
I am a little confused as to how the bounds changed and how $a\tan\theta$ became $1+\tan^2\theta$.
I think its probably because I made a mistake before but I am not sure what it is.
Any help?