8

Evaluation of $\displaystyle \int_{0}^{\pi}\ln(5-4\cos x)dx = \int_{0}^{\pi}\ln(5+4\cos x)dx$

$\bf{My\; Try::}$ Let $\displaystyle I(a,b) = \int_{0}^{\pi}\ln(a+b\cos x)dx$

Then $$\frac{d}{db}(a,b) = \frac{d}{db}\left[\int_{0}^{\pi}\ln(a+b\cos x)dx\right]db$$

So $$I'(a,b) = \int_{0}^{\pi}\frac{\cos x}{a+b\cos x}dx = \frac{1}{b}\int_{0}^{\pi}\frac{(a+b\cos x)-a}{a+b\cos x}dx$$

So we get $$I'(a,b) = \frac{\pi}{b}-\frac{a}{b}\int_{0}^{\pi}\frac{1}{a+\cos x}dx$$

Using half angle formula $\displaystyle \tan x = \frac{1-\tan^2 x/2}{1+\tan^2 x/2}$

so we get $$I'(a,b) = \frac{\pi}{b}-\frac{a}{b}\int_{0}^{\pi}\frac{\sec^2 x/2}{(a+b)+(a-b)\tan^2 x/2}dx$$

Now Put $\tan x/2= t\; $ Then $\displaystyle \sec^2 \frac{x}{2}dx = 2dt$

So we get $$I'(a,b) = \frac{\pi}{b}-\int_{0}^{\infty}\frac{1}{(a+b)+(a-b)t^2}=\frac{\pi}{b}-\frac{a\pi}{2b\sqrt{a^2-b^2}}$$

So we get $$I(a,b) = \pi\ln|b|-\frac{\pi a}{2}\left[-\frac{\ln|b^2-a^2|+2\ln |b|}{2a^2}\right]$$

So we put $a = 5$ and $b=4$

We get $$I(5,4) = \pi\cdot \ln (5)-\frac{\pi}{2}\left[\frac{-\ln(9)+2\ln(5)}{2\cdot 5}\right]$$

So We get $$I(5,4) = \left[\frac{18\ln(5)+\ln(9)}{20}\right]\cdot \pi$$

I did not understand where i have done mistake, Help me

Thanks

StubbornAtom
  • 17,052
juantheron
  • 53,015
  • When you integrate $I'=dI/db$ back to $I$, shouldn't there be a $+C(a)$? – Barry Cipra Apr 25 '16 at 02:00
  • 1
    Why did the "$a + b \cos x$" in the denominator lose its "$b$" when the $1$ was split out and the $a$ moved out to become $\frac{a}{b}$? – Eric Towers Apr 25 '16 at 02:03
  • Your half-angle formula is rather unlikely since its denominator is always positive. In fact, the RHS of that "identity" is $= \cos x$. – Eric Towers Apr 25 '16 at 02:04
  • I think the answer is ${\pi}ln4$ but I can't prove why, hence my comment instead of an answer, I played around with the calculator. I do not know if there is a program that would yield an exact answer to this kind of integral....Please don't ridicule me... – imranfat Apr 25 '16 at 04:03

3 Answers3

4

Here is an alternative, perhaps simpler, procedure \begin{align} I=\int_0^\pi \ln(5-4\cos x) \overset{x\to 2x}{dx} =2\pi\ln2+2\int_0^{\pi/2} \ln\left(\frac54-\cos 2x\right)dx \end{align} where, with $\cos 2x =\frac{1-\tan^2x}{1+\tan^2x}$ \begin{align} J=&\int_0^{\pi/2} \ln\left(\frac54-\cos 2x\right)dx =\int_0^{\pi/2}\ln \frac{1+9\tan^2x}{4(1+\tan^2x)}dx\\ =& \int_0^{\pi/2} \int_0^{1/2}\frac{2(1+t)\tan^2x-2(1-t)}{(1+t)^2\tan^2x +(1-t)^2}dt\ dx\>\>\>\>\> r=\frac{1+t}{1-t}\\ =& \int_0^{1/2} \frac2{1-t}\int_0^{\pi/2}\frac{r\tan^2x-1}{r^2\tan^2x +1}dx\ dt\>\>\>\>\> r\tan x = \cot y\\ =& \int_0^{1/2} \frac2{1-t}\int_0^{\pi/2}\frac{1-r\tan^2y}{r^2\tan^2y +1}dy\ dt=-J=0 \end{align} Thus $$I= 2\pi\ln2$$

Quanto
  • 97,352
3

This approach seems really good, but the first mistake was in $$\int_0^{\pi}\frac1{a+b\cos x}dx=\frac1a\int_0^{\pi}\frac1{1+e\cos x}dx$$ Where $e=\frac ba$. If you used the eccentric anomaly at this point, $$\sin E=\frac{\sqrt{1-e^2}\sin x}{1+e\cos x}$$ So that $$dE=\frac{\sqrt{1-e^2}}{1+e\cos x}dx$$ You would get $$\int_0^{\pi}\frac1{a+b\cos x}dx=\frac1a\int_0^{\pi}\frac{dE}{\sqrt{1-e^2}}=\frac{\pi}{\sqrt{a^2-b^2}}$$ So you were off by a factor of $2$ at this point. Next, if we let $b=a\sin\theta$, then $$\begin{align}\int\frac{db}{b\sqrt{a^2-b^2}}&=\frac1a\int\csc\theta\,d\theta=-\frac1a\ln\left|\csc\theta+\cot\theta\right|+C_1(a)\\ &=-\frac1a\ln\left(\frac ab+\frac{\sqrt{a^2-b^2}}b\right)+C_1(a)\\ &=-\frac1a\ln\left(a+\sqrt{a^2-b^2}\right)+\frac1a\ln b+C_1(a)\end{align}$$ So you would arrive at $$I(a,b)=\pi\ln\left(a+\sqrt{a^2-b^2}\right)+C(a)$$ At $b=0$ we get $\pi\ln a=\pi\ln2a+C(a)$ so $C(a)=-\pi\ln2$. Then $$I(5,4)=\pi\ln8-\pi\ln2=\pi\ln4$$ Numerical quadrature confirms this result.

user5713492
  • 15,938
2

I get, assuming there's a $\mathrm{d}t$, $$ \int_0^\infty \frac{1}{(a+b)(a-b)t^2} \,\mathrm{d}t = \frac{\pi}{2 \sqrt{a^2-b^2}} \text{.} $$

Integrating that with respect to $b$, I get $\displaystyle \frac{-\pi}{2}\arctan \frac{b\sqrt{a^2 - b^2}}{b^2 - a^2} $, which is not equivalent to your expression containing logarithms.

I haven't checked for further errors.

Edit: @user5713492 has (perhaps unintentionally) pointed out another error. Your second $\int_0^\infty$ has no $\frac{a}{b}$ prefactor. Assuming this was intended, I get $$ \frac{\partial I(a,b)}{\partial b} = \frac{\pi}{b} - \frac{a}{b} \int_0^\infty \frac{1}{(a+b)+(a-b)t^2} \,\mathrm{d}t = \frac{\pi}{b} - \frac{a \pi}{2b\sqrt{a^2 - b^2}} \text{,} $$ which is what you get, so you probably dropped the prefactor.

Integrating that with respect to $b$, I get $$ \frac{\pi}{2}\ln b + \ln(a + \sqrt{a^2 - b^2}) + C(a) \text{,} $$ where $C$ is an arbitrary function of $a$. This is not particularly close to your expression with logs and I see no path to equivalence, even ignoring the arbitrary function of integration.

Eric Towers
  • 67,037
  • I think you are forgetting about that factor of $b$ in the denominator when you are integrating, so that would mess everything up. – user5713492 Apr 25 '16 at 04:18
  • @user5713492 : OP has no prefactor on the integral $\int_0^\infty$. – Eric Towers Apr 25 '16 at 04:50
  • Why are you guys getting that factor of two? $$\frac{a\pi}{\color{red}{2}b\sqrt{a^2-b^2}}$$ Clearly it's wrong and messes up your results from that point onwards. – user5713492 Apr 25 '16 at 06:22
  • @user5713492 : Yes. Correct. That integral has a $2$ in the denominator. It's why I won't upvote your answer. Replicated at Wolfram Alpha. – Eric Towers Apr 25 '16 at 13:21
  • That's fine. I'm already $+70$ points today anyway. But the error had already been made by that point. Using the substitution $z=\tan(x/2)$: $$-\frac ab\int_0^{\pi}\frac{dx}{a+b\cos x}=-\frac ab\int_0^{\infty}\frac{\frac{2dz}{1+z^2}}{a+b\left(\frac{1-z^2}{1+z^2}\right)}=-\frac{2a}b\int_0^{\infty}\frac{dz}{(a+b)+(a-b)z^2}$$ So what I am trying to say is that you didn't go back far enough in the question to find all sources of error. – user5713492 Apr 25 '16 at 18:39