# Math Help - Another bad integral?

This is another question that I'm having trouble solving... is it also bad?

$
\int{\frac{x^2}{x^4+1}}dx
$

Thanks.

2. It's not as bad as the other, but it ain't pretty neither.

You could use a clever partial fraction decomp on it, may be one way.

$\frac{\sqrt{2}}{4}\int\frac{x}{x^{2}-\sqrt{2}x+1}dx-\frac{\sqrt{2}}{4}\int\frac{x}{x^{2}+\sqrt{2}x+1}d x$

3. Thanks. It ain't pretty, as you say, but it works after a loooong manipulation.

4. Originally Posted by superphysics
This is another question that I'm having trouble solving... is it also bad?

$
\int{\frac{x^2}{x^4+1}}dx
$

Thanks.
I really should find something better to do with my time. Well, at least the LaTeX bashing was fun and it looks vaguely cool.

I actually believe that by some really farfetched coincidence my answer is right.

The denominator can factor as:

$\int \frac{x^2}{(x^2+\sqrt{2}x+1)(x^2-\sqrt{2}x+1)}\,dx$

You can then use partial fractions lol

$=\int \left(\frac{\sqrt{2}x}{4(x^2-\sqrt{2}x+1)}-\frac{\sqrt{2}x}{4(x^2+\sqrt{2}x+1)}\right)\,dx$

$=\frac{\sqrt{2}}{4}\int \frac{x}{x^2-\sqrt{2}x+1}\,dx-\frac{\sqrt{2}}{4}\int \frac{x}{x^2+\sqrt{2}x+1}\,dx$

$=\frac{\sqrt{2}}{4}\int \frac{x}{(x-\frac{\sqrt{2}}{2})^2+\frac{1}{2}}\,dx-\frac{\sqrt{2}}{4}\int \frac{x}{(x+\frac{\sqrt{2}}{2})^2+\frac{1}{2}}\,dx$

Using $\int \frac{z}{a^2+z^2}\,dz=\frac{1}{2}\ln(a^2+z^2)+C$ and $\int \frac{\,dz}{a^2+z^2} = \frac{1}{a}\tan^{-1}{\frac{z}{a}}+C$, let $u = x+\frac{\sqrt{2}}{2}$ and $v = x-\frac{\sqrt{2}}{2}$, then the integral becomes

$\frac{\sqrt{2}}{4}\int \frac{u-\frac{\sqrt{2}}{2}}{u^2+\frac{1}{2}}\,du-\frac{\sqrt{2}}{4}\int \frac{v+\frac{\sqrt{2}}{2}}{v^2+\frac{1}{2}}\,dv$

$=\left(\frac{\sqrt{2}}{4}\int \frac{u}{u^2+\frac{1}{2}}\,du - \frac{\sqrt{2}}{4}\int \frac{\frac{\sqrt{2}}{2}}{u^2+\frac{1}{2}}\,du\rig ht)-\left(\frac{\sqrt{2}}{4} \int \frac{v}{v^2+\frac{1}{2}}\,dv+ \frac{\sqrt{2}}{4}\int \frac{\frac{\sqrt{2}}{2}}{v^2+\frac{1}{2}}\,dv\rig ht)$

$=\left(\frac{\sqrt{2}}{4}\int \frac{u}{u^2+\frac{1}{2}}\,du - \frac{1}{4}\int \frac{1}{u^2+\frac{1}{2}}\,du\right)-\left(\frac{\sqrt{2}}{4} \int \frac{v}{v^2+\frac{1}{2}}\,dv+ \frac{1}{4}\int \frac{1}{v^2+\frac{1}{2}}\,dv\right)$

$=\frac{\sqrt{2}}{4}\left(\frac{1}{2}\ln(u^2+\frac{ 1}{4})\right)-\frac{1}{4}\left(\frac{1}{\frac{\sqrt{2}}{2}}\tan^ {-1}\frac{u}{\frac{\sqrt{2}}{2}}\right)-\frac{\sqrt{2}}{4}\left(\frac{1}{2}\ln(v^2+\frac{1 }{4})\right)-\frac{1}{4}\left(\frac{1}{\frac{\sqrt{2}}{2}}\tan^ {-1}\frac{v}{\frac{\sqrt{2}}{2}}\right)$

$=\frac{\sqrt{2}}{8}\ln(u^2+\frac{1}{4})-\frac{1}{2\sqrt{2}}\tan^{-1}\frac{2u}{\sqrt{2}}-\frac{\sqrt{2}}{8}\ln(v^2+\frac{1}{4})-\frac{1}{2\sqrt{2}}\tan^{-1}\frac{2v}{\sqrt{2}}$

$=\frac{\sqrt{2}}{8}\ln\left((x+\frac{\sqrt{2}}{2}) ^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}\frac{2(x+\frac{\sqrt{2}}{2})}{\sqrt{2}}$
$\ \ -\frac{\sqrt{2}}{8}\ln\left((x-\frac{\sqrt{2}}{2})^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}\frac{2(x-\frac{\sqrt{2}}{2})}{\sqrt{2}}$

$=\frac{\sqrt{2}}{8}\ln\left((x+\frac{\sqrt{2}}{2}) ^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}{(\sqrt{2}x+1)}$

$\ \ -\frac{\sqrt{2}}{8}\ln\left((x-\frac{\sqrt{2}}{2})^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}{(\sqrt{2}x-1)}$

$+\ C$

Now I'm going to collapse and sleep for a while.

5. Workin' with partial fractions it's just a mess, but possible.

Here's a specific calculation in this case.

Originally Posted by superphysics
$
\int{\frac{x^2}{x^4+1}}dx
$
$\int {\frac{{x^2 }}
{{x^4 + 1}}\,dx} = \frac{1}
{2}\int {\frac{{\left( {x^2 + 1} \right) + \left( {x^2 - 1} \right)}}
{{x^4 + 1}}\,dx} = \frac{1}
{2}\left[ {\int {\frac{{1 + \dfrac{1}
{{x^2 }}}}
{{x^2 + \dfrac{1}
{{x^2 }}}}\,dx} + \int {\frac{{1 - \dfrac{1}
{{x^2 }}}}
{{x^2 + \dfrac{1}
{{x^2 }}}}\,dx} } \right].$

Now

$\int {\frac{{1 + \dfrac{1}
{{x^2 }}}}
{{x^2 + \dfrac{1}
{{x^2 }}}}\,dx} = \int {\frac{{\left( {x - \dfrac{1}
{x}} \right)'}}
{{\left( {x - \dfrac{1}
{x}} \right)^2 + 2}}\,dx} = \frac{1}
{{\sqrt 2 }}\arctan \frac{{x^2 - 1}}
{{\sqrt 2 x}}.$

$\int {\frac{{1 - \dfrac{1}
{{x^2 }}}}
{{x^2 + \dfrac{1}
{{x^2 }}}}\,dx} = \int {\frac{{\left( {x + \dfrac{1}
{x}} \right)'}}
{{\left( {x + \dfrac{1}
{x}} \right)^2 - 2}}\,dx} = \frac{1}
{{2\sqrt 2 }}\ln \left| {\frac{{x^2 - \sqrt 2 x + 1}}
{{x^2 + \sqrt 2 x + 1}}} \right|.$

Addin' the constant of integration we happily get

$\int {\frac{{x^2 }}
{{x^4 + 1}}\,dx} = \frac{1}
{2}\left[ {\frac{1}
{{\sqrt 2 }}\arctan \frac{{x^2 - 1}}
{{\sqrt 2 x}} + \frac{1}
{{2\sqrt 2 }}\ln \left| {\frac{{x^2 - \sqrt 2 x + 1}}
{{x^2 + \sqrt 2 x + 1}}} \right|} \right] + k.$

6. Originally Posted by superphysics
This is another question that I'm having trouble solving... is it also bad?

$
\int{\frac{x^2}{x^4+1}}dx
$

Thanks.
Observation: You'll get (a multiple of) this integral in the first instance when integrating $
\int \sqrt{\tan t} \, dt \, .
$

7. Originally Posted by Krizalid
$\int {\frac{{x^2 }}
{{x^4 + 1}}\,dx} = \frac{1}
{2}\left[ {\frac{1}
{{\sqrt 2 }}\arctan \frac{{x^2 - 1}}
{{\sqrt 2 x}} + \frac{1}
{{2\sqrt 2 }}\ln \left| {\frac{{x^2 - \sqrt 2 x + 1}}
{{x^2 + \sqrt 2 x + 1}}} \right|} \right] + k.$
Originally Posted by DivideBy0
$=\frac{\sqrt{2}}{8}\ln\left((x+\frac{\sqrt{2}}{2}) ^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}{(2x+1)}$

$\ \ -\frac{\sqrt{2}}{8}\ln\left((x-\frac{\sqrt{2}}{2})^2+\frac{1}{4}\right)-\frac{1}{2\sqrt{2}}\tan^{-1}{(2x-1)}$

$+\ C$
I find it fascinating that the two of these are different only by a constant.

One question: Krizalid's solution will not work if the domain of integration includes 0 (or does it?). Why does DivideBy0's solution work for such a region?

-Dan

8. ## Not >that< fascinating

Originally Posted by topsquark
I find it fascinating that the two of these are different only by a constant. [snip]
-Dan
Well, it's not that fascinating really. The two log terms are easily combined and the result simplified to almost get Krizalid's log term. The two arctan terms are less but not too less easily combined and simplified to almost get Krizalid's arctan term.

The reason for the "almost" is that there are a couple of typos(?) in DivideBy0's answer. Eg 2x + 1 rather than $\sqrt{2}x + 1$ etx. .....

9. ## It does work

Originally Posted by topsquark
[snip]

One question: Krizalid's solution will not work if the domain of integration includes 0 (or does it?). Why does DivideBy0's solution work for such a region?

-Dan
Both work:

arctan(oo) is undefined but could be thought of as being equal to -pi/2 (note that -tan pi/2 is undefined).

And obviously -pi/4 - pi/4 = -pi/2 .......