Q:

How to simplify $\Re\left[\sqrt2 \tan^{-1} {x\over \sqrt i}\right]$?

While solving $$\int \frac{x^2+1}{x^4+1}\,dx,$$ I tried to use partial fractions in the denominator by writing $x^4+1=(x^2+i)(x^2-i)$ And then I got $\Re\left[\sqrt2 \tan^{-1}{x\over \sqrt i}\right]$. In my book they used another method without complex numbers and they got $\frac{1}{\sqrt2} \tan^{-1} \left(\frac{x^2-1}{x\sqrt2}\right)$. How do I prove my answer is equal to theirs? I tried the realtions between log and atan but I couldnt get rid of the $i$. Edit: Please note that this question is not about solving the integral (which I already solved to get $\Re\left[\sqrt2 \tan^{-1}{x\over \sqrt i}\right]$.) but about the simplification of the answer I got using complex partial fractions method to reduce it to the real part only.

A:

$$\Re\left[\sqrt2 \tan^{-1}{x\over \sqrt i}\right]=\Re\left[\sqrt2 \tan^{-1}{x\cdot e^{-i\pi/4}}\right]=\frac{(\sqrt2 \tan^{-1}{x\cdot e^{-i\pi/4}})+(\sqrt2 \tan^{-1}{x\cdot e^{i\pi/4}})}{2}$$
$$=\frac{1}{\sqrt{2}}\left( \tan^{-1}{x\cdot e^{i\pi/4}}+\tan^{-1}{x\cdot e^{-i\pi/4}} \right)=\frac{1}{\sqrt{2}}\tan^{-1}\frac{x\cdot e^{i\pi/4}+x\cdot e^{-i\pi/4}}{1-x\cdot e^{i\pi/4}\cdot x\cdot e^{-i\pi/4}}$$
$$=\frac{1}{\sqrt{2}}\tan^{-1}\frac{2x\cos \frac{\pi}{4}}{1-x^2}=\frac{1}{\sqrt{2}}\tan^{-1}\frac{\sqrt{2}x}{1-x^2}$$
where line $2\to3$ is achieved by using that $\tan(x+y)=\frac{\tan x + \tan y}{1- \tan x \tan y}$. 
The differs from the expression you give by a constant, after further noting that $\tan^{-1}x+\tan^{-1}\left(\frac{1}{x}\right)=\frac{\pi}{2}$ for $x>0$.

