<s>[INST] $ \int\frac{2+\sqrt{x}}{\left(x+\sqrt{x}+1\right)^2}dx$ $$I=\int\frac{2+\sqrt{x}}{\left(x+\sqrt{x}+1\right)^2}dx$$
I can't think of a substitution to solve this problem, by parts won't work here. Can anyone tell how should I solve this problem?
 [/INST] Another way you might be interested .
Notice that $$\frac{d}{dx}\left(\frac{1}{x+\sqrt x+1}\right)=\frac{-(1+\frac{1}{2\sqrt x})}{(x+\sqrt x+1)^2}$$
Put then $$\int\frac{2+\sqrt{x}}{\left(x+\sqrt{x}+1\right)^2}dx=\frac{A+B\sqrt x+Cx}{x+\sqrt x+1}$$ and take the derivative in both sides. You get at once $C=0$ and the system $$2\sqrt x(2+\sqrt x)=-A(2\sqrt x+1)+B(1-x)$$ which gives $A=B=-2$.
Thus $$\int\frac{2+\sqrt{x}}{\left(x+\sqrt{x}+1\right)^2}dx=\frac{-2(\sqrt x+1)}{x+\sqrt x+1}$$
</s>