<s>[INST] Integral $\int \frac{\sqrt{x}}{(x+1)^2}dx$ First, i used substitution $x=t^2$ then $dx=2tdt$ so this integral becomes $I=\int \frac{2t^2}{(1+t^2)^2}dt$ then i used partial fraction decomposition the following way:
$$\frac{2t^2}{(1+t^2)^2}= \frac{At+B}{(1+t^2)} + \frac{Ct + D}{(1+t^2)^2} \Rightarrow 2t^2=(At+B)(1+t^2)+Ct+D=At+At^3+B+Bt^2 +Ct+D$$
for this I have that $A=0, B=2, C=0, D=-2$ 
so now I have 
$I=\int \frac{2t^2}{(1+t^2)^2}dt= \int\frac{2}{1+t^2}dt - \int\frac{2}{(1+t^2)^2}dt$ 
Now,
$$ \int\frac{2}{1+t^2}dt = 2\arctan t$$
and 
$$\int\frac{2}{(1+t^2)^2}dt$$
using partial integration we have:
$$u=\frac{1}{(1+t^2)^2} \Rightarrow du= \frac{-4t}{1+t^2}$$
and $$dt=dv \Rightarrow t=v$$  
so now we have:
$$\int\frac{2}{(1+t^2)^2}dt =\frac{t}{(1+t^2)^2} + 4\int\frac{t^2}{1+t^2}dt = \frac{t}{(1+t^2)^2} + 4\int\frac{t^2 + 1 -1}{1+t^2}dt = \frac{t}{(1+t^2)^2} + 4t -4\arctan t$$
so, the final solution should be:
$$I=2\arctan t - \frac{t}{(1+t^2)^2} - 4t +4\arctan t$$
since the original variable was $x$ we have 
$$I= 6\arctan \sqrt{x} - \frac{\sqrt{x}}{(1+x)^2} - 4\sqrt{x} $$
But, the problem is that the solution to this in my workbook is different, it says that solution to this integral is $$I=\arctan \sqrt{x} - \frac{\sqrt{x}}{x+1}$$
I checked my work and I couldn't find any mistakes, so i am wondering which solution is correct?
 [/INST] Alternative Approach:
Let $x=\tan^2{\theta}$,$dx=2\tan{\theta} \sec^2{\theta} d\theta$
\begin{align}
I&=\int{\frac{\tan{\theta}\cdot 2\tan{\theta}\sec^2{\theta} d\theta}{ \sec^4{\theta} }}\\&=2\int{\sin^2{\theta}}d\theta\\&=\int{1-\cos{(2\theta)}}d\theta\\&=\theta-\frac12 \sin{(2\theta)}+C\\&=\arctan{\sqrt x}-\frac{\sqrt x}{1+x}+C
\end{align}
</s>