integrate $\int \frac{dx}{(9+x^2)^2}$ 
$$\int \frac{dx}{(9+x^2)^2}$$

$x=3\tan\theta$
$dx=\frac{3}{\cos^2\theta}d\theta$
$$\int\frac{\frac{3}{\cos^2\theta}}{(9[1+\tan^2\theta])^2} \,d\theta = \int\frac{\frac{3}{\cos^2\theta}}{(\frac{9}{\cos^2\theta})^2} \, d\theta =\frac{3}{81} \int \cos^2\theta \, d\theta=\frac{3}{162}\int (\cos2\theta+1) \, d\theta$$
$u=2\theta$
$du=2d\theta$
$$\frac{3}{324}\int (\cos u+1) du=\frac{3}{324}(\sin u+u)+c=\frac{3}{324}(\sin2\theta+2\theta)+c$$
I know that $\theta=\arctan(\frac{x}{3})$
How should I continue? 
 A: Setting $\tan\theta=\frac x3$ & $\theta=\tan^{-1}\left(\frac x3\right)$, one should get $$\frac{3}{324}\left(\sin 2\theta+2\theta\right)+C$$
$$=\frac{1}{108}\left(\frac{2\tan\theta}{1+\tan^2\theta}+2\theta\right)+C$$
$$=\frac{1}{108}\left(\frac{2\cdot \frac{x}{3}}{1+\frac{x^2}{9}}+2\tan^{-1}\left(\frac x3\right)\right)+C$$
$$=\frac{1}{108}\left(\frac{6x}{x^2+9}+2\tan^{-1}\left(\frac x3\right)\right)+C$$
taking $2$ common out of bracket, 
$$=\frac{2}{108}\left(\frac{3x}{x^2+9}+\tan^{-1}\left(\frac x3\right)\right)+C$$
$$=\color{red}{\frac{1}{54}\left(\frac{3x}{x^2+9}+\tan^{-1}\left(\frac x3\right)\right)+C}$$
A: Hint. You may use
$$
\sin (2\theta)=\frac{2\tan \theta}{1+\tan^2\theta}
$$ and
$$
\theta= \arctan \frac{x}3.
$$
A: Here it is:
\begin{align*}
\int\frac{dx}{(9+x^2)^2}\,dx
&=\frac{1}{81}\int\frac{dx}{(1+(x/9)^2)^2}
\;\;\;\;\;\;\;\;\mbox{put now}\;x=9\tan y
\\
&=\frac{1}{81}\int\frac{1}{(1+\tan^2y)^2}\frac{9}{\cos^2y}\,dy\\
&=\frac19\int\frac{1}{\frac{1}{\cos^4y}}\frac{1}{\cos^2y}\,dy\\
&=\frac19\int{\cos^2y}\,dy\\
&=\frac1{18}\left[\cos y\sin y +y\right]+C\\
&=\frac1{18}\left[\cos^2 y\tan y +y\right]+C\\
\end{align*}
but now $y=\arctan x/9$, from which the last expression turns into
$$
\frac{x\cos^2(\arctan(x/9))}{18\cdot9}+\frac{\arctan(x/9)}{18}+C
$$
