# 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.

• It doesn't really make sense to introduce $i$ when you're in the real domain... May 27, 2018 at 14:12
• This is a duplicate question, it has been asked before and contains a very extensive solution
– user408856
May 27, 2018 at 14:13
• @James this question is not entirely directed at integrating $\sqrt{\tan x}$, my doubt is regarding simplifying partial fraction with introducing $i$. May 27, 2018 at 14:16
• @James Alright. I have modified OP a bit, hope this 'd make my doubt clear. May 27, 2018 at 14:24
• If you want continue using this way, continue the partial fraction decomposition. May 27, 2018 at 15:29

## 4 Answers

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

$$t^4+1=(t^2+\sqrt2t+1)(t^2-\sqrt2t+1)$$

By expanding in partial fraction:

$$\frac{2t^2}{1+t^4}=\frac{t/\sqrt2}{t^2-\sqrt2t+1}-\frac{t/\sqrt2}{t^2+\sqrt2t+1}$$

To find the partial fraction decomposition, write

$$\frac{2t^2}{1+t^4}=\frac{at+b}{t^2+\sqrt2t+1}+\frac{ct+d}{t^2-\sqrt2t+1}$$

Multiply both sides by $1+t^4$ and simplify:

$$2t^2=(a+c)t^3+(b+d-\sqrt2a+\sqrt2c)t^2+(a+c+\sqrt2d-\sqrt2b)t+(b+d)$$

Now identify coefficients:

• from $t^3$, $a+c=0$
• from the constant, $b+d=0$
• from $t$ (using $a+c=0$): $b=d$, then $b=d=0$ since $b+d=0$
• from $t^2$ (using $b+d=0$), $2=\sqrt2(c-a)=2c\sqrt2$, hence $c=\frac{\sqrt2}2$
• since $a=-c$, $a=-\frac{\sqrt2}{2}$

The integral of the first term leads to:

$$\int\dfrac{t/\sqrt2}{t^2-\sqrt2t+1}\mathrm dt=\frac{\sqrt2}{4}\int\dfrac{2t-\sqrt2+\sqrt2}{t^2-\sqrt2t+1}\mathrm dt\\=\frac{\sqrt2}{4}\log|t^2-\sqrt2t+1|+\frac12\int\dfrac{1}{t^2-\sqrt2t+1}\mathrm dt$$

And

$$\int\dfrac{\mathrm dt}{t^2-\sqrt2t+1}=\int\dfrac{\mathrm dt}{\left(t-\frac{\sqrt2}{2}\right)^2+\frac12}=2\int\dfrac{\mathrm dt}{\left(\sqrt2t-1\right)^2+1}$$

With the change of variable $u=\sqrt2t-1$, this integral is

$$2\int\dfrac{\mathrm dt}{\left(\sqrt2t-1\right)^2+1}=\sqrt2\int\frac{\mathrm du}{u^2+1}=\sqrt2\arctan(u)+C=\sqrt2\arctan(\sqrt2t-1)+C$$

The first term thus yields:

$$\int\dfrac{t/\sqrt2}{t^2-\sqrt2t+1}\mathrm dt=\frac{\sqrt2}{4}\log|t^2-\sqrt2t+1|+\frac{\sqrt2}{2}\arctan(\sqrt2t-1)+C$$

The second term is similar:

$$\int\dfrac{t/\sqrt2}{t^2+\sqrt2t+1}\mathrm dt=\frac{\sqrt2}{4}\int\dfrac{2t+\sqrt2-\sqrt2}{t^2+\sqrt2t+1}\mathrm dt\\=\frac{\sqrt2}{4}\log|t^2+\sqrt2t+1|-\frac12\int\dfrac{1}{t^2+\sqrt2t+1}\mathrm dt$$

And

$$\int\dfrac{\mathrm dt}{t^2+\sqrt2t+1}=\int\dfrac{\mathrm dt}{\left(t+\frac{\sqrt2}{2}\right)^2+\frac12}=2\int\dfrac{\mathrm dt}{\left(\sqrt2t+1\right)^2+1}$$

With the change of variable $u=\sqrt2t+1$, this integral is

$$2\int\dfrac{\mathrm dt}{\left(\sqrt2t+1\right)^2+1}=\sqrt2\int\frac{\mathrm du}{u^2+1}=\sqrt2\arctan(u)+C=\sqrt2\arctan(\sqrt2t+1)+C$$

The second term thus yields:

$$\int\dfrac{t/\sqrt2}{t^2+\sqrt2t+1}\mathrm dt=\frac{\sqrt2}{4}\log|t^2+\sqrt2t+1|-\frac{\sqrt2}{2}\arctan(\sqrt2t+1)+C$$

All in all

$$\int\dfrac{2t^2\mathrm dt}{1+t^4}=\frac{\sqrt2}{4}\log\left|\frac{t^2-\sqrt2t+1}{t^2+\sqrt2t+1}\right|+\frac{\sqrt2}2\arctan(\sqrt2t-1)+\frac{\sqrt2}2\arctan(\sqrt2t+1)+C$$

You can remove the absolute value, as the numerator and the denumerator are both positive:

$$\int\dfrac{2t^2\mathrm dt}{1+t^4}=\frac{\sqrt2}{4}\log\left(\frac{t^2-\sqrt2t+1}{t^2+\sqrt2t+1}\right)+\frac{\sqrt2}2\arctan(\sqrt2t-1)+\frac{\sqrt2}2\arctan(\sqrt2t+1)+C$$

• could u pls explain a bit on how u did partial fraction decomposition on $\frac{2t^2}{t^4+1}=\frac{2t^2}{(t^2+\sqrt{2}t+1)(t^2-\sqrt{2}t+1)}$ May 27, 2018 at 20:18
• @ss1729 The simplest is to write $\dfrac{2t^2}{1+t^4}=\dfrac{at+b}{t^2+\sqrt2t+1}+\dfrac{ct+d}{t^2-\sqrt2t+1}$, simplify the sum and identify the coefficients $a,b,c,d$. From this you know it has necessarilty this form. May 27, 2018 at 20:26
• i was trying tht. think its a rather cumbersome process to find the coefficients. May 27, 2018 at 20:28
• @ss1729 You can simplify a bit. Let $t=0$ in both and you find that $b+d=0$. Multiply by $t^2$ then let $t\to\infty$ and you find that $a+c=0$. With two more value you would have a $2\times2$ linear system to solve. May 27, 2018 at 20:39
• @ss1729 I updated with the identification of coefficients, so that you can check what you are trying. May 27, 2018 at 20:49

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$$

• thnx. but, could u pls comment on my substitution with $i$ ? May 27, 2018 at 14:32

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*}