2

$$\int^{\pi/2}_{0} \frac{1}{\sin^4x + \cos^4 x} \,dx$$

First I solve the indefinite integral $$\int \frac{1}{\sin^4x + \cos^4 x} \,dx=\frac{\sqrt2}{2}\arctan\Big(\frac{\tan2x}{\sqrt2} \Big)+C$$ by the universal substitution $\tan2x=y$. My question is: when I do this substitution should I bound x around $(-{\pi/4},{\pi/4})$ because arctan function is defined over $(-{\pi/2},{\pi/2})$? And if I bound it like this how to solve the definite integral?

spyer
  • 379

6 Answers6

5

By letting $x=\arctan t$ we have $$ \mathcal{J}=\int_{0}^{\pi/2}\frac{dx}{\sin^4 x+\cos^4 x} = \int_{0}^{+\infty}\frac{1+t^2}{1+t^4}\,dt=2\int_{0}^{1}\frac{1+t^2}{1+t^4}\,dt\\=2\sum_{k\geq 0}\left[\frac{1}{8k+1}+\frac{1}{8k+3}-\frac{1}{8k+5}-\frac{1}{8k+7}\right]$$ and by the reflection formula for the $\psi=\frac{d}{dx}\log\Gamma$ function $$ \sum_{k\geq 0}\left[\frac{1}{8k+1}-\frac{1}{8k+7}\right]=\frac{\pi}{8}\cot\left(\frac{\pi}{8}\right),\qquad \sum_{k\geq 0}\left[\frac{1}{8k+3}-\frac{1}{8k+5}\right]=\frac{\pi}{8}\cot\left(\frac{3\pi}{8}\right)$$ so the final outcome is simply $\mathcal{J}=\frac{\pi}{\sqrt{2}}$.

Jack D'Aurizio
  • 353,855
  • 1
    I was thinking in terms of $$\begin{align}\int_0^{\infty}\frac{1+t^2}{1+t^4}dt&=\frac12\int_0^{\infty}\left(\frac1{\left(\frac1{\sqrt2}-t\right)^2+\frac12}+\frac1{\left(\frac1{\sqrt2}+t\right)^2+\frac12}\right)dt\&=\frac12\int_{1/\sqrt2}^{-\infty}\frac{-du}{u^2+\frac12}+\frac12\int_{1/\sqrt2}^{\infty}\frac{du}{u^2+\frac12}\&=\frac12\int_{-\infty}^{\infty}\frac{du}{u^2+\frac12}\&=\left.\frac12\sqrt2\tan^{-1}(\sqrt2u)\right|_{-\infty}^{\infty}=\frac{\pi}{\sqrt2}\end{align}$$ but there is apparently no end to the symmetries in this integral (+1) – user5713492 Mar 06 '18 at 18:58
  • Another overkill weapon from your arsenal. +1 – Paramanand Singh Mar 06 '18 at 19:08
4

Your antiderivative function $F(x)$ is discontinuous at $x = \tfrac{\pi}{4}$ in the interval $(0,\pi/2)$. So fundamental theorem of calculus has to be applied separately over $(0,\tfrac{\pi}{4})$ and $(\tfrac{\pi}{4}, \tfrac{\pi}{2})$.

$$\int^{\pi/2}_{0} \frac{1}{\sin^4x + \cos^4 x} \,dx = \int^{\pi/4}_{0} \frac{1}{\sin^4x + \cos^4 x} \,dx+ \int^{\pi/2}_{\pi/4} \frac{1}{\sin^4x + \cos^4 x} \,dx \\ = F(\tfrac{\pi}{4}^{-}) - F(0) + F(\tfrac{\pi}{2}) - F(\tfrac{\pi}{4}^+)$$

Here $F(\tfrac{\pi}{4}^{-})$ represents $\lim_{h\to 0^-} F(\tfrac{\pi}{4} +h)$ etc. This should give you answer as $\frac{\pi}{\sqrt 2}$.

Side Note:

Here it is easier to find antiderivative using $\tan^2 x = u.$

King Tut
  • 3,074
  • Yes! I did this. My question is do I need to worry about the intervals when I substitute $tg2x=y, x=\frac{arctany}{2}$ Here x must be between $(-\pi/4, \pi/4)$ but in the definite integral is in $(0,\pi/2)$ – spyer Mar 06 '18 at 16:55
  • If the antiderivative is discontinuous at some point in interval of integration then you cannot directly apply FTC. Also you are not correct when you say that domain is -45 deg to 45 deg. Domain is all reals excluding odd multiples of 45 deg. – King Tut Mar 06 '18 at 17:23
  • But what is the co-domain for arctan? When I do x=arctany / 2 do I need to restrict x? – spyer Mar 06 '18 at 20:34
  • @spyer codomain of commonly defined $\arctan x$ is indeed -90 deg to 90 deg. But domain is all reals! So we only consider the points where the $\tan 2x$ is discontinuous. – King Tut Mar 07 '18 at 02:37
4

One way to address the original integral is to say that $$\begin{align}\int_0^{\pi/2}\frac1{\sin^4x+\cos^4x}dx&=\int_0^{\pi/2}\frac1{\frac14(1-\cos2x)^2+\frac14(1+\cos2x)^2}dx\\ &=2\int_0^{\pi/2}\frac1{1+\cos^22x}dx=\int_0^{\pi}\frac1{1+\cos^2y}dy\\ &=\int_0^{\pi}\frac{dy}{\sin^2y+2\cos^2y}\end{align}$$ Now, $$\int_0^{\pi}\frac{d\theta}{a^2\sin^2\theta+b^2\cos^2\theta}$$ Has been encountered many times on this forum. It's kind of the grapefruit integral in that just about any method we apply to it hits it out of the park. Here, let's do it by folding: $$\begin{align}\int_0^{\pi}\frac{d\theta}{a^2\sin^2\theta+b^2\cos^2\theta}&=\frac12\int_0^{\pi}\frac{d\theta}{a^2\sin^2\theta+b^2\cos^2\theta}+\frac12\int_0^{\pi}\frac{d\theta}{a^2\cos^2\theta+b^2\sin^2\theta}\\ &=\frac12\int_0^{\pi}\frac{(a^2+b^2)d\theta}{a^2b^2\cos^4\theta+(a^4+b^4)\sin^2\theta\cos^2\theta+a^2b^2\sin^4\theta}\\ &=\frac12\int_0^{\pi}\frac{(a^2+b^2)d\theta}{\frac14a^2b^2(1+\cos2\theta)^2+\frac14(a^4+b^4)\sin^22\theta+\frac14a^2b^2(1-\cos2\theta)^2}\\ &=\frac12\int_0^{\pi}\frac{(a^2+b^2)d\theta}{\frac12a^2b^2(\cos^22\theta+\sin^22\theta)+\frac12a^2b^2\cos^22\theta+\frac14(a^4+b^4)\sin^22\theta}\\ &=\frac12\int_0^{\pi}\frac{2d\theta}{\frac12(a^2+b^2)\sin^22\theta+\frac{2a^2b^2}{a^2+b^2}\cos^22\theta}\\ &=\frac12\int_0^{2\pi}\frac{d\phi}{\frac12(a^2+b^2)\sin^2\phi+\frac{2a^2b^2}{a^2+b^2}\cos^2\phi}\\ &=\int_0^{\pi}\frac{d\phi}{\frac12(a^2+b^2)\sin^2\phi+\frac{2a^2b^2}{a^2+b^2}\cos^2\phi}\end{align}$$ So folding has transformed our original $F(a^2,b^2)$ to $F\left(\frac12(a^2+b^2),\frac2{\frac1{a^2}+\frac1{b^2}}\right)$. Since the limit of the arithmetic-harmonic mean is the geometric mean, it follows that $$F(a^2,b^2)=F(ab,ab)=\int_0^{\pi}\frac{d\theta}{ab}=\frac{\pi}{ab}$$ In the instant case, $a=1$, $b=\sqrt2$, so $$\int_0^{\pi/2}\frac1{\sin^4x+\cos^4x}dx=\frac{\pi}{\sqrt2}$$

user5713492
  • 15,938
3

Since the other answers have already pointed out the problem with using a discontinuous antiderivative (see also this related question), let me supply an expression for an antiderivative that is continuous over the real line:

$$\int\frac{\mathrm dx}{\cos^4x+\sin^4x}=\sqrt{2}x-\frac1{\sqrt{2}}\arctan\left(\frac{\left(\sqrt{2}-2\right) \sin (4 x)}{\left(\sqrt{2}-2\right) \cos (4 x)-\sqrt{2}-2}\right)$$

You can verify this relation by differentiating the expression on the right. From here, you can then use the normal evaluation method:

$$\left.\sqrt{2}x-\frac1{\sqrt{2}}\arctan\left(\frac{\left(\sqrt{2}-2\right) \sin (4 x)}{\left(\sqrt{2}-2\right) \cos (4 x)-\sqrt{2}-2}\right)\right|_{x=0}^{x=\pi/2}=\frac{\pi}{\sqrt{2}}$$

3

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,} \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace} \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack} \newcommand{\dd}{\mathrm{d}} \newcommand{\ds}[1]{\displaystyle{#1}} \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,} \newcommand{\ic}{\mathrm{i}} \newcommand{\mc}[1]{\mathcal{#1}} \newcommand{\mrm}[1]{\mathrm{#1}} \newcommand{\pars}[1]{\left(\,{#1}\,\right)} \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,} \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}} \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$ \begin{align} &\bbox[10px,#ffd]{\ds{% \int_{0}^{\pi/2}{\dd x \over \sin^{4}\pars{x} + \cos^{4}\pars{x}}}} = \int_{0}^{\pi/2}{\sec^{2}\pars{x} \over \tan^{4}\pars{x} + 1} \,\sec^{2}\pars{x}\,\dd x \,\,\,\stackrel{\tan\pars{x}\ \mapsto\ x}{=}\,\,\, \int_{0}^{\infty}{x^{2} + 1 \over x^{4} + 1}\,\dd x \\[5mm] & = \int_{0}^{\infty}{1 + x^{-2} \over x^{2} + x^{-2}}\,\dd x = \int_{0}^{\infty}{1 + x^{-2} \over \pars{x - 1/x}^{2} + 2}\,\dd x \,\,\,\stackrel{\pars{x - 1/x}\ \mapsto\ x}{=}\,\,\, \int_{-\infty}^{\infty}{\dd x \over x^{2} + 2} \\[5mm] & \stackrel{x/\root{2}\ \mapsto\ x}{=}\,\,\, {1 \over \root{2}}\int_{-\infty}^{\infty}{\dd x \over x^{2} + 1} = \bbx{{\root{2} \over 2}\,\pi} \approx 2.2214 \end{align}

Felix Marin
  • 89,464
2

It's best to continue your approach. The anti-derivative you have found is $$\frac{1}{\sqrt{2}}\arctan\left(\frac{\tan 2x} {\sqrt{2}}\right)$$ The integrand $f(x) $ satisfies the functional equation $f(\pi/2 - x) =f(x) $ and hence the integral reduces to $$2\int_{0}^{\pi/4}f(x)\,dx$$ and then using the anti-derivative mentioned above we get the answer as $\pi/\sqrt{2}$. That the anti-derivative is valid on the interval $[0,\pi/4)$ and not on $[0,\pi/4]$ is not a major concern because the integral is a proper Riemann integral and thus equal to the limit of integral over $[0,t]$ as $t\to(\pi/4)^{-}$.