8

I tried to solve the integral: $$\int_{0}^{\infty}\frac{x^2}{(x^4+1)^2}dx$$ using $ x = \sqrt{\tan(u)}$ and $dx = \frac{ \sec^2(u)}{2\sqrt{\tan(u)}} du,$

but I ended up with an even worse looking integral $$ \int_{0}^{\frac{\pi}{2}}\frac{\sqrt{\tan(u)}}{\sec^2(u)}du.$$

Wolfram gave an answer of $ \dfrac{\pi}{8\sqrt{2}},$ but how would one get to that answer?

amWhy
  • 210,739
Jessca
  • 169
  • 6

6 Answers6

13

Let us start with a step of integration by parts: $$ \int_{0}^{+\infty}\frac{1}{4x}\cdot\frac{4x^3}{(x^4+1)^2}\,dx =\int_{0}^{+\infty}\frac{1}{4x^2}\left(1-\frac{1}{1+x^4}\right)\,dx=\frac{1}{4}\int_{0}^{+\infty}\frac{dx}{x^2+\frac{1}{x^2}}$$ and finish with Glasser's master theorem: $$ \frac{1}{8}\int_{-\infty}^{+\infty}\frac{dx}{\left(x-\frac{1}{x}\right)^2+2}\stackrel{\text{GMT}}{=}\frac{1}{8}\int_{-\infty}^{+\infty}\frac{dx}{x^2+2} = \frac{\pi}{8\sqrt{2}}.$$

Jack D'Aurizio
  • 361,689
  • 1
    I was actually just thinking about if it was possible to use GMT to evaluate that integral! – Diffusion Jan 04 '19 at 01:57
  • 1
    Quite impressive! Since the OP mentioned in the comments that hasn't learnt any fancier tricks I just want to mention that on the integral obtained after integrating by parts, we can do a $x=\frac{1}{t}$ thus: $$J=\int_0^\infty \frac{x^2} {1+x^4} dx=\int_0^\infty \frac{dt} {1 +t^4}dt$$And if we add those two we get:$$2J=\int_0^\infty \frac{x^2 +1}{x^4 +1}dx=\int_0^\infty \frac{\frac{1} {x^2} +1}{x^2 +\frac{1} {x^2} }dx$$ And now completing the square in the denominator and letting $x-\frac{1} {x} =t$ yields the same thing as by GMT. – Zacky Jan 04 '19 at 02:03
  • I'm a little confused on how $\int_{0}^{\infty}\frac{1}{4x}\cdot\frac{4x^3}{(x^4+1)^2},dx =\int_{0}^{\infty}\frac{1}{4x^2}\left(1-\frac{1}{1+x^4}\right),dx$ after integrating by parts becuase I got $\frac{1}{4x}(\frac{-1}{x^4+1})\vert_{0}^{\infty} - \int_{0}^{\infty}\frac{1}{4x^2(x^4+1)}$ how are these two equivalent? – Jessca Jan 04 '19 at 02:26
  • 3
    @Jessca: it is better to take $1-\frac{1}{1+x^4}$ as antiderivative of $\frac{4x^3}{1+x^4}$, otherwise you end up with the difference of two divergent objects, not very useful. – Jack D'Aurizio Jan 04 '19 at 02:40
3

Consider the integral $$I(a,b)=\int_0^{\pi/2}\sin(x)^a\cos(x)^b\mathrm{d}x$$ Applying the substitution $t=\sin(x)^2$, we see that $$I(a,b)=\frac12\int_0^1t^{\frac{a-1}2}(1-t)^{\frac{b-1}2}\mathrm{d}t$$ $$I(a,b)=\frac12\int_0^1t^{\frac{a+1}2-1}(1-t)^{\frac{b+1}2-1}\mathrm{d}t$$ Recall the definition of the Beta function $$\mathrm B(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\mathrm{d}t=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}$$ Where $\Gamma(s)$ is the Gamma Function.

Hence we see that $$I(a,b)=\frac{\Gamma(\frac{a+1}2)\Gamma(\frac{b+1}2)}{2\Gamma(\frac{a+b}2+1)}$$ From $$\frac{\tan(x)^{1/2}}{\sec(x)^2}=\sin(x)^{1/2}\cos(x)^{3/2}$$ We see that your integral is $$I(1/2,3/2)=\frac{\Gamma(3/4)\Gamma(5/4)}{2\Gamma(2)}$$ $$I(1/2,3/2)=\frac{\Gamma(1/4)\Gamma(3/4)}{8}$$ And from $$\Gamma(s)\Gamma(1-s)=\frac\pi{\sin\pi s},\qquad s\not\in\Bbb Z$$ We have $$I(1/2,3/2)=\frac{\pi}{8\sqrt2}$$

clathratus
  • 18,002
  • 1
    seems fine, but you will need some tool to compute the last expression. Note that $\Gamma(3/4)\Gamma(5/4)=-\frac14\Gamma(-1/4)\Gamma(5/4)$, then you can use the reflection formula –  Jan 04 '19 at 01:54
  • I would maybe at least give the definition of the Gamma function the OP may not be familiar with it – Diffusion Jan 04 '19 at 01:55
  • 1
    you last expression seems wrong, note that $\Gamma(2)=1$ and so $$\frac{\Gamma(3/4)\Gamma(5/4)}{2\Gamma(2)}=\frac{\Gamma(3/4)\Gamma(1/4)}{8}$$ where we used the functional equation $\frac14\Gamma(1/4)=\Gamma(1/4+1)=\Gamma(5/4)$ –  Jan 04 '19 at 02:09
3

Write $$\frac{x^2}{(1+x^4)^2} = \frac{4x^3}{(1+x^4)^2} \cdot \frac{1}{4x}.$$ Then integration by parts with the choice $$u = \frac{1}{4x}, \quad du = -\frac{1}{4x^2} \, dx, \\ dv = \frac{4x^3}{(1+x^4)^2} \, dx, \quad v = -\frac{1}{1+x^4},$$ yields $$I_1(x) = \int \frac{x^2}{(1+x^4)^2} \, dx = -\frac{1}{4x(1+x^4)} - \int \frac{1}{4x^2(1+x^4)} \, dx.$$ Now write $$\frac{1}{x^2(1+x^4)} = \frac{1}{x^2} - \frac{x^2}{1+x^4},$$ thus $$I_1(x) = -\frac{1}{4x(1+x^4)} + \frac{1}{4x} + \frac{1}{4} \int \frac{x^2}{1+x^4} \, dx = \frac{x^3}{4(1+x^4)} + \frac{1}{4} I_2(x),$$ where we now seek to evaluate $I_2(x)$. This is accomplished in a number of ways; one is to perform the factorization $$1+x^4 = (1 + \sqrt{2} x + x^2)(1 - \sqrt{2} x + x^2),$$ and compute the partial fraction decomposition $$\frac{x^2}{1+x^4} = \frac{1}{2\sqrt{2}} \left( \frac{x}{1 - \sqrt{2} x + x^2} - \frac{x}{1 + \sqrt{2} x + x^2} \right).$$ Then each term is integrable in closed form. This is not the easiest or most elegant approach, but it is perhaps the most elementary, requiring no knowledge beyond AP Calculus BC.

heropup
  • 143,828
2

We could do it with contour integration.

take the contour from 0 to R along the real axis.

$\int_0^R \frac {x^2}{(x^4+1)^2} \ dx$

The quater circle.

$\int_0^{\frac \pi 2} \frac {R^2e^2it}{(R^4e^{4it}+1)^2}(iRe^{it}) \ dt$

$\lim_\limits{R\to \infty} \frac {R^2e^2it}{(R^4e^{4it}+1)^2}(iRe^{it}) = 0$

And down the imaginary axis.

$\int_R^0 \frac {(e^{\frac {\pi}{2} i} x)^2}{((e^{\frac {\pi}{2} i} x)^4+1)^2} (e^{\frac {\pi}{2} i})\ dx\\ \int_R^0 \frac {-x^2}{x^4+1)^2} (i)\ dx\\ $

$(1+i)\int_0^\infty \frac {x^2}{(x^4+1)^2} \ dx = (2\pi i) \text{ Res}_{\left(x=e^{\frac\pi4i}\right)}\frac {x^2}{(x^4+1)^2}$

The pole is of order 2.

$\frac {d}{dx}\frac {x^2}{(x^3 + x^2e^{\frac \pi4 i} + xe^{\frac {2\pi}{4} i}+e^{\frac {3\pi}{4} i})^2} = \frac {2x(x^3 + x^2e^{\frac \pi4 i} + xe^{\frac {2\pi}{4} i}+e^{\frac {3\pi}{4} i}) - 2x^2(3x^2 + 2xe^{\frac \pi4 i} + e^{\frac {2\pi}{4} i})}{(x^3 + x^2e^{\frac \pi4 i} + xe^{\frac {2\pi}{4} i}+e^{\frac {3\pi}{4} i})^3}$

Evaluated at $e^{\frac {\pi}{4} i}$

$\frac {4}{(4e^{\frac {3\pi}4 i})^3} = \frac {1}{16e^{\frac {\pi}4 i}}$

$\int_0^\infty \frac {x^2}{(x^4+1)^2} \ dx = \frac {2\pi i}{16\sqrt 2 i} = \frac {\pi}{8\sqrt 2}$

Doug M
  • 58,694
0

Using the method I employed here: we observe that

\begin{equation} \int_{0}^{\infty} \frac{x^2}{\left(x^4 + 1\right)^2}\:dx = \frac{1}{4} \cdot 1^{\frac{2 + 1}{4} - 2} \cdot B\left(2 - \frac{2 + 1}{4}, \frac{2 + 1}{4} \right) = \frac{1}{4}B\left(\frac{5}{4}, \frac{3}{4}\right) \end{equation}

Using the relationship between the Beta and Gamma function:

\begin{align} \int_{0}^{\infty} \frac{x^2}{\left(x^4 + 1\right)^2}\:dx &= \frac{1}{4}B\left(\frac{5}{4}, \frac{3}{4}\right) = \frac{1}{4}\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(\frac{5}{4} + \frac{3}{4}\right)} \\ &= \frac{1}{4}\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{\Gamma\left(2\right)} =\frac{\Gamma\left(\frac{5}{4}\right)\Gamma\left(\frac{3}{4}\right)}{8} \end{align}

0

We first reduce the power 2 in the denominator by integration by parts. $$ \displaystyle \begin{aligned} \int \frac{x^{2}}{\left(x^{4}+1\right)^{2}} d x &=-\frac{1}{4} \int \frac{1}{x} d\left(\frac{1}{x^{4}+1}\right) \\ &\stackrel{ IBP }=-\frac{1}{4 x\left(x^{4}+1\right)}-\frac{1}{4} \int \frac{1}{x^{2}\left(x^{4}+1\right)} d x \\ &=-\frac{1}{4 x\left(x^{4}+1\right)}-\frac{1}{4} \int\left(\frac{1}{x^{2}}-\frac{x^{2}}{x^{4}+1}\right) d x \\ &=-\frac{1}{4 x\left(x^{4}+1\right)}+\frac{1}{4 x}+\frac{1}{4} \int \frac{x^{2}}{x^{4}+1} d x \\ &=\frac{x^{3}}{4\left(x^{4}+1\right)}+\frac{1}{4} \int \frac{x^{2}}{x^{4}+1} d x \end{aligned} $$ $$ \therefore \int_{0}^{\infty} \frac{x^{2}}{\left(x^{4}+1\right)^{2}} d x =\frac{1}{4}\left[\frac{x^{3}}{x^{4}+1}\right]_{0}^{\infty}+\frac{1}{4} \int_{0}^{\infty} \frac{x^{2}}{x^{4}+1} d x = \frac{1}{4} \int_{0}^{\infty} \frac{x^{2}}{x^{4}+1} d x $$ Now we are going to play a little trick on the last integral. $$ \begin{aligned} \int_{0}^{\infty} \frac{x^{2}}{x^{4}+1} d x&=\int_{0}^{\infty} \frac{1}{x^{2}+\frac{1}{x^{2}}} d x \\ &=\frac{1}{2} \int_{0}^{\infty} \frac{\left(1+\frac{1}{x^{2}}\right)+\left(1-\frac{1}{x^{2}}\right)}{x^{2}+\frac{1}{x^{2}}} d x \\ &=\frac{1}{2}\left[\int_{0}^{\infty} \frac{d\left(x-\frac{1}{x}\right)}{\left(x-\frac{1}{x}\right)^{2}+2}+\int_{0}^{\infty} \frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)^{2}-2}\right] \\ &=\frac{1}{2 \sqrt{2}}\left[\tan ^{-1}\left(\frac{x-\frac{1}{x}}{\sqrt{2}}\right)+\frac{1}{4 \sqrt{2}} \ln \left|\frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}}\right|\right]_{0}^{\infty} \\ &=\frac{\pi}{2 \sqrt{2}} \end{aligned} $$ We can now conclude that $$ \boxed{\int_0^{\infty} \frac{x^{2}}{\left(x^{4}+1\right)^{2}} d x =\frac{\pi}{8 \sqrt{2}}}$$

Lai
  • 31,615