<s>[INST] How to evaluate $\int \frac{1+x}{1+\sqrt x} dx$ I picked this exercice from B. Demidovitch and i started solving, but when it's complete, i get only the half of the solution (the first two fractions and the ln, doesn't show up).
$$\int \frac{1+x}{1+\sqrt x} dx$$
The Solution is:
$$2 \left[\frac{\sqrt{x^3}}{3}-\frac{x}{2}+2\sqrt{x}-2ln(1+\sqrt{x})\right] + C$$
 [/INST] By setting $\color{red}{x=z^2}$ we just have to compute
$$ I=\int \frac{2z(1+z^2)}{1+z}\,dz $$
and by polynomial division we have $2z(1+z^2)=(2z^2-2z+4)(1+z)-4$, hence
$$ I = \int (2z^2-2z+4)\,dz -4\int\frac{dz}{1+z} = \color{red}{\frac{z^3}{3}-z^2+4-4\log(1+z)+C}. $$
</s>