I have a reoccurring problem when doing the following type of problem.
$$\frac{x+1}{\sqrt{x^2+2x+3}}$$ and: $$\frac{4x-2}{\sqrt{x^2+10x+16}}$$
For some reason, I always end up by dividing in half.
For example, the answer to the first one is: $\sqrt{x^2+2x+3}$ and I calculate $\frac{\sqrt{x^2+2x+3}}{2}$.
Here is how I do it: $$\int\frac{x+1}{\sqrt{x^2+2x+3}}dx$$ Square of polynome $(x+1)^2+2$, then $u=x+1 \to x= u-1$ and $a=\sqrt{2}$ $$\int\frac{u-1+1}{\sqrt{u^2+a^2}}du\to \int \dfrac{u}{\sqrt{u^2+a^2}}du$$ Substitution $w=u^2+a^2$, $\frac{dw}{du}=2u \to du = \frac{1}{2u}dw$ $$\int \dfrac{u}{\sqrt{w}}\dfrac{1}{2u}dw \to \dfrac{1}{2}\int\dfrac{1}{\sqrt{w}}dw \to \dfrac12\int w^{-\frac12} dw = \dfrac12 w^{\frac12}$$ $$\text{Final result} = \dfrac{\sqrt{x^2+2x+2}}{2} \neq \sqrt{x^2+2x+2}$$
I feel like I am missing a point or something. Could someone point out where I keep missing it? Thank you.
Hint: since $$(x^2+2x+3)'=2x+2$$ you can substitute $$t=x^2+2x+3$$ then we get $$dt=2(x+2)dx$$ and $$dx=\frac{1}{2}\frac{1}{x+2}dt$$ And write your second integral in the form $$2\int\frac{2x+10}{\sqrt{x^2+10x+16}}dx-22\int\frac{dx}{\sqrt{x^2+10x+16}}$$