Indefinite Integral $\int\frac{1}{1+\tan^{-1}x}\,\text{d}x$ I tried to solve this indefinite integral, $$\int\frac{1}{1+\tan^{-1}x}\,\text{d}x.$$
I tried taking the change of variable $u=\tan^{-1}x$ but failed to reach a solution.
Can anyone help me?
Thanks in advance.
 A: Let $u=\tan^{-1}x$ ,
Then $x=\tan u$
$\therefore\int\dfrac{1}{1+\tan^{-1}x}~dx$
$=\int\dfrac{d(\tan u)}{u+1}$
$=\dfrac{\tan u}{u+1}-\int\tan u~d\left(\dfrac{1}{u+1}\right)$
$=\dfrac{\tan u}{u+1}+\int\dfrac{\tan u}{(u+1)^2}~du$
$=\dfrac{\tan u}{u+1}+\int\sum\limits_{n=0}^\infty\dfrac{8u}{((2n+1)^2\pi^2-4u^2)(u+1)^2}~du$ (use Mittag-Leffler Expansion of tangent)
$=\dfrac{\tan u}{u+1}-\int\sum\limits_{n=0}^\infty\dfrac{8}{((2n+1)\pi-2)^2((2n+1)\pi+2u)}~du+\int\sum\limits_{n=0}^\infty\dfrac{8}{((2n+1)\pi+2)^2((2n+1)\pi-2u)}~du+\int\sum\limits_{n=0}^\infty\dfrac{8((2n+1)^2\pi^2+4)}{((2n+1)^2\pi^2-4)^2(u+1)}~du-\int\sum\limits_{n=0}^\infty\dfrac{8}{((2n+1)^2\pi^2-4)(u+1)^2}~du$
$=\dfrac{\tan u}{u+1}-\sum\limits_{n=0}^\infty\dfrac{4\ln((2n+1)\pi+2u)}{((2n+1)\pi-2)^2}-\sum\limits_{n=0}^\infty\dfrac{4\ln((2n+1)\pi-2u)}{((2n+1)\pi+2)^2}+\sum\limits_{n=0}^\infty\dfrac{8((2n+1)^2\pi^2+4)\ln(u+1)}{((2n+1)^2\pi^2-4)^2}+\sum\limits_{n=0}^\infty\dfrac{8}{((2n+1)^2\pi^2-4)(u+1)}+C$
$=\sec^21\ln(\tan^{-1}x+1)+\dfrac{x+\tan1}{\tan^{-1}x+1}-\sum\limits_{n=0}^\infty\dfrac{4\ln((2n+1)\pi+2\tan^{-1}x)}{((2n+1)\pi-2)^2}-\sum\limits_{n=0}^\infty\dfrac{4\ln((2n+1)\pi-2\tan^{-1}x)}{((2n+1)\pi+2)^2}+C$
Check by Wolfram Alpha https://www.wolframalpha.com/input/?i=sum+ln%28%282n%2B1%29pi%2Ba%29%2F%28%282n%2B1%29pi-2%29%5E2%2Cn%3D0+to+inf and https://www.wolframalpha.com/input/?i=sum+ln%28%282n%2B1%29pi-a%29%2F%28%282n%2B1%29pi%2B2%29%5E2%2Cn%3D0+to+inf, the two infinite series converges.
A: This is not a complete answer, but just converts it to a nested infinite sum.
Letting $f(x) = \frac{1}{1+\tan^{-1}(x)}$, I found the first couple of derivatives at $x = 0$ to be: 
$$f(0) = 1, f'(0)=-1, f''(0)=2, f'''(0)=-4, f^{(4)}(0)=8, f^{(5)}(0) = -24$$
Plugging these into the OEIS, I found A191700. Using the formula in the OEIS of $$f^{(n)}(0) = (-1)^n n! \sum_{k=1}^{n} k! (-1)^{(3n+k)/2}\sum_{i=k}^{n} \frac{2^{i-k}}{i!} S(i, k) \binom{n-1}{i-1} $$
means that $$f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(0)}{n!}x^n = \sum_{n=0}^\infty \left((-1)^n \sum_{k=1}^{n} k! (-1)^{(3n+k)/2}\sum_{i=k}^{n} \frac{2^{i-k}}{i!} S(i, k) \binom{n-1}{i-1}  x^n \right)$$
Integrating, we have $$\int f(x) dx = \sum_{n=0}^\infty \left(\frac{(-1)^n}{n+1} \sum_{k=1}^{n} k! (-1)^{(3n+k)/2}\sum_{i=k}^{n} \frac{2^{i-k}}{i!} S(i, k) \binom{n-1}{i-1}  x^{n+1} \right) + C$$
This may be able to be simplified by switching the order of summation. However, I got nowhere with that. If anyone makes more progress in simplifying this, feel free to add another answer or post a comment.
