3

We are going to find the formula, by Feynman’s Integration Technique, for

$$\int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x,$$

where $a+c$ $\textrm{ and }$ $b+c$ are positive real numbers.

First of all, let’s ‘kill’ the term $\sin x$ and the square of $\cos x$ by identity and double angle formula.

$\displaystyle \begin{aligned}\int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x =& \int_{0}^{\frac{\pi}{2}} \ln \left[(a-b) \cos ^{2} x+(b+c)\right] d x \\=& \int_{0}^{\frac{\pi}{2}} \ln \left[(a-b)\left(\frac{1+\cos 2 x}{2}\right)+(b+c)\right] d x \\=& \int_{0}^{\frac{\pi}{2}} \ln \left[\frac{a-b}{2} \cos 2 x+\left(b+c+\frac{a-b}{2}\right)\right] d x \\\stackrel{2x\mapsto x}{=} & \frac{1}{2} \int_{0}^{\pi} \ln \left[\frac{a-b}{2} \cos x+\left(\frac{a+b+2 c}{2}\right)\right] d x\end{aligned}\tag*{} $

By my post, I found, by Feynman’s Integration Technique, that

$\displaystyle \int_{0}^{\pi} \ln (b \cos x+c)=\pi \ln \left(\frac{c+\sqrt{c^{2}-b^{2}}}{2}\right),\tag*{} $ where $\left|\frac{c}{b}\right|\geq 1$. $\displaystyle I=\frac{\pi}{2} \ln \left[\frac{\frac{a+b+2 c}{2}+\sqrt{\left(\frac{a+b+2 c}{2}\right)^{2}-\left(\frac{a-b}{2}\right)^{2}}}{2}\right]\tag*{} $ Simplifying gives the result $\displaystyle \begin{aligned}I&=\frac{\pi}{2} \ln \left[\frac{a+b+2 c+2 \sqrt{(a+c)(b+c)}]}{4}\right] \\&=\frac{\pi}{2} \ln \left(\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\right)^{2} \\&=\pi \ln \left(\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\right)\end{aligned}\tag*{} $

Lai
  • 20,421
  • 3
    Isnt the same problem as yesterday ? – Claude Leibovici Jun 14 '22 at 04:44
  • No, they are different but related. – Lai Jun 14 '22 at 04:49
  • 2
    Now, I might be a bit dense here, but doesn't the solution contained in your post answer your question? You've found a way to evaluate the integral without DUI - just use one of the answers in your $\log(b\cos x+c)$ post that circumvents Feynman's Trick and you have a DUI-free approach to integrating $\log(a\cos^2 x+b\sin^2 x+c)$ – Frank W Jun 14 '22 at 08:31
  • 1
    But I had used Feynman’s Integration Technique, to prove that

    $\displaystyle \int_{0}^{\pi} \ln (b \cos x+c)=\pi \ln \left(\frac{c+\sqrt{c^{2}-b^{2}}}{2}\right) $

    – Lai Jun 26 '22 at 01:30

4 Answers4

3

We can write the initial integral in the form $\displaystyle I=\int_0^\frac{\pi}{2}\ln(a\cos^2x+b\sin^2x+c)dx=\int_0^\frac{\pi}{2}\ln\big((a-b)\cos^2x+b+c\big)dx\tag*{}$

Using $1+\tan^2x=\frac{1}{\cos^2x}$ $\displaystyle I=\int_0^\frac{\pi}{2}\ln\Big((a-b)+(b+c)(1+\tan^2x)\Big)dx+\int_0^\frac{\pi}{2}\ln(\cos^2x)dx\tag*{}$ $\displaystyle =\int_0^\frac{\pi}{2}\ln\Big((a+c)+(b+c)\tan^2x\Big)dx+2\int_0^\frac{\pi}{2}\ln(\cos x)dx\tag*{}$

Using for the first integral the substitution $\displaystyle x=\arctan t\,$ and the well-known value of the second integral $\displaystyle \int_0^\frac{\pi}{2}\ln(\cos x)dx=-\frac{\pi}{2}\ln2$ $\displaystyle I=\frac{1}{2}\int_{-\infty}^\infty\frac{\ln\Big((a+c)+(b+c)t^2\Big)}{1+t^2}dt-\pi\ln2\tag*{}$

Now we use $\displaystyle\,\ln(p+q\,t^2)=2\,\Re\ln(\sqrt p-i\sqrt q\, t)$ and close the contour in the upper-half of the complex plane, integrating along a big half-circle (radius $R$), counter-clockwise. It is easy to show that the integral along this half-circle $\to0$ at $R\to\infty$.

The function is single-valued in the upper half-plane (the only branch point of the logarithm is $z=-i$). Therefore, using the Cauchy's residue theorem $\displaystyle I=\Re\,2\pi i\operatorname{Res}_{z=i}\frac{\ln\Big(\sqrt{a+c}-i\sqrt{b+c}\,z\Big)}{1+z^2}-\pi\ln 2\tag*{}$

$\displaystyle =\pi\ln\big(\sqrt{a+c}+\sqrt{b+c}\big)-\pi\ln2\tag*{}$

$\displaystyle \boxed{\,\,I=\pi\ln\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\,\,}\tag*{}$

Svyatoslav
  • 15,657
  • 1
    Another way of evaluating the log integral$$\int\limits_0^{+\infty}\frac {\log(p+q x^2)}{1+x^2},\mathrm dx$$Would be to make use of a double integral, namely$$\log(1+s^2)=\int\limits_0^1\frac {2s^2 y}{1+s^2 y^2},\mathrm dy$$And swap integration order and then use partial fraction decomposition! – Frank W Jun 14 '22 at 08:49
  • 1
    @FrankW. We easily have the antiderivative. So,..? – Claude Leibovici Jun 14 '22 at 12:56
3

Use the short-hands $p^2=a+c$, $q^2=b+c$ and $r=\frac{p-q}{p+q}$ to rewrite the integral as \begin{align} I=&\int_{0}^{\frac{\pi}{2}} \ln \left(a \cos ^{2} x+b \sin ^{2} x+c\right) d x\\ =& \int_{0}^{\frac{\pi}{2}} \ln \left(p^2 \cos ^{2} x+q^2 \sin ^{2} x\right) d x\\ = & \int_{0}^{\frac{\pi}{2}}\bigg(\ln\frac{(p+q)^2}4+ \ln \left(1+2 r\cos 2 x+r^2 \right) \bigg)\ d x\\ \end{align} and note that

\begin{align} &\int_0^{\frac\pi2}\ln( 1 + 2r\cos 2x + r^2) dx = 2\sum_{k=1}^\infty \frac{(-r)^{k+1}}k \int_0^{\frac\pi2}\cos 2kx\ dx =0 \end{align} Thus \begin{align} I=\int_{0}^{\frac{\pi}{2}}\ln\frac{(p+q)^2}4\ d x=\pi\ln \frac{p+q}2\ \end{align}

Quanto
  • 97,352
2

This isn't really an answer as such, but as a general comment, the next trick you should know is how to "peel off" the logarithm. Let's guess that for some functions $g$ and $h$:

$$\int \log f(x)\,dx = h(x) \log f(x) + g(x)$$

Taking the derivative of both sides:

$$\log f(x) = h'(x) \log f(x) + h(x) \frac{f'(x)}{f(x)} + g'(x)$$

This is clearly going to have a solution if $h'(x) = 1$, that is, $h(x) = x$. So:

$$\int \log f(x)\,dx = x \log f(x) + g(x)$$

where:

$$g(x) = - \int x \frac{f'(x)}{f(x)}\,dx$$

In your case:

$$\int \log \left(b \cos x + c\right)\,dx = x \log \left(b \cos x + c\right) + g(x)$$

where:

$$g(x) = \int \frac{x \sin x}{\cos x + c/b}\,dx$$

This works for any elementary field extension, not just the logarithm function. You can think of this as integration by parts, but I find the Risch algorithm interpretation easier to apply.

Pseudonym
  • 928
1

Letting $t=\tan x$ transform the integral into

$$ \begin{aligned} I &= 2 \int_{0}^{\frac{\pi}{2}} \ln (\cos x) d x+\int_{0}^{\frac{\pi}{2}} \frac{\ln \left((a+c)+(b+c) t^{2}\right)}{1+t^{2}}dt\\&=-\pi\ln 2+\int_{0}^{\frac{\pi}{2} } \frac{\ln \left((a+c)+(b+c) t^{2}\right)}{1+t^{2}} d t \end{aligned} $$

By my post

$$ \int_{0}^{\infty} \frac{\ln \left(a x^{2}+c\right)}{1+x^{2}} d x=\pi \ln (\sqrt{a}+\sqrt{c}) $$

Replacing $a$ by $a+c$ and $c$ by $b+c$, we get $$ I=\pi \ln \left(\frac{\sqrt{a+c}+\sqrt{b+c}}{2}\right) $$

Lai
  • 20,421