6

I need help to evaluate :$$I(p)=\int^{\pi/2}_0 \ln(1+p \cos(x)) dx $$ therfore: $$I'(p)=\int^{\pi/2}_0 \frac{\cos(x)}{1+p\cos(x)}dx=\frac{1}{p}\int^{\pi/2}_0\left(1-\frac{1}{1+p\cos(x)}\right)dx$$

$$I'(p)\overset{y=\tan(x/2)}{=}\frac{\pi}{2p}-\frac{2}{p}\int^{1}_0 \frac{dy}{(1-p)y^2+(1+p)}$$

therfore: $$I'(p)=\frac{\pi}{2p}-\frac{2}{p}\sqrt{\frac{1-p}{1+p}}\arctan\left({\sqrt{\frac{1-p}{1+p}}}\right)$$

Therfore: $$I(b)=\frac{\pi}{2}\ln(p)-\int^p_0 \frac{2}{y}\sqrt{\frac{1-y}{1+y}}\arctan\left({\sqrt{\frac{1-y}{1+y}}}\right)dy$$

Can this last integral be calculated? Is there another way to evaluate this integral?

Travis Willse
  • 108,056
Delta
  • 1
  • Often, the easiest way to compute integrals of rational functions of trig functions is the so-called Weierstrass substitution. https://en.wikipedia.org/wiki/Tangent_half-angle_substitution?wprov=sfti1# – Thomas Andrews Jan 02 '25 at 19:46
  • In your case, apply it to the integral $\int \frac{\cos x}{1+p\cos x},dx$ and you get: $$I'(p)=2\int_0^1\dfrac{\frac{1-t^2}{1+t^2}}{(1+t^2)+p(1-t^2)},dt$$ Then apply partial fractions to this integral. – Thomas Andrews Jan 02 '25 at 19:57
  • @ThomasAndrews Yes, sir, I tried that, but the problem is in finding the integral with the variable p.I will try again – Delta Jan 02 '25 at 20:02
  • @Gonçalo There is a difference between the first integral from 0 to pi/2 and the other from -pi/2 to pi/2. – Delta Jan 02 '25 at 20:10
  • 1
    You are right. My bad. – Gonçalo Jan 02 '25 at 20:15
  • 3
    Put what you tried in the question. Dont make us waste our time suggesting things you've already tried. You are asking people to volunteer there time to help you, don't ask people to waste their time. Help people help you. – Thomas Andrews Jan 02 '25 at 20:28
  • Nothing keeps the Weierstrass substitution from being used with $p$ involved. – Thomas Andrews Jan 02 '25 at 20:29
  • Don't use $p$ as a bound of the integral. It is wrong to write $\int_0^p f(p),dp.$ You are using $p$ in two different ways. – Thomas Andrews Jan 02 '25 at 20:31
  • 1
    Here is the closed form expression mathematica gives for $$I(3) = -\frac{1}{8}i\left(-8\left(\text{Li}_2\left(\frac{1}{3}\left(-i-2\sqrt{2}\right)\right)-\text{Li}_2\left(-\frac{1}{3}-\frac{2i\sqrt{2}}{3}\right)-\text{Li}_2\left(-\frac{1}{3}+\frac{2i\sqrt{2}}{3}\right)+\text{Li}_2\left(\frac{1}{3}\left(-i+2\sqrt{2}\right)\right)\right)+\pi^2+4i\pi\log\left(\frac{3}{2}\right)\right)$$ which is far more complicated than $I(2) = \frac{4G}{3}$, where $G$ is Catalan's constant. – Maxime Jaccon Jan 02 '25 at 21:40
  • @ThomasAndrews. Euler used this method in year 1768 for $\int \frac {dx}{a+b\cos(x)}$ and Weirstrass was born in 1815. Just for the fun ! Happy New Year !! – Claude Leibovici Jan 03 '25 at 07:15

3 Answers3

9

Let $p=\sin \theta$, with $ \int_0^\theta\frac{y}{\sin y}dy =2\text{Ti}_2(\tan\frac\theta 2 )$, to arrive at the close-form below \begin{align} &\int_0^\frac{\pi}{2} \ln(1+p \sin x)\ dx\\ =& \int_0^\frac{\pi}{2} \ln(1+\sin \theta\sin x)\ dx =\int_0^\frac{\pi}{2}\int_0^\theta\frac{\cos y \sin x}{1+\sin y\sin x}dy\ dx\\ =& \int_0^\theta \cot y\int_0^\frac{\pi}{2} \bigg(1- \frac{1}{1+\sin y\sin x}\bigg)dx\ dy = \int_0^\theta \cot y \bigg( \frac\pi2 -\frac{\frac\pi2-y}{\cos y}\bigg)dy\\ =& \int_0^\theta \left(\frac{y}{\sin y}-\frac\pi2\tan\frac y2 \right) dy = 2 \text{Ti}_2\left(\tan\frac\theta 2 \right)+ \pi \ln\cos\frac {\theta}2 \\ =&\ 2\text{Ti}_2\bigg(\frac{1-\sqrt{1-p^2}}p\bigg)+ \frac\pi2\ln\frac{p+\sqrt{1-p^2}}{2} \end{align}

Travis Willse
  • 108,056
Quanto
  • 120,125
5

The part of $I'(p)$ difficult to integrate is $$\frac{2}{p \sqrt{1 - p^2}} \arctan \sqrt \frac{1 - p}{1+p}$$

Substituting $p = \cos \theta$ transforms the integral of that quantity w.r.t. $p$ to $$\int \theta \sec \theta \,d\theta ,$$ which has no antiderivative expressible in closed form in terms of elementary functions, but which can be expressed in terms of the dilogarithm function, $\operatorname{Li}_2$, or the inverse tangent integral function, $\operatorname{Ti}_2$, e.g., as $$\theta \log \frac{1 - i e^{i \theta}}{1 + i e^{i \theta}} + i (\operatorname{Li}_2(1 + i e^{i \theta}) - \operatorname{Li}_2(1 - i e^{i \theta})) + C ;$$ the first term in the expression can alternatively be expressed in terms of $\arctan \exp i \theta$.

For certain values of $p$ the original integral simplifies nicely, e.g., $$I(\pm 1) = - \frac\pi2 \log 2 \pm 2 G,$$ where $G$ is Catalan's constant.

See this question for details and alternative expressions for the antiderivative.

Remark (asymptotic formulae)

  • Using that $I(-1) = -\frac\pi2 \log 2 - 2 G$ and expanding the formula for $I'(p)$ in a series gives an asymptotic expansion for $I(p)$ as $p \searrow -1$: $$I(p) = -\frac\pi2 \log 2 - 2 G + \sqrt 2 \pi \sqrt{p - (-1)} - \left(1 + \frac\pi2\right) (p - (-1)) + \cdots,$$ where $\cdots$ denotes a remainder in $O\left((p - (-1))^{\frac32}\right)$.
  • Using that $I(0) = 0$ and expanding the formula for $I'(p)$ in a Taylor series gives an asymptotic expansion as $p \to 0$: $$I(p) = p - \frac\pi8 p^2 + \frac29 p^3 + \cdots,$$ where $\cdots$ now denotes a remainder in $O(p^4)$.
  • For large $p$, the $1$ in the argument of $\log$ makes proportionally little difference, so $$I(p) \approx \int_0^{\frac \pi2} \log (p \cos x) \,dx = \int_0^{\frac \pi2} \log p \,dx + \int_0^{\frac \pi2} \log \cos x \,dx = \frac\pi2 (\log p - \log 2) $$ (The last equality uses a well-known identity.) Analyzing the difference gives that $I(p)$ has asymptotic expansion $$I(p) = \frac\pi2 \log p - \frac\pi2 \log 2 + \frac{\log p}p + (1 + \log 2) \frac1p + \cdots ,$$ where $\cdots$ now denotes a remainder in $O\left(\frac1{p^2}\right)$.
Travis Willse
  • 108,056
1

Using the tangent half angle substitution $$I=\int^{\pi/2}_0 \log(1+p \cos(x))\, dx=2\int_0^1 \frac 1{1+t^2} \log\Big(1+p \,\frac{1-t^2}{1+t^2} \Big)$$ Write the logarithm as $$\log \left(t-\frac{\sqrt{p+1}}{\sqrt{p-1}}\right)+\log \left(t+\frac{\sqrt{p+1}}{\sqrt{p-1}}\right)+\log (1-p)-\log \left(1+t^2\right)$$ and eventually $$\frac 1{1+t^2}=\frac i 2\left(\frac{1}{t+i}-\frac{1}{t-i}\right)$$ to face simple integrals.

Recombining, this leads to

$$I=2 C+\frac{1}{2} \pi \log \left(\frac{p}{2}\right)+i\,(A-B)$$ where $$A=\text{Li}_2\left(\frac{(1+i) \sqrt{p-1}}{\sqrt{p-1}-i \sqrt{p+1}}\right)+\text{Li}_2\left(\frac{(1+i) \sqrt{p-1}}{\sqrt{p-1}+i \sqrt{p+1}}\right)$$ $$B=\text{Li}_2\left(\frac{(1+i) \sqrt{p-1}}{i \sqrt{p-1}-\sqrt{p+1}}\right)+\text{Li}_2\left(\frac{(1+i) \sqrt{p-1}}{i \sqrt{p-1}+\sqrt{p+1}}\right)$$

Expanded for large values of $p$, thies gives $$I=\frac{1}{2} \pi \log \left(\frac{p}{2}\right)+\sum_{n=0}^\infty \frac {a_n}{p^{2n+1}}\tag 1$$ Using $L=\log(2p)$ , the first coefficients are $$\large\left( \begin{array}{cc} n & a_n \\ 0 & L+1 \\ 1 & \frac{6 L-1}{36} \\ 2 & \frac{60 L-23}{800} \\ 3 & \frac{420 L-199}{9408} \\ 4 & \frac{2520 L-1319}{82944} \\ 5 & \frac{27720 L-15377}{1239040} \\ \end{array} \right)$$ which is a good approximation. For example, for $p=2$, the above truncated series leads to $$\frac{24948591219443}{50357757542400}+\frac{951195037 }{908328960}\log (2)=\color{red}{1.22128}53$$

Edit

May be interesting if to notice that, using $$I(p)=\int^{\pi/2}_0 \log(1+p \cos(x))\, dx$$ $$I'(p)=\int^{\pi/2}_0 \frac{\cos (x)}{1+p \cos (x)}\,dx=\frac{\pi }{2 p}-\frac{2}{p \sqrt{p^2-1}}\tanh^{-1}\left(\sqrt{\frac{p-1}{p+1}}\right)$$

Expanding for large values of $p$ $$I'(p)=\frac{\pi }{2 p}-\sum_{n=1}^\infty \frac {b_n}{p^{2n}}\tag 2$$ the first coefficients being (still with $L=\log(2p)$) $$\large\left( \begin{array}{cc} n & b_n \\ 1 & L \\ 2 & \frac{2 L-1}{4} \\ 3 & \frac{12 L-7}{32} \\ 4 & \frac{60 L-37}{192} \\ 5 & \frac{840 L-533}{3072} \\ \end{array} \right)$$

Integrating from $p=1$ to $p$, the results of $(1)$.