Integrate $\int\frac{2t^2}{t^4+1}dt$ 
Integrate $\int\frac{2t^2}{t^4+1}dt$

While evaluating the integral $\int\sqrt{\tan x}dx$ in Evaluating the indefinite integral $\int\sqrt{\tan x}dx$. using the substitution $t^2=\tan x\implies2tdt=\sec^2x.dx$, thus 
$$
\int\sqrt{\tan x}dx=\int\frac{2t^2}{t^4+1}dt
$$
This is solved using partial fractions, Check answers of @Bhaskara-III, @Harish Chandra Rajpoot. But, what if I try the following
My Attempt
$$
\int\frac{2t^2}{t^4+1}dt=\int\frac{2t^2}{(t^2+i)(t^2-i)}dt\\
\frac{2t^2}{(t^2+i)(t^2-i)}=\frac{A}{t^2+i}+\frac{B}{t^2-i}\\
2t^2=A(t^2-i)+B(t^2+i)\implies A=1, B=1\\
\color{red}{\frac{2t^2}{(t^2+i)(t^2-i)}=\frac{1}{t^2+i}+\frac{1}{t^2-i}}\\
$$
$$
\int\frac{2t^2}{t^4+1}dt=\int\frac{1}{t^2+i}dt+\int\frac{1}{t^2-i}dt=\int\frac{1}{t^2+(\sqrt{i})^2}dt+\int\frac{1}{t^2-(\sqrt{i})^2}dt
$$
Is it possible to somehow finish the integration with my substitution ?
Pls check: integrating square root of $\tan x$, answer by @Mhenni Benghorbal, seems to be a similar substitution as in my attempt.
 A: I may give another way. 
From 
$$ \int \frac{2t^{2}}{1+t^{4}} dt $$
Divide by $t^2$
$$ \int \frac{2}{\frac{1}{t^{2}}+t^{2}} dt $$
$$ \int \frac{1 + 1/t^{2} + 1 - 1/t^{2}}{\frac{1}{t^{2}}+t^{2}} dt $$
$$ \int \frac{1 + t^{-2}}{\frac{1}{t^{2}}+t^{2}} dt +  \frac{1 - t^{-2}}{\frac{1}{t^{2}}+t^{2}} dt $$
Then let $a=(t - \frac{1}{t})$ for left and $b= (t + \frac{1}{t})$ for right part to continue.

P.S. I saw this in students' assignment solution
A: Hint
You have $$\int \frac {2t^2dt}{t^4+1}$$
Which can be written as $$\int \frac {(t^2+1+t^2-1)dt}{t^4+1}$$
$$\int \frac {(t^2+1)dt}{t^4+1}+\int \frac {(t^2-1)dt}{t^4+1}$$
$$\int \frac {(1+t^{-2})dt}{t^{-2}+t^2}+\int \frac {(1+t^{-2})dt}{t^2+t^{-2}}$$
For the first one substitute $$u=x-\frac 1x$$ and for second one substitute $$p=x+\frac 1x$$
A: To answer your question, it doesn't make much sense to introduce $i$ by factoring the denominator as $t^2+i$ and $t^2-i$, especially since you're finding the integral of $\sqrt{\tan x}$ over the real domain. Of course, it also wouldn't help to try it out.
With that being said, another way to reduce the integral is to divide both the numerator and denominator by $t^2$ and split the integrand into two separate "partial fractions" and integrate each one. You should get an $\arctan(\cdot)$ and a $\log(\cdot)$.
$$\begin{align*}I & =\int dt\,\frac {2}{t^2+t^{-2}}\end{align*}$$
