# calculation of $\int\frac{1}{\sin^3 x+\cos^3 x}dx$ and $\int\frac{1}{\sin^5 x+\cos^5x}dx$

Solve the following indefinite integrals:

\begin{align} &(1)\;\;\int\frac{1}{\sin^3 x+\cos^3 x}dx\\ &(2)\;\;\int\frac{1}{\sin^5 x+\cos^5 x}dx \end{align}

My Attempt for $(1)$:

\begin{align} I &= \int\frac{1}{\sin^3 x+\cos ^3 x}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^2 x+\cos ^2 x-\sin x \cos x\right)}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x\right)}\;dx\\ &= \frac{1}{3}\int \left(\frac{2}{\left(\sin x+\cos x\right)}+\frac{\left(\sin x+\cos x \right)}{\left(1-\sin x\cos x\right)}\right)\;dx\\ &= \frac{2}{3}\int\frac{1}{\sin x+\cos x}\;dx + \frac{1}{3}\int\frac{\sin x+\cos x}{1-\sin x\cos x}\;dx \end{align}

Using the identities

$$\sin x = \frac{2\tan \frac{x}{2}}{1+\tan ^2 \frac{x}{2}},\;\cos x = \frac{1-\tan ^2 \frac{x}{2}}{1+\tan^2 \frac{x}{2}}$$

we can transform the integral to

$$I = \frac{1}{3}\int\frac{\left(\tan \frac{x}{2}\right)^{'}}{1-\tan^2 \frac{x}{2}+2\tan \frac{x}{2}}\;dx+\frac{2}{3}\int\frac{\left(\sin x- \cos x\right)^{'}}{1+(\sin x-\cos x)^2}\;dx$$

The integral is easy to calculate from here.

My Attempt for $(2)$:

\begin{align} J &= \int\frac{1}{\sin^5 x+\cos ^5 x}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(\sin^4 x -\sin^3 x\cos x+\sin^2 x\cos^2 x-\sin x\cos^3 x+\cos^4 x\right)}\;dx\\ &= \int\frac{1}{(\sin x+\cos x)(1-2\sin^2 x\cos^2 x-\sin x\cos x+\sin^2 x\cos^2 x)}\;dx\\ &= \int\frac{1}{\left(\sin x+\cos x\right)\left(1-\sin x\cos x-\left(\sin x\cos x\right)^2\right)}\;dx \end{align}

How can I solve $(2)$ from this point?

• Have you tried Maple or Mathematica? Commented Dec 6, 2013 at 7:09

Given $$\displaystyle \int\frac{1}{\sin^5 x+\cos^5 x}dx$$

First we will simplify $$\sin^5 x+\cos^5 x = \left(\sin^2 x+\cos^2 x\right)\cdot \left(\sin^3 x+\cos^3 x\right) - \sin ^2x\cdot \cos ^2x\left(\sin x+\cos x\right)$$

$$\displaystyle \sin^5 x+\cos^5 x= (\sin x+\cos x)\cdot (1-\sin x\cdot \cos x-\cos^2 x\cdot \sin^2x)$$

So Integral is $$\displaystyle \int\frac{1}{\sin^5 x+\cos^5 x}dx$$

$$\displaystyle = \int\frac{1}{(\sin x+\cos x)\cdot (1-\sin x\cdot \cos x-\cos^2 x\cdot \sin^2x)}dx$$

$$\displaystyle = \int \frac{(\sin x+\cos x)}{(\sin x+\cos x)^2\cdot (1-\sin x\cdot \cos x-\cos^2 x\cdot \sin^2x)}dx$$

$$\displaystyle = \int \frac{(\sin x+\cos x)}{(1+\sin 2x)\cdot (1-\sin x\cdot \cos x-\cos^2 x\cdot \sin^2x)}dx$$

Let $$(\sin x-\cos x) = t\;,$$ Then $$(\cos +\sin x)dx = dt$$ and $$(1-\sin 2x) = t^2\Rightarrow (1+\sin 2x) = (2-t^2)$$

So Integral Convert into $$\displaystyle = 4\int\frac{1}{(2-t^2)\cdot(5-t^4)}dt = 4\int\frac{1}{(t^2-2)\cdot (t^2-\sqrt{5})\cdot (t^2+\sqrt{5})}dt$$

Now Using partial fraction, we get

$$\displaystyle = 4\int \left[\frac{1}{2-t^2}+\frac{1}{(2-\sqrt{5})\cdot 2\sqrt{5}\cdot (\sqrt{5}-t^2)}+\frac{1}{(2+\sqrt{5})\cdot 2\sqrt{5}\cdot (\sqrt{5}+t^2)}\right]dt$$

$$= \displaystyle \sqrt{2}\ln \left|\frac{\sqrt{2}+t}{\sqrt{2}-t}\right|+\frac{1}{(2-\sqrt{5})\cdot 5^{\frac{3}{4}}}\cdot \ln \left|\frac{5^{\frac{1}{4}}+t}{5^{\frac{1}{4}}-t}\right|+\frac{2}{(2+\sqrt{5})\cdot 5^{\frac{3}{4}}}\cdot \tan^{-1}\left(\frac{t}{5^{\frac{1}{4}}}\right)+\mathbb{C}$$

where $$t=(\sin x-\cos x)$$

$\newcommand{\+}{^{\dagger}}% \newcommand{\angles}[1]{\left\langle #1 \right\rangle}% \newcommand{\braces}[1]{\left\lbrace #1 \right\rbrace}% \newcommand{\bracks}[1]{\left\lbrack #1 \right\rbrack}% \newcommand{\ceil}[1]{\,\left\lceil #1 \right\rceil\,}% \newcommand{\dd}{{\rm d}}% \newcommand{\ds}[1]{\displaystyle{#1}}% \newcommand{\equalby}[1]{{#1 \atop {= \atop \vphantom{\huge A}}}}% \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}% \newcommand{\fermi}{\,{\rm f}}% \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}% \newcommand{\half}{{1 \over 2}}% \newcommand{\ic}{{\rm i}}% \newcommand{\iff}{\Longleftrightarrow} \newcommand{\imp}{\Longrightarrow}% \newcommand{\isdiv}{\,\left.\right\vert\,}% \newcommand{\ket}[1]{\left\vert #1\right\rangle}% \newcommand{\ol}[1]{\overline{#1}}% \newcommand{\pars}[1]{\left( #1 \right)}% \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}} \newcommand{\pp}{{\cal P}}% \newcommand{\root}[2][]{\,\sqrt[#1]{\,#2\,}\,}% \newcommand{\sech}{\,{\rm sech}}% \newcommand{\sgn}{\,{\rm sgn}}% \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}} \newcommand{\ul}[1]{\underline{#1}}% \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}$ $\large\tt\mbox{Just a hint:}$ Write $$\int{\cos\pars{x}\,\dd x \over \cos\pars{x}\sin^{3}\pars{x} + \cos^{4}\pars{x}} = \int{\dd z \over \root{1 - z^{2}}z^{3} + \bracks{1 - z^{2}}^{2}} \quad\mbox{with}\quad z \equiv \sin\pars{x}$$ Use an Euler substitution: $\root{1 - z^{2}} \equiv t + \ic z$ which yields $1 - z^{2} = t^{2} + 2t\ic z - z^{2}$ such that $\ds{z = {1 - t^{2} \over 2t\ic}}$: \begin{align} \root{1 - z^{2}}&=t + {1 - t^{2} \over 2t} = {1 + t^{2} \over 2t} \\[3mm] \dd z&= {\pars{-2t}\pars{2t\ic} - \pars{2\ic}\pars{1 - t^{2}} \over -4t^{2}}\,\dd t = \ic\,{t^{2} + 1 \over 2t^{2}}\,\dd t \end{align} \begin{align} \int&=\int{1 \over \bracks{\pars{1 + t^{2}}/2t}\bracks{\pars{1 - t^{2}}/2t}^{3}\pars{-1/\ic} + \bracks{\pars{1 + t^{2}}/2t}^{4}} \,\ic\,{t^{2} + 1 \over 2t^{2}}\,\dd t \\[3mm]&=-8\int{t^{2} \over -\pars{1 - t^{2}}^{3} + \ic\pars{1 + t^{2}}^{3}}\,\dd t \end{align}

For the second integral, decompose the integrand as follows \begin{align} &\frac52\int\frac{1}{\sin^5 x+\cos^5 x}dx\\ =&\int\frac{2}{\sin x+\cos x}-\frac{\sin x + \cos x}{2\sin x\cos x-\sec\frac{\pi}5} -\frac{\sin x + \cos x}{2\sin x\cos x -\sec\frac{3\pi}5}\ dx\\ =&\sqrt2\tanh^{-1}\frac {\sin x- \cos x}{\sqrt2} -\frac{1}{\sqrt{1-\sec\frac{3\pi}5}}\tanh^{-1}\frac{\sin x- \cos x}{\sqrt{1-\sec\frac{3\pi}5}}\\ &\hspace{4.5cm} +\frac{1}{\sqrt{\sec\frac{\pi}5-1}}\tan^{-1}\frac{\sin x- \cos x}{\sqrt{\sec\frac{\pi}5-1}} \end{align} Specifically \begin{align} &\int_0^{\pi/2} \frac{1}{\sin^5 x+\cos^5 x}dx\\ =&\ \frac45\bigg(\sqrt2\coth^{-1}\sqrt2 -\frac{\coth^{-1}\sqrt{\sqrt5+2}}{\sqrt{\sqrt5+2}} +\frac{\cot^{-1}\sqrt{\sqrt5-2}}{\sqrt{\sqrt5-2}}\bigg) \end{align}

By factorisation of \begin{aligned} \sin ^5 x+\cos ^5 x= & \left(\sin ^2 x+\cos ^2 x\right)\left(\sin ^3 x+\cos ^3 x\right) -\sin ^2 x \cos ^2 x(\sin x+\cos x) \\ = & (\sin x+\cos x)\left(1-\sin x \cos x-\sin ^2 x \cos ^2 x\right), \end{aligned} we have $$J=\int \frac{1}{\sin ^5 x+\cos ^5 x} d x=\int \frac{\sin x+\cos x}{(\sin x+\cos x)^2\left(1-\sin x \cos x-\sin ^2x \cos ^2 x\right)} d x$$ Noting that letting $$t=\sin x-\cos x$$, then $$dt=(\cos x+\sin x)dx$$ and $$\sin x \cos x=\frac{1-t^2}{2}$$ yields \begin{aligned}J&=4 \int \frac{d t}{\left(t^2-2\right)\left(t^4-4 t^2-1\right)}\\&= \frac{4}{5} \int\left(\frac{-1}{t^2-2}+\frac{1}{t^2+\sqrt{5}-2}+\frac{1}{t^2-\sqrt{5}-2}\right) d t \\&=\frac{4}{5}\left[-\frac{1}{\sqrt{2}} \tanh ^{-1}\left(\frac{t}{\sqrt{2}}\right)+\frac{1}{\sqrt{\sqrt 5-2}} \tan ^{-1}\left(\frac{t}{\sqrt{\sqrt{5}-2}}\right)-\frac{1}{\sqrt{\sqrt{5}+2}} \tanh ^{-1}\left(\frac{t}{\sqrt{\sqrt{5}+2}}\right)\right]+C\\ &\boxed{J=\frac{4}{5}\left[-\frac{1}{\sqrt{2}} \tanh ^{-1}\left(\frac{\sin x-\cos x}{\sqrt{2}}\right)+\frac{1}{\sqrt{\sqrt 5-2}} \tan ^{-1}\left(\frac{\sin x-\cos x}{\sqrt{\sqrt{5}-2}}\right)\qquad\qquad -\frac{1}{\sqrt{\sqrt{5}+2}} \tanh ^{-1}\left(\frac{\sin x-\cos x}{\sqrt{\sqrt{5}+2}}\right)\right]+C}\end{aligned}

\begin{aligned} \int \frac{1}{\sin ^3 x+\cos ^3 x} d x = & \int \frac{1}{(\sin x+\cos x)(1-\sin x \cos x)} d x \\ = & \int \frac{(\sin x+\cos x) d x}{(1+2 \sin x \cos x)(1-\sin x \cos x)} \\ = & 2 \int \frac{d y}{\left(2-y^2\right)\left(1+y^2\right)} \textrm {, where } y=\sin x-\cos x \\ = & \frac{2}{3} \int\left(\frac{1}{2-y^2}+\frac{1}{1+y^2}\right) d y \\ = & \frac{2}{3}\left[\frac{1}{2 \sqrt{2}} \ln \left|\frac{\sqrt{2}+y}{\sqrt{2}-y}\right|+\tan ^{-1} y\right]+C \\ = & \frac{2}{3}\left[\frac{1}{2 \sqrt{2}} \ln \left|\frac{\sqrt{2}+\sin x-\cos x}{\sqrt{2}-\sin x+\cos x}\right|+\tan ^{-1}(\sin x-\cos x)\right] +C \end{aligned}

I am not sure how you can continue either (the second term in the denominator can be expressed as $1-\sin(2 x)/2 - \sin^2(2x)/4,$ but I am not aware of any double angle formula for $\sin x + \cos x.$ The simplest approach to your integral is to use the feared $u = \tan \frac{x}2$ substitution, which reduces the integral to a rational function integral....

\displaystyle \begin{aligned}\int \frac{1}{\sin ^3 x+\cos ^3 x} d x & =\frac{1}{3} \int \left(\frac{2}{\sin x+\cos x}+\frac{\sin x+\cos x}{\sin ^2 x-\sin x \cos x+\cos ^2 x}\right) d x \\& =\frac{2}{3} J+\frac{1}{3} K \\\\J&=\int \frac{1}{\sin x+\cos x} d x \\& =\frac{1}{\sqrt{2}} \int \frac{d x}{\cos \left(x-\frac{\pi}{4}\right)} \\& =\frac{1}{\sqrt{2}} \ln\left|\sec \left(x-\frac{\pi}{4}\right)+\tan \left(x-\frac{\pi}{4}\right) \right|+c_1 \\\\K&=2 \int \frac{\sin x+\cos x}{2-2 \sin x \cos x} d x \\& =2 \int \frac{d(\sin x-\cos x)}{1+(\sin x-\cos x)^2} \\& =2 \tan ^{-1}(\sin x-\cos x)+c_2 \\\\\therefore \int \frac{1}{\sin ^3 x+\cos ^3 x} d x &=\frac{\sqrt{2}}{3} \ln \left|\sec \left(x-\frac{\pi}{4}\right)+\tan \left(x-\frac{\pi}{4}\right) \right|+2 \tan ^{-1}(\sin x-\cos x)+C \\& =\frac{\sqrt{2}}{3} \ln \left|\frac{\sqrt{2}+\sin x-\cos x}{\cos x+\sin x}\right|+\frac{2}{3} \tan ^{-1}(\sin x-\cos x)+C \\&\end{aligned}\tag*{}