TITLE: A generalization for Serret's integral $\int_0^a \frac{\ln(1+ax)}{1+x^2}dx$
QUESTION [5 upvotes]: The integral specified in the title appears in Gradshteyn & Ryzhik 4.291.18, also followed by its sister integral:
$$\int_0^a \frac{\ln(1+ax)}{1+x^2}dx=\int_0^a \frac{a\arctan x}{1+ax}dx=\frac12 \arctan a\ln(1+a^2) \tag 1$$
Some application of the above gives us some nice results, such as:
$$\int_0^1\frac{\arctan x}x\ln\left(\frac{(1+x^2)^3}{(1+x)^2}\right)dx=0$$
Above follows by converting $\int_0^1 \frac{\arctan x\ln(1+x^2)}{x}dx$ to a double integral using $(1)$ and then swapping the order of the integrals.
Or another one:
$$\int_0^1 \frac{\arctan x\ln(1+x^2)}{x(1+x)}dx=\frac{\pi^3}{96}-\frac{\pi}{8}\ln^2 2$$

But the question here would be how to prove the result given in $(1)$?
I tried to differentiate under the integral sign with respect to $a$, but something nasty appeared. Are there any other ideas?

REPLY [12 votes]: $$\begin{align}I=\int_0^a\frac{\ln(1+ax)}{1+x^2}dx&=\int_0^a\frac{\ln\frac{1+a^2}{1+at}}{1+t^2}dt\text{  (transform $x=\frac{a-t}{1+at}$)}\\
&=\arctan a\ln(1+a^2)-\int_0^a\frac{\ln(1+at)}{1+t^2}dt\\
&=\arctan a\ln(1+a^2)-I\\
&=\frac12\arctan a\ln(1+a^2)\end{align}
$$
The key point is the mobius transformation.

How do I discover this transformation? By observing the similar technique OP mentioned. We may let $$x=\frac{b_1+b_2t}{c_1+c_2t}$$ and add some restrictions to $b_1,b_2,c_1,c_2$. We hope this transformation preserves the bounds of integral, hence $$0=\frac{b_1+b_2a}{c_1+c_2a}$$ and $$a=\frac{b_1}{c_1}.$$ Also, we can cancel out $b_2$. Three relations are found, then just try to substitute it into the original integral and hope it works. The result is that it really works.