# Evaluate trigonometric integral $\int_{0}^{\pi / 2} \frac{x^{3} \cos x }{3 \sin x-\sin 3 x}dx$

Evaluate: $$\int_{0}^{\pi / 2} \frac{x^{3} \cos x d x}{3 \sin x-\sin 3 x}$$

Here I can see that the denominator nicely converts into $$4\sin^{3}{x}$$ so I basically get $$\int_{0}^{\pi / 2}\left(\frac{x}{\sin x}\right)^{3} \cos x\>{dx}$$ After that I tried substituting $$\sin{x}$$ as $$u$$ but that only complicates the problem further, leaving me with an inverse function to deal with. Also, the King's property is not useful here.

Can anyone provide an alternate approach to this question?

• Apply integration by parts.
– V.G
Jul 27, 2020 at 17:54
• But here I am again stuck on an integral like this $$\int\frac{{X}^{2}}{\sin^{2}{X}}$$ and $$\int\frac{{X}^{3}\cos{x}}{\sin^{2}{X}}$$ Jul 27, 2020 at 17:58
• No.... take one function as $x^3$ and other one as $\dfrac{\cos x}{\sin^3x}\mathrm{d}x$ and apply it repeatedly $3$ times.
– V.G
Jul 27, 2020 at 17:59
• Ok, got it, thanks Jul 27, 2020 at 18:01

Integrate by parts $$I= \int_{0}^{\pi / 2}\left(\frac{x}{\sin x}\right)^{3} d(\sin x ) =\frac{\pi^3}{8}+ 3I - 3\int_{0}^{\pi / 2}x^2\csc^2xdx$$ Integrate the last term by parts again

$$\int_{0}^{\pi / 2}x^2\csc^2x dx= 2\int_{0}^{\pi / 2}x\cot xdx =- 2\int_{0}^{\pi / 2}\ln\sin xdx=\pi\ln2$$

Thus, $$I= \frac{3\pi}2\ln2-\frac{\pi^3}{16}$$ and

$$\int_{0}^{\pi / 2} \frac{x^{3} \cos x d x}{3 \sin x-\sin 3 x} = \frac14 I= \frac{3\pi}8\ln2-\frac{\pi^3}{64}$$

——————

Note $$\begin{eqnarray*} \int_{0}^{\pi/2}\ln\sin x\,dx &=&\frac12\int_{0}^{\pi}\ln\sin x\,dx =\int_{0}^{\pi/2}\ln\sin(2t)dt\\&=&\frac\pi2\ln2+\int_{0}^{\pi/2}\ln\sin tdt+\int_{0}^{\pi/2}\ln\cos tdt\\&=&\frac\pi2\ln2+ 2 \int_{0}^{\pi/2}\ln\sin x dx = - \frac\pi2\ln2 \end{eqnarray*}$$

Let us do repeated integration by parts: $$\int x^3 f(x) dx=x^3 I^{(1)}(x)-3x^2I^{(2)}(x)+6xI^{(3)}(x)-6I^{(4)}(x)~~~~(1)$$ Here $$I^{(k)}(x)$$ denotes $$k$$th integration of $$f(x)=\frac{\cos x}{\sin ^3 x}$$, We have $$I^{(1)}(x)=-\frac{1}{2} \cot^2 x, I^{(2)}(x)=-\frac{1}{2}(-x-\cot x), I^{(3)}(x)=-\frac{1}{2}(-x^2/2-\ln(\sin x))$$ $$\implies I^{(4)}(x)=-\frac{1}{2}(-x^4/6-\int \ln \sin x) dx$$ Using $$\int_{0}^{\pi/2} \ln\sin x dx=-\frac{\pi}{2} \ln 2$$ and putting these expressions in (1), we get $$\int_{0}^{\pi/2} \frac{x^3 \cos x}{\sin^3 x}dx=\frac{3\pi}{2}\ln 2-\frac{\pi^3}{16}$$

$$\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]{\int_{0}^{\pi/2}{x^{3}\cos\pars{x} \over 3\sin\pars{x} - \sin\pars{3x}}\,\dd x} = {1 \over 4}\int_{0}^{\pi/2}x^{3}\,{\cos\pars{x} \over \sin^{3}\pars{x}}\,\dd x \\[5mm] = &\ -\,{1 \over 8}\int_{x\ =\ 0}^{x\ =\ \pi/2}x^{3}\,\dd\bracks{1 \over \sin^{2}\pars{x}} = -\,{\pi^{3} \over 64} + {3 \over 8} \color{#00f}{\bf\int_{0}^{\pi/2}{x^{2} \over \sin^{2}\pars{x}}\,\dd x} \label{1}\tag{1} \end{align}

\begin{align} &\color{#00f}{\bf\int_{0}^{\pi/2}{x^{2} \over \sin^{2}\pars{x}} \,\dd x} = \left.\Re\int_{x\ =\ 0}^{x\ =\ \pi/2}{\bracks{-\ic\ln\pars{z}}^{\, 2} \over \bracks{\pars{z - 1/z}/\pars{2\ic}}^{\, 2}} {\dd z \over \ic z}\,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[5mm] = &\ \left.4\,\Im\int_{x\ =\ 0}^{x\ =\ \pi/2}{z\ln^{2}\pars{z} \over \pars{z^{2} - 1}^{\, 2}}\,\dd z\,\right\vert_{\ z\ =\ \exp\pars{\ic x}} \\[5mm] = &\ -\,4\,\Im\int_{1}^{0}{\ic y\,\bracks{\ln\pars{y} + \ic\pi/2}^{\, 2} \over \pars{\ic^{2}y^{2} - 1}^{\, 2}}\,\ic\,\dd y \\[5mm] = &\ -\,4\pi\int_{0}^{1}{y\ln\pars{y}\over \pars{1 + y^{2}}^{\, 2}}\,\dd y = -\,\pi\int_{0}^{1}{\ln\pars{y}\over \pars{1 + y}^{\, 2}}\,\dd y = \pi\ln\pars{2} \end{align} (\ref{1}) becomes $$\ds{\ \bbox[#ffd,10px,border:1px solid navy]{{3 \over 8}\,\pi\ln\pars{2} - {\pi^{3} \over 64}}}$$ $$\ds{\ \approx\ 0.3321}$$

\begin{align} \int_{0}^{1}{\ln\pars{y}\over \pars{1 + y}^{\, 2}}\,\dd y & = \lim_{\epsilon \to 0^{+}}\bracks{\ln\pars{\epsilon} + \int_{\epsilon}^{1}{\dd y \over y\pars{1 + y}}} \\[5mm] & = \lim_{\epsilon \to 0^{+}}\bracks{\ln\pars{\epsilon} + \int_{\epsilon}^{1}{\dd y \over y} - \int_{\epsilon}^{1}{\dd y \over 1 + y}} = -\ln\pars{2} \end{align}

\begin{aligned} & \int_{0}^{\frac{x}{2}} \frac{x^{2} \cos x}{3 \sin x-\sin 3 x} d x \\ =& \int_{0}^{\frac{\pi}{2}} \frac{x^{3} \cos x}{3 \sin x-3 \sin x+4 \sin ^{3} x} \\ =& \frac{1}{4} \int_{0}^{\frac{\pi}{2}} \frac{x^{3} \cos x}{\sin ^{3} x} d x \\ =&-\frac{1}{8} \int_{0}^{\frac{\pi}{2}} x^{3} d\left(\frac{1}{\sin ^{2} x}\right) \\ =&-\left[\frac{x^{3}}{8 \sin ^{2} x}\right]_{0}^{\frac{\pi}{2}}+\frac{3}{8} \int_{0}^{\frac{\pi}{2}} \frac{x^{2}}{\sin ^{2} x} d x \\ =&-\frac{\pi^{3}}{64}+\frac{3}{8} \int_{0}^{\frac{\pi}{2}} \frac{x^{2}}{\sin ^{2} x} d x \\ =& \frac{3 \pi \ln 2}{8}-\frac{\pi^{3}}{64}\quad (\textrm{ Using } \int_{0}^{\frac{\pi}{2}} \frac{x^{2}}{\sin ^{2} x} d x=\pi \ln 2)\\ \end{aligned}

\begin{align*} & \int_0^{\tfrac\pi2} \frac{x^3 \cos x }{3 \sin x-\sin(3x)} \, dx \\ &= \frac14 \int_0^{\tfrac\pi2} \frac{x^3 \cos x }{\sin^3x} \, dx \\ &= \frac14 \int_0^{\tfrac\pi2} \frac{x^3 \sec^2x }{\tan^3x} \, dx \\ &= \frac14 \int_0^\infty \frac{\arctan^3y}{y^3} \, dy & x=\arctan y \\ &= \frac14 \left(\frac{3\pi}2\ln2 - \frac{\pi^3}{16}\right) = \boxed{\frac{3\pi}8\ln2-\frac{\pi^3}{64}} \end{align*}

where the last step follows from $$\displaystyle\int_0^\infty\left(\frac{\arctan x}x\right)^n\,dx$$ with $$n=3$$.