Where is the mistake in my evaluation of $\int\frac{x}{x^2+2x+3}\,dx$? Here is how I did it:
First, write $$\int\frac{x}{x^2+2x+3}\,dx=\int\frac{2x+2-x-2}{x^2+2x+3}\,dx=\int\frac{2x+2}{x^2+2x+3}\,dx-\int\frac{x+2}{x^2+2x+3}\,dx.$$
Now consider the integral in the minuend. Letting $u=x^2+2x+3$, one finds $du=(2x+2)\,dx$, and so $$\int\frac{2x+2}{x^2+2x+3}\,dx=\int\frac{du}{u}=\ln{|x^2+2x+3|}.$$
Next consider the other integral. Put $t\sqrt{2}=x+1$. Then $dx=\sqrt 2\,dt$. Now
\begin{align*}
\int\frac{x+2}{x^2+2x+3}\,dx&=\int\frac{(x+1)+1}{(x+1)^2+2}\,dx\\
&=\int\frac{t\sqrt 2+1}{2t^2+2}\sqrt 2\,dt\\
&=\frac{1}{2}\int\frac{2t+\sqrt 2}{t^2+1}\,dt\\
&=\frac{1}{2}\left(\int\frac{2t}{t^2+1}\,dt+\sqrt 2\int\frac{1}{t^2+1}\,dt\right)\\
&=\frac{1}{2}\left(\ln{|t^2+1|}+\sqrt 2\arctan t\right)
\end{align*}
and hence this is equal to
$$\frac{1}{2}\left(\ln{\left|\frac{x^2+2x+1}{2}+1\right|}+\sqrt 2\arctan\frac{x+1}{\sqrt 2}\right)=\frac{1}{2}\left(\ln{\left|\frac{x^2+2x+3}{2}\right|}+\sqrt 2\arctan\frac{x+1}{\sqrt 2}\right)$$
therefore
\begin{align*}
\int\frac{x}{x^2+2x+3}\,dx&=\int\frac{2x+2}{x^2+2x+3}\,dx-\int\frac{x+2}{x^2+2x+3}\,dx\\
&=\ln{|x^2+2x+3|}-\frac{1}{2}\left(\ln{\left|\frac{x^2+2x+3}{2}\right|}+\sqrt{2}\arctan\frac{x+1}{\sqrt 2}\right)+C.
\end{align*}
apparently, the correct answer is $\frac{(\ln|x^2+2x+3|)}{2}-\frac{\sqrt{2}\arctan{\frac{(x+1)}{\sqrt{2}}}}{2}+C.$ what went wrong?
 A: It seems that you made no mistake. Actually, your answer and the “correct” one are one and the same, since$$\frac12\log|x^2+2x+3|-\frac12\log\left|\frac{x^2+2x+3}2\right|$$is a constant.
A: Recall $\ln(a/b) = \ln(a) - \ln(b)$, so
$$\ln\left|\dfrac{x^2+2x+3}{2} \right| = \ln\dfrac{|x^2+2x+3|}{|2|} = \ln|x^2+2x+3|-\ln2$$
so, distributing the $-\dfrac{1}{2}$, we obtain
$$\ln|x^2+2x+3|-\dfrac{1}{2}\ln|x^2+2x+3|-\dfrac{1}{2}\ln2 - \dfrac{\sqrt{2}\arctan\frac{x+1}{\sqrt 2}}{2}+C$$
which is just
$$\dfrac{1}{2}\ln|x^2+2x+3| - \dfrac{\sqrt{2}\arctan\frac{x+1}{\sqrt 2}}{2}-\dfrac{1}{2}\ln 2 + C$$
and because $-\dfrac{1}{2}\ln 2$ is a constant, we can absorb that into $C$.
A: $\ln{|x^2+2x+3|}-\frac{1}{2}\left(\ln{\left|\frac{x^2+2x+3}{2}\right|}+\sqrt{2}\arctan\frac{x+1}{\sqrt 2}\right)+C=   \ln{|x^2+2x+3|}-\frac{1}{2}\left(\ln{\left|{x^2+2x+3}\right|-\ln{2}}+\sqrt{2}\arctan\frac{x+1}{\sqrt 2}\right)+C=\frac{1}{2}\left(\ln{\left|{x^2+2x+3}\right|}- \sqrt{2}\arctan\frac{x+1}{\sqrt 2}\right)-\dfrac{1}{2}\ln{2} + C $
$C_{new}=-\dfrac{1}{2}\ln{2} + C $
A: Answer :
$\int_{}^{} \frac{x}{x^2 +2x+3}dx=\frac{1}{2}\int_{}^{} \frac{2x+2-2}{x^2 +2x+3}  dx =\frac{1}{2}([ln(|x^2 +2x+3|] +c_1) - \frac{1}{2}\int_{}^{} \frac{2}{x^2 +2x+1 +2} dx= \frac{1}{2}([ln(|x^2 +2x+3|] +c_1) - \frac{1}{2}\int_{}^{} \frac{2}{(x+1)^2 +2 } dx =\frac{1}{2}([ln(|x^2 +2x+3|]+c_1) -\frac{1}{2}\int_{}^{}    \frac{1}{(\frac{x+1}{\sqrt{2}})^2 +1} dx=\frac{1}{2}([ln(|x^2 +2x+3|]+c_1) -  \frac{\sqrt{2}}{2}([arct(\frac{x+1}{\sqrt{2}})] +c_2) $
We put $C=\frac{1}{2}(c_1-\sqrt{2}c_2 )$.
