7

I have to solve the following integral:

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

I tried expanding it and then by partial fractions but I ended with a ton of terms and messed up. I also tried getting the roots of the binomial for the partial fractions but I got complex roots and got stuck. Is there a trick for this kind of integral or some kind of helpful substitution? Thanks.

EDIT:

I did the following:

Let $x^2=\tan\theta$, then $x = \sqrt{\tan\theta}$ and $dx=\frac{\sec^2\theta}{2x}d\theta$

Then:

$$I=\int\frac{1}{(x^4+1)^2}dx = \int\frac{1}{(\tan^2\theta+1)^2} \frac{\sec^2\theta}{2x}d\theta=\int\frac{1}{\sec^4\theta} \frac{\sec^2\theta}{2x}d\theta$$

$$I=\frac{1}{2}\int{\frac{1}{\sec^2\theta \sqrt{\tan\theta}}}d\theta$$.

After this I don't know how to proceed.

user5713492
  • 16,333

6 Answers6

9

Use $\left(\frac x{x^4+1}\right)' = -\frac3{x^4+1} + \frac 4{(x^4+1)^2} $ to rewrite the integral as

$$I = \int \frac 1{(x^4+1)^2}dx=\frac x{4(x^4+1)}+\frac34\int\frac1{x^4+1} dx$$

where

\begin{align}\int\frac2{x^4+1} dx = &\int\frac{1+x^2}{x^4+1} dx + \int\frac{1-x^2}{x^4+1} dx\\ = & \int\frac{d(x-\frac1{x})}{(x-\frac1{x})^2+2} - \int\frac{d(x+\frac1{x})}{(x+\frac1{x})^2-2}\\ =&\ \frac1{\sqrt2} \tan^{-1}\frac{x^2-1}{\sqrt2x} + \frac1{\sqrt2} \coth^{-1}\frac{x^2+1}{\sqrt2x} \end{align}

Thus

$$I = \frac x{4(x^4+1)}+\frac3{8\sqrt2} \tan^{-1}\frac{x^2-1}{\sqrt2x} + \frac3{8\sqrt2} \coth^{-1}\frac{x^2+1}{\sqrt2x} + C$$

Quanto
  • 120,125
  • Quick check so I think your approach was brilliant but your arithmetic must have gone wrong early on. – user5713492 Feb 07 '20 at 07:39
  • @user5713492 - Appreciate the note and fix it. – Quanto Feb 07 '20 at 12:53
  • OK, but now what do you get for $$\int_{-\infty}^{\infty}\frac{dx}{(x^4+1)^2}$$? – user5713492 Feb 07 '20 at 16:10
  • @user5713492 - you get $2\int_0^\infty \frac 1{(x^4+1)^2}dx = \frac{3\pi}{4\sqrt2}$ – Quanto Feb 07 '20 at 17:53
  • I was just curious, since your technique artificially introduces discontinuities in the primitive, if it offered a natural method for also removing them. – user5713492 Feb 08 '20 at 00:53
  • Thanks. Just one question, how did you rewrote the integral? I kinda get the concept that you used ($\int{fg'}dx=fg-\int{f'g}dx$) but isn't $(\frac{x}{x^4+1})'=\frac{1}{x^4+1}-\frac{3x^4}{(x^4+1)^2}$? Did you multiplied by another function so that it gave the one we're looking for? Thanks again. – Rolando González Feb 08 '20 at 19:04
  • @HGLA420 - you could apply IBP with $\int fg'dx = fg-\int f'gdx$, which would take a few more steps. Using $\left(\frac x{x^4+1}\right)' = -\frac3{x^4+1} + \frac 4{(x^4+1)^2} $ is quicker. I just happen to know this shortcut. But, both lead to the same results. – Quanto Feb 08 '20 at 19:08
  • +1 for your nice answer. why do you have a cotan function shouldnt be a ln function instead Quanto..thanks in advance – user577215664 Feb 09 '20 at 15:19
  • 2
    @Isham - Note $\coth^{-1} x = \frac12 \ln \frac {x+1}{x-1}$, which is a concise way to express the result – Quanto Feb 09 '20 at 15:26
  • Thanks Quanto........... – user577215664 Feb 09 '20 at 15:41
3

I am not aware of a trick. I would just write $x^4+1$ as $\left(x^2+\sqrt2x+1\right)\left(x^2-\sqrt2x+1\right)$ and then I would write$$\frac1{(x^4+1)^2}$$as$$\frac{Ax+B}{x^2+\sqrt2x+1}+\frac{Cx+D}{\left(x^2+\sqrt2x+1\right)^2}+\frac{Ex+F}{x^2-\sqrt2x+1}+\frac{Gx+H}{\left(x^2-\sqrt2x+1\right)^2}.$$

3

One way to go is to expand into linear factors. Let $\omega_k=\exp(\pi i(2k+1)/4)$, so $\omega_k^4=-1$ and $$\frac1{(x^4+1)^4}=\sum_{k=0}^3\left(\frac{A_k}{(x-\omega_k)^2}+\frac{B_k}{x-\omega_k}\right)$$ Then $$A_k=\lim_{x\rightarrow\omega_k}\frac{(x-\omega_k)^2}{(x^4+1)^2}=\left(\lim_{x\rightarrow\omega_k}\frac{x-\omega_k}{x^4+1}\right)^2=\left(\frac1{4\omega_k^3}\right)^2=\left(\frac{-\omega_k}{4}\right)^2=\frac{\omega_k^2}{16}$$ and $$\begin{align}B_k&=\lim_{x\rightarrow\omega_k}\frac d{dx}\frac{(x-\omega_k)^2}{(x^4+1)^2}\\ &=\lim_{x\rightarrow\omega_k}2\frac{(x-\omega_k)}{(x^4+1)}\frac{\left(x^4+1-4x^3(x-\omega_k)\right)}{(x^4+1)^2}\\ &=2\left(\frac{-\omega_k}4\right)\lim_{x\rightarrow\omega_k}\frac{-12x^2(x-\omega_k)}{8x^3(x^4+1)}\\ &=2\left(\frac{-\omega_k}4\right)\left(\frac{-3}{2\omega_k}\right)\left(\frac{-\omega_k}4\right)=\frac{-3\omega_k}{16}\end{align}$$ So now $$\begin{align}\int\frac{dx}{(x^4+1)^2}&=\frac1{16}\sum_{k=0}^3\int\left(\frac{\omega_k^2}{(x-\omega_k)^2}-\frac{3\omega_k}{x-\omega_k}\right)dx\\ &=\frac1{16}\sum_{k=0}^3\left(\frac{-\omega_k^2}{x-\omega_k}-3\omega_k\ln(x-\omega_k)\right)+C\end{align}$$ Now, $\omega_{3-k}=\omega_k^*$ and $$\frac{-\omega_k^2}{x-\omega_k}+\frac{-\left(\omega_k^*\right)^2}{x-\omega_k^*}=\frac{-\left(\omega_k^2+\left(\omega_k^*\right)^2\right)x+\omega_k+\omega_k^*}{x^2-\left(\omega_k+\omega_k^*\right)x+1}=\frac{2\cos\frac{\pi(2k+1)}{4}}{x^2-2x\cos\frac{\pi(2k+1)}{4}+1}$$ Also $$\begin{align}-\omega_k\ln(x-\omega_k)-\omega_k^*\ln(x-\omega_k^*)&=-\frac12(\omega_k+\omega_k^*)\left(\ln(x-\omega_k)+\ln(x-\omega_k^*)\right)\\ &\quad-\frac12(\omega_k-\omega_k^*)\left(\ln(x-\omega_k)-\ln(x-\omega_k^*)\right)\\ &=-\cos\frac{\pi(2k+1)}4\ln\left(x^2-2x\cos\frac{\pi(2k+1)}4+1\right)\\ &\quad-i\sin\frac{\pi(2k+1)}4\left(-2i\tan^{-1}\left(\frac{\sin\frac{\pi(2k+1)}4}{x-\cos\frac{\pi(2k+1)}4}\right)\right)\end{align}$$ So that $$\begin{align}\int\frac{dx}{(x^4+1)^2}&=\frac1{16}\left\{\frac{\sqrt2}{x^2-\sqrt2\,x+1}-\frac{\sqrt2}{x^2+\sqrt2\,x+1}\right.\\ &\quad-\frac3{\sqrt2}\ln\left(x^2-\sqrt2\,x+1\right)+\frac3{\sqrt2}\ln\left(x^2+\sqrt2\,x+1\right)\\ &\quad\left.-3\sqrt2\tan^{-1}\left(\frac1{\sqrt2\,x-1}\right)-3\sqrt2\tan^{-1}\left(\frac1{\sqrt2\,x+1}\right)\right\}+C\\ &=\frac x{4{(x^4+1)}}+\frac3{16\sqrt2}\ln\left(\frac{x^2+\sqrt2\,x+1}{x^2-\sqrt2\,x+1}\right)-\frac{3\sqrt2}{16}\tan^{-1}\left(\frac{\sqrt2\,x}{x^2-1}\right)+C\end{align}$$ Quick check

EDIT: There is a problem with the above expression in that it is discontinuous when $x=\pm1$. To fix this, note that $$\begin{align}\tan^{-1}y&=2\tan^{-1}\left(\tan\frac12\tan^{-1}y\right)=2\tan^{-1}\left(-\frac1y+\sqrt{\frac1{y^2}-1}\right)\\ &=2\tan^{-1}\frac{\sqrt2\,x}{\sqrt{x^4+1}-x^2+1}\end{align}$$ For the angle we taking taking inverse tangent of above, so $$\begin{align}\int\frac{dx}{(x^4+1)^2}&=\frac x{4{(x^4+1)}}+\frac3{16\sqrt2}\ln\left(\frac{x^2+\sqrt2\,x+1}{x^2-\sqrt2\,x+1}\right)\\ &\quad-\frac{3}{4\sqrt2}\tan^{-1}\left(\frac{\sqrt2\,x}{\sqrt{x^4+1}+x^2-1}\right)+C\end{align}$$ Check again

EDIT: I was trying so hard to avoid the discontinuity at $x=0$ that I made it even worse. I should have gone with $$\begin{align}\tan^{-1}\left(\frac1{\sqrt2\,x-1}\right)+\tan^{-1}\left(\frac1{\sqrt2\,x+1}\right)&=\tan^{-1}\left(\frac{\sqrt2\,x}{x^2-1}\right)\\ &=2\tan^{-1}\left(\frac{-1+\sqrt{1+\left(\frac{\sqrt2\,x}{x^2-1}\right)^2}}{\left(\frac{\sqrt2\,x}{x^2-1}\right)}\right)\\ &=2\tan^{-1}\left(\frac{-x^2+1-\sqrt{x^4+1}}{\sqrt2\,x}\right)\\ &=2\tan^{-1}\left(\left(-\frac x{\sqrt2}\right)\left(1+\frac{x^2}{\sqrt{x^4+1}}\right)\right)\end{align}$$ Where I would finally have gotten rid of all discontinuities at $x\in\{-1,0,1\}$ or stayed with $$\tan^{-1}\left(\frac1{\sqrt2\,x-1}\right)+\tan^{-1}\left(\frac1{\sqrt2\,x+1}\right)=-\tan^{-1}(\sqrt2\,x-1)-\tan^{-1}(\sqrt2\,x+1)$$ and avoided the combination of arctangents entirely. By avoiding the discontinuities I can get an expression that evaluates $$\int_{-\infty}^{\infty}\frac{dx}{(x^4+1)^2}=\frac{3\pi\sqrt2}8$$ correctly.

user5713492
  • 16,333
2

Hints:

$$\frac1{(x^4+1)^2}=\frac{x^4+1-x^4}{(x^4+1)^2}=\frac1{x^4+1}-\frac{x^4}{(x^4+1)^2}$$ and by parts

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

This way we can get rid of the square at the denominator, and we are left with

$$\frac1{x^4+1}.$$

Now using the factorization of the quartic binomial,

$$\frac{\sqrt8}{x^4+1}=\frac{x+\sqrt2}{x^2+\sqrt2x+1}-\frac{x-\sqrt2}{x^2-\sqrt2x+1}.$$

Here, by completing the square, we can handle the terms $\sqrt2x$ in the denominators, and solve with terms $\log(x^2\pm\sqrt2x+1)$ and $\arctan(\sqrt2x\pm1)$.

2

We first decrease the power 2 using integration by parts. $$\begin{aligned} \int \frac{d x}{\left(1+x^{4}\right)^{2}} &=-\frac{1}{4}\int \frac{1}{x^{3}} d\left(\frac{1}{1+x^{4}}\right) \\ &=-\frac{1}{4}\left[\frac{1}{x^{3}\left(1+x^{4}\right)}+3 \int \frac{d x}{x^{4}\left(1+x^{4}\right)}\right] \\ &=-\frac{1}{4}\left[\frac{1}{x^{3}\left(1+x^{4}\right)}-\frac{1}{x^{3}}-3\int \frac{d x}{1+x^{4}}\right] \\ &=\frac{x}{4\left(1+x^{4}\right)}+\frac{3}{4} \int \frac{d x}{1+x^{4}} \end{aligned}$$

By my post,

$$\int \frac { d x } { x ^ { 4 } + 1 } = \frac { 1 } { 4 \sqrt { 2 } } \left[ 2 \tan ^ { - 1 } \left( \frac { x ^ { 2 } - 1 } { \sqrt { 2 } x } \right) + \ln \left| \frac { x ^ { 2 } + \sqrt { 2 } x + 1 } { x ^ { 2 } - \sqrt { 2 } x + 1 } \right|\right] + C,$$ we get$$ \int \frac{d x}{\left(1+x^{4}\right)^{2}}=\frac{x}{4\left(1+x^{4}\right)}+\frac{3}{16 \sqrt{2}}\left[2 \tan ^{-1}\left(\frac{x^{2}-1}{\sqrt{2} x}\right)+\ln \left|\frac{x^{2}+\sqrt{2} x+1}{x^{2}-\sqrt{2} x+1}\right|\right]+C $$

Lai
  • 31,615
0

Consider the function:

$$\mathcal I(a)=\int_c^x\frac{\mathrm dt}{t^4+a^4}\tag{1}$$

where $c\in\mathbb R$ such that it is a root of the primitive function without the arbitrary constant(see below). This integral is easily doable(albeit slightly tedious) and comes out to be:

$$\mathcal I(a)=\frac1{2\sqrt2}\tan^{-1}\left(\frac{x^2-a^2}{\sqrt2ax}\right)+\frac1{4\sqrt2}\ln\left|\frac{x^2-\sqrt2ax+a^2}{x^2+\sqrt2ax+a^2}\right|\tag{2}$$

which can also be expressed in terms of the inverse hyperbolic tangent function when $\frac{x^2+a^2}{\sqrt2ax}$ is in $(-1,1)$, and when not, in terms of inverse hyperbolic cotangent.

$\mathcal I’(a)$ can be obtained in $2$ ways:

$1.$ $\textbf{From $(1)$:}$

$$\mathcal I’(a)=-4a^3 \int_c^x\frac{\mathrm dt}{(t^4+a^4)^2}$$

$2.$ $\textbf{From $(2)$:}$

$$\mathcal I’(a)=\frac{\mathrm d}{\mathrm da}\left(\frac1{2\sqrt2}\tan^{-1}\left(\frac{x^2-a^2}{\sqrt2ax}\right)+\frac1{4\sqrt2}\ln\left|\frac{x^2-\sqrt2ax+a^2}{x^2+\sqrt2ax+a^2}\right|\right)=\cdots$$

This differentiation will be somewhat tedious but the mess can be reduced by rewriting it as:

$$\mathcal I’(a)=\begin{cases}\frac{\mathrm d}{\mathrm da}\left(\frac1{2\sqrt2}\tan^{-1}\left(\frac{\frac{x}{a}-\frac{a}{x}}{\sqrt2}\right)+\frac1{2\sqrt2}\tanh^{-1}\left(\frac{\frac{x}{a}+\frac{a}{x}}{\sqrt2}\right)\right), \frac{x^2+a^2}{\sqrt2ax}\in(-1,1)\\ \frac{\mathrm d}{\mathrm da}\left(\frac1{2\sqrt2}\tan^{-1}\left(\frac{\frac{x}{a}-\frac{a}{x}}{\sqrt2}\right)+\frac1{2\sqrt2}\coth^{-1}\left(\frac{\frac{x}{a}+\frac{a}{x}}{\sqrt2}\right)\right), \frac{x^2+a^2}{\sqrt2ax}\in(-\infty,-1)\cup(1,\infty)\end{cases}$$

Since the derivatives of $\tanh^{-1}x$ and $\coth^{-1}x$ are the same, the final expression for $\mathcal I’(a)$ will be a single continuous function and not piecewise.

Then, compare the $2$ results, use the $2^\text{nd}$ part of the FTC to transform $\mathcal I(a)$ into an indefinite integral, and finally put $a=1$ to obtain the answer to your integral.

Integreek
  • 8,530