# How to solve $\int\frac{2+\sqrt{x}}{x+1}dx$ given the substitution $\sqrt{x}$

I need to solve

$$\int\frac{2+\sqrt{x}}{x+1}dx$$

I'm forced to use the substitution variable

$$u=\sqrt{x}$$

The first replacement I've done is

$$\int\frac{2+\sqrt{x}}{u^2+1}dx$$

Now, I need to find a way to fit du which is $$du = \frac{1}{2\sqrt{x}}$$ or $$du = \frac{x^\frac{-1}{2}}{2}$$

But I am unable to figure out how to transform the actual $\sqrt{x}$ to the corresponding du.

Any hints ?

• Hint: $u=\sqrt{x}\implies u^2=x\implies 2u\,du=\,dx$ – Prasun Biswas Mar 15 '15 at 20:42
• It seems much more natural to split up the integrand into $$\frac{2}{x+1}+\frac{\sqrt{x}}{x+1}$$ and then use the substitution only on the second part. Is this allowed? – Peter Woolfitt Mar 15 '15 at 20:44
• Not sure if it is allowed, but it clearly is easier that way. – student Mar 15 '15 at 20:46

$du/dx = 1/2x^{-1/2} = 1/2u^{-1}$, or equivalently $2u du = dx$, then you get $\int \frac{2+u}{u^2+1}2u du = \int \frac{4u+2u^2}{u^2+1} du$ and then split into two integrals (why are we allowed to do this?):
$$2\int \frac{u^2}{u^2+1}du + 2\int \frac{2u}{1+u^2}du$$
$$u=\sqrt{x}$$ $$x=u^2$$ $$dx=2udu$$ $$\int \frac{2+u}{1+u^2}2udu=\int \frac{4u+2u^2}{1+u^2}du$$ $$\int (\frac{4u}{1+u^2}+\frac{2u^2}{1+u^2})du$$ $$\int (\frac{4u}{1+u^2}+2-\frac{1}{1+u^2})du$$ $$\int (\frac{4u}{1+u^2}+2-\frac{1}{1+u^2})du=2\log(1+u^2)+2u-\tan^{-1}u+C$$ $$=2\log(1+x)+2\sqrt{x}-\tan^{-1}\sqrt{x}+C$$
If $\sqrt{x}=u$ then $x=u^2$ and $dx = 2u\,du$, hence: $$I=\int \frac{2+\sqrt{x}}{x+1}\,dx = \int \frac{2+u}{1+u^2}\cdot 2u\,du = \int\left(2+\frac{4u-2}{1+u^2}\right)\,du$$ and: $$I = C+2u+2\log(1+u^2)-2\arctan u = C+2\sqrt{x}+2\log(1+x)-2\arctan\sqrt{x}.$$
• You missed the constant of integration $C$. – Prasun Biswas Mar 15 '15 at 20:49