# Can this integral $\int_0^{2\pi} \frac{\cos2x}{5+4\cos x}\mathrm dx$ be solved without using complex analysis? [closed]

I have tried to solve this $$\displaystyle\int_0^{2\pi} \frac{\cos2x}{5+ 4\cos x}\mathrm dx$$ without using complex analysis but with no success. I tried tangent half-angle substitution but it became too complicated. Is there a way?

• Try half-angle substitution, but with a little more determination. – Angina Seng Aug 9 '18 at 9:54
• The $\tan(\theta/2)$ substitution produces a rational function, and any rational function may be integrated in closed form. However: if any other method works for such an integral, it is likely to be simpler than the $\tan(\theta/2)$ method. (Just an anecdotal observation.) – GEdgar Aug 9 '18 at 12:54
• Another approach is to use the integral formula $$\int_{0}^{\pi}\frac{dx}{a+b\cos x} =\frac {\pi} {\sqrt{a^2-b^2}},0<|b|<a$$ which can be established using the substitution $$(a+b\cos x) (a-b\cos t) =a^2-b^2$$ – Paramanand Singh Aug 10 '18 at 11:41
• This question feels like a joke that everyone gets but me. (1) Why is this question particularly bad? The OP said they tried the obvious thing but to no avail. Presumably they made a mistake, but so what? That doesn't invalidate the question. (2) Why is there such a fierce edit/close/delete war? The question is 2 months old - let it rest!!! – user1729 Oct 12 '18 at 17:12
• @MichaelRozenberg real-analysis, substitution, and trigonometry do not apply here. Knock it off. – Alexander Gruber Oct 27 '18 at 3:01

Use $$\frac{\cos2x}{5+4\cos{x}}=\frac{2\cos^2x-1}{4\cos{x}+5}=\frac{2\cos^2x+\frac{5}{2}\cos{x}-\frac{5}{2}\cos{x}-\frac{25}{8}+\frac{17}{8}}{5+4\cos{x}}=$$ $$=\frac{1}{2}\cos{x}-\frac{5}{8}+\frac{17}{8}\cdot\frac{1}{5+4\cos{x}}.$$ I think, now $t=\tan\frac{x}{2}$ it's not so complicated.

• Typo. Check the second step. The denominator should have been $4\cos t +5$. – The Monk Aug 9 '18 at 10:00
• Thank you! I fixed. – Michael Rozenberg Aug 9 '18 at 10:01
• @MichaelRozenberg Awesome!!! Can you teach me one thing? How did you manipulate the numerator and divide by the denominator so fast? – user521346 Aug 9 '18 at 10:08
• It's just dividing of polynomials: $\frac{2x^2-1}{4x+5}=...$ – Michael Rozenberg Aug 9 '18 at 10:09
• For this example that would be a nice way, but in other examples it would be not so nice, the so-called Weierstrass substitution would be able to do this Job. – Dr. Sonnhard Graubner Aug 9 '18 at 10:21

Hints:

$$\frac{2\cos^2x-1}{5+4\cos x}=\frac18\left(4\cos x-5+\frac{17}{5+4\cos x}\right).$$

The first terms are easy to deal with.

Now,

$$\frac1{5+4\cos x}=\frac{5-4\cos x}{25-16\cos^2x}=\frac{5-4\cos x}{9+16\sin^2x}=\frac5{9+16\sin^2x}+\frac{4(\sin x)'}{9+16\sin^2x}.$$

You can integrate the second term with a change of variable $t=\sin x$ and that will lead you to an arc tangent.

The remaining term is

$$\frac1{9+16\sin^2x}=\frac{1+\tan^2x}{9+25\tan^2x}=\frac{(\tan x)'}{9+25\tan^2x}$$ and by the change of variable $t=\tan x$, you will also obtain an arc tangent.

• It's nice! But $t=\tan\frac{x}{2}$ gives the answer immediately. – Michael Rozenberg Aug 9 '18 at 10:14
• @MichaelRozenberg: the OP found it too complicated. – Yves Daoust Aug 9 '18 at 10:15
• I say about the last term: $\frac{1}{5+4\cos{x}}$ Try it and you'll get something very easy. – Michael Rozenberg Aug 9 '18 at 10:16
• @YvesDaoust Thanks!! Your method was also helpful. – user521346 Aug 9 '18 at 10:27

Here is simply my way of evaluating this integral. It's not the most straightforward way, but it's the laziest way in my opinion. First, split the integral from zero to $\pi$ and $\pi$ to $2\pi$ and make the substitution $x\mapsto x-\pi$ in the second integral. \begin{align*}\mathfrak{I} & =\int\limits_0^{\pi}\mathrm dx\,\frac {\cos 2x}{5+4\cos x}+\int\limits_0^{\pi}\mathrm dx\,\frac {\cos 2x}{5-4\cos x}\\ & =2\int\limits_0^{\pi}\mathrm dx\,\frac {\cos 2x}{5-4\cos x}\end{align*} Note that in the second line, we've made the substitution $x\mapsto\pi-x$ in the first integral. This intermediate integral is actually rather easy to evaluate. First off is to take note of the infinite sum which can be easily verified by rewriting $\cos nx$ as the real part of $e^{nix}$. $$\sum\limits_{n\geq0}\frac {\cos nx}{2^{n-1}}=1+\frac 3{5-4\cos x}$$ Now take the general case of the integral above by inserting a parameter $m$ where the two is. Therefore, it follows that \begin{align*}\int\limits_0^{\pi}\mathrm dx\,\frac {\cos mx}{5-4\cos x} & =\frac 23\sum\limits_{n\geq0}2^{-n}\int\limits_0^{\pi}\mathrm dx\,\cos mx\cos nx-\frac 13\int\limits_0^{\pi}\mathrm dx\,\cos mx\end{align*} The second integral evaluates to zero. The first integral is well known and equals $$\int\limits_0^{\pi}\mathrm dx\,\cos mx\cos nx=\frac {\pi}2\delta_{mn}$$ where $\delta_{mn}=1$ when $m=n$ and $0$ otherwise (I can prove it if you need me to). Take the case $m=2$ and the infinite sum evaluates to zero for every value except when $n=2$ when $\delta_{mn}=1$. Therefore, it's easy to see that $$\int\limits_0^{\pi}\mathrm dx\,\frac {\cos 2x}{5-4\cos x}=\frac {\pi}{12}$$ Your integral is twice that. $$\int\limits_0^{2\pi}\mathrm dx\,\frac {\cos 2x}{5+4\cos x}\color{blue}{=\frac {\pi}6}$$

With $$\cos(t)=\frac{1-t^2}{1+t^2}$$ and $$dx=\frac{2}{1+t^2}dt$$ we get the indefinite integral

$$2\int\frac{(t^2+2t-1)(t^2-2t-1)}{(t^2+9)(t^2+1)^2}dt$$ and this is equal $${\frac {t}{{t}^{2}+1}}-5/4\,\arctan \left( t \right) +{\frac {17\, \arctan \left( t/3 \right) }{12}} +C$$

Note that $$\tan\left(\frac{x}{2}\right)=t$$

• This is known as the Weierstrass substitution. – Chickenmancer Aug 12 '18 at 6:15

$$\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}^{2\pi}{\cos\pars{2x} \over 5 + 4\cos\pars{x}} \,\dd x} = \int_{0}^{2\pi}{2\cos^{2}\pars{x} - 1 \over 5 + 4\cos\pars{x}}\,\dd x \\[5mm] = &\ \int_{0}^{2\pi}\bracks{-\,{5 \over 8} + {\cos\pars{x} \over 2} + {17 \over 8}\,{1 \over 5 + 4\cos\pars{x}}}\dd x \\[5mm] = &\ -\,{5 \over 4}\,\pi + {17 \over 8}\int_{0}^{2\pi} {\dd x \over 5 + 4\cos\pars{x}} = -\,{5 \over 4}\,\pi + {17 \over 8}\int_{-\pi}^{\pi} {\dd x \over 5 - 4\cos\pars{x}} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {17 \over 4}\int_{0}^{\pi} {\dd x \over 5 - 4\cos\pars{x}} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {17 \over 4}\int_{0}^{\pi/2} {\dd x \over 5 - 4\cos\pars{x}} + {17 \over 4}\int_{\pi/2}^{\pi} {\dd x \over 5 - 4\cos\pars{x}} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {17 \over 4}\int_{0}^{\pi/2} {\dd x \over 5 - 4\cos\pars{x}} + {17 \over 4}\int_{-\pi/2}^{0} {\dd x \over 5 + 4\cos\pars{x}} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {17 \over 4}\int_{0}^{\pi/2} {\dd x \over 5 - 4\cos\pars{x}} + {17 \over 4}\int_{0}^{\pi/2}{\dd x \over 5 + 4\cos\pars{x}} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {85 \over 2}\int_{0}^{\pi/2} {\dd x \over 25 - 16\cos^{2}\pars{x}} = -\,{5 \over 4}\,\pi + {85 \over 2}\int_{0}^{\pi/2} {\sec^{2}\pars{x}\,\dd x \over 25\sec^{2}\pars{x} - 16} \\[5mm] = &\ -\,{5 \over 4}\,\pi + {85 \over 2}\int_{0}^{\pi/2} {\sec^{2}\pars{x}\,\dd x \over 25\tan^{2}\pars{x} + 9} = -\,{5 \over 4}\,\pi + {85 \over 2}\ \underbrace{\int_{0}^{\infty} {\,\dd x \over 25x^{2} + 9}}_{\ds{\pi \over 30}} \\ = &\ \bbx{\pi \over 6} \approx 0.5236 \end{align}