Indefinite integral of $\frac{\ln(2x)}{x^2+1}$

calculusindefinite-integralsintegration

I was attempting to find the indefinite integral I below via differentiation under the integral sign technique.

$$I=\int\frac{\ln{2x}}{x^2+1}\,dx$$
let us introduce the parameter $t$:
$$I(t)=\int\frac{\ln{xt}}{x^2+1}\,dx$$
taking the partial derivative with respect to $t$, we get:
$$I'(t)=\int\frac{1}{t(x^2+1)}\,dx$$
then taking the antiderivative of the RHS, we get
$$I'(t)=\frac{1}{t}\arctan{x}$$
Finally integrating both sides with respect to $t$, we get
$$I(t)=\ln{t}\arctan{x}$$
since in our original integral $t=2, I(2)$ will be the solution.
However, $$I(2)=\ln{2}\arctan{x}$$ which is clearly not right. Could anyone point out the mistake or false assumption I made?

Best Answer

When you went from

$$I'(t)=\frac{1}{t}\arctan{x} \tag{1}\label{eq1A}$$

to

$$I(t)=\ln{t}\arctan{x} \tag{2}\label{eq2A}$$

you forgot to include a constant relative to $t$, but which could depend on $x$, so call it $C(x)$. Thus, the proper equation in \eqref{eq2A} would be

$$I(t) = \ln{t}\arctan{x} + C(x) \tag{3}\label{eq3A}$$

From the original integral, you get

$$\begin{equation}\begin{aligned} I & =\int\frac{\ln(2x)}{x^2+1}\,dx \\ & = \int\frac{\ln(2) + \ln(x)}{x^2+1}\,dx \\ & = \int\frac{\ln(2)}{x^2+1}\,dx + \int\frac{\ln(x)}{x^2+1}\,dx \\ & = \ln(2)\arctan(x) + \int\frac{\ln(x)}{x^2+1}\,dx \end{aligned}\end{equation}\tag{4}\label{eq4A}$$

Thus, you have

$$C(x) = \int\frac{\ln(x)}{x^2+1}\,dx \tag{5}\label{eq5A}$$

Related Question