3

I'm working on a close form for $$f(x, y) = \int_{0}^{\pi} \ln\left(x+y \cos(t)\right) \text{d} t$$

I've yet to find the entire domain of existence for $f$, however by differenciating under the integral sign, I get the following equation : $$y \frac{\partial f} {\partial y}+x \frac{\partial f} {\partial x} = \pi$$

However this gives $$f(x, y) = \pi \ln(x) - \pi \ln(2) \cdot \frac{y}{x} $$ with the condition $f(x, x) = \pi \ln(x/2)$ which does not seem to fit numerically. I've also found

$$\frac{\partial f}{\partial x}\left(x, y\right) = \int_{0}^{\pi} \frac{\text{d} t}{x+y\cos(t)} =\frac{\pi}{\sqrt{x^2-y^2}}$$

But I find it tricky to integrate because it gives an expression that doesn't seem to exist when $y$ tends towards $x$. Can someone point me in the right direction on this?

MathFail
  • 21,128
Atmos
  • 7,369
  • @TedShifrin Hi, sorry but I don't understand my mistakes on the PDE, can you explain me? It seems like if I plug it in, I obtained the integral of dt from 0 to pi. I must do something wrong somewhere... – Atmos May 06 '23 at 21:09
  • I'm not sure I understand the PDE. How did you get $f(x, y) = \pi \ln(x) - \pi \ln(2) * \frac{y}{x} $? – Accelerator May 06 '23 at 22:53

5 Answers5

3

Assume that $x>|y|>0$ for the integral to exist. Note that $$x+y \cos t = a(1+2r\cos t+r^2)$$ with $a= \frac12\left(x+\sqrt{x^2-y^2}\right) $, $r= \frac xy -\sqrt{\frac {x^2}{y^2}-1}$, and

\begin{align} &\int_0^{\pi}\ln( 1 + 2r\cos t + r^2) dt =\sum_{k=1}^\infty \frac{(-r)^{k+1}}k \int_0^{\pi}\cos kt\ dx =0 \end{align}

Thus $$\int_{0}^{\pi} \ln(x+y \cos t)dt=\int_0^\pi \ln a \ dt= \pi \ln\frac{x+\sqrt{x^2-y^2}}2 $$

Quanto
  • 97,352
3

Let $x>0$, $-x \le y \le x$ and

$$ I(y) := \int_0^{\pi} \log\left(x+y\cos(t)\right)\text{d}t. $$

Therefore:

$$ \begin{aligned} I'(y) & = \int_0^{\pi} \frac{\cos(t)}{x+y\cos(t)}\text{d}t \\ & = \int_0^{\pi} \frac{1}{y}\text{d}t - \frac{x}{y} \int_0^{\pi} \frac{1}{x+y\cos(t)}\text{d}t \\ & = \frac{\pi}{y} - \frac{x}{y}\int_0^{\infty} \frac{1}{x+y\frac{1-u^2}{1+u^2}}\frac{2}{1+u^2}\text{d}u \\ & = \frac{\pi}{y} - \frac{2x}{y(x+y)} \int_0^{\infty} \frac{1}{1+\frac{x-y}{x+y}u^2}\text{d}u \\ & = \frac{\pi}{y} - \frac{2x}{y\sqrt{x^2-y^2}}\lim_{b \to \infty} \int_0^b \frac{\sqrt{\frac{x-y}{x+y}}}{1+\left(\sqrt{\frac{x-y}{x+y}}u\right)^2}\text{d}u \\ & = \frac{\pi}{y} - \frac{2x}{y\sqrt{x^2-y^2}}\lim_{b \to \infty} \left[\arctan\left(\sqrt{\frac{x-y}{x+y}}b\right)-\arctan(0)\right] \\ & = \frac{\pi}{y} - \frac{\pi x}{y\sqrt{x^2-y^2}}. \\ \end{aligned} $$

On the other hand:

$$ \begin{aligned} I(y) & = \int \frac{\pi}{y}\text{d}y - \int \frac{\pi x}{y\sqrt{x^2-y^2}}\text{d}y \\ & = \int \frac{\pi}{y}\text{d}y - \int \frac{\pi}{\sin(u)}\text{d}u \\ & = \int \frac{\pi}{y}\text{d}y - \int \frac{\pi}{v}\text{d}v \\ & = \pi\log\left|\frac{y}{v}\right| + c \\ & = \pi\log\left(x+\sqrt{x^2-y^2}\right) + c \\ \end{aligned} $$

and:

$$ I(0) = \pi\log(x) = \pi\left(\log(2)+\log(x)\right) + c \quad \Leftrightarrow \quad c = -\pi\log(2) $$

from which:

$$ I(y) = \pi\log\left(x+\sqrt{x^2-y^2}\right) - \pi\log(2) $$

i.e.

$$ \boxed{\int_0^{\pi} \log\left(x+y\cos(t)\right)\text{d}t = 2\pi\log\left(\frac{\sqrt{x+y}+\sqrt{x-y}}{2}\right)}. $$

  • Hi, if I follow your answer, I find the same $\partial f / \partial y$ as me, which satisfies the PDE I wrote that seems wrong, do you see why? – Atmos May 06 '23 at 21:24
2

$$I=\int_{0}^{\pi} \ln\left(x+y \cos t\right) dt=\int_0^\pi \ln y dt+\int_0^\pi \ln(\beta+\cos t)dt, ~~~~\beta=\frac{x}y$$

Use this result:

$$ \int_0^\pi\log\left(\beta+\cos(\theta)\right)\,\mathrm{d}\theta =\pi\log\left(\frac{\beta+\sqrt{\beta^2-1}}2\right)\tag7 $$

$$I=\int_{0}^{\pi} \ln\left(x+y \cos t\right) dt=\pi \ln y+\pi\ln\left(\frac{\beta+\sqrt{\beta^2-1}}2\right)=\pi\ln\left(\frac{x+\sqrt{x^2-y^2}}2\right)$$

MathFail
  • 21,128
2

I'm not able to follow the steps for your PDE, but I can at least provide an over-the-top alternative.

Note that the integral converges for $0 <|y| < x$. Using $\displaystyle \ln\left(1+f(x\right))=\int_{0}^{1}\frac{f(x)}{1+tf(x)}dt$ and Fubini's Theorem, we have

$$ \begin{align} I &:= \int_{0}^{\pi}\ln\left(x+y\cos t\right)dt \\ &= \int_{0}^{\pi}\ln xdt+\int_{0}^{\pi}\ln\left(1+\frac{y}{x}\cos t\right)dt \\ &= \pi\ln x+\int_{0}^{\pi}\int_{0}^{1}\frac{\frac{y}{x}\cos t}{1+\frac{uy}{x}\cos t}dudt \\ &= \pi\ln x+\frac{y}{x}\int_{0}^{1}\int_{0}^{\pi}\frac{\cos t}{1+\frac{uy}{x}\cos t}dtdu \\ &= \pi\ln x+\frac{y}{2}\int_{0}^{1}\int_{0}^{2\pi}\frac{\cos t}{x+uy\cos t}dtdu \\ &= \pi\ln x+\frac{y}{2}\int_{0}^{1}\int_{0}^{2\pi}\frac{e^{2it}+1}{2x+uy\left(e^{2it}+1\right)}dtdu. \\ \end{align} $$

Parameterize $z = e^{it}$ on the unit circle $C$ centered at the origin, going counterclockwise with a radius of $1$. Then $I$ becomes

$$\pi\ln x+\frac{y}{2}\int_{0}^{1}\oint_{C}^{}\frac{1+z^{2}}{2xz+uy\left(1+z^{2}\right)}\frac{dz}{iz}du = \pi\ln x+\frac{y}{2i}\int_{0}^{1}\oint_{C}^{}\frac{1+z^{2}}{2xz^{2}+uyz\left(1+z^{2}\right)}dzdu.$$

The simple poles of the integrand are $z_0 :=0$, $z_1 := \displaystyle \frac{\sqrt{x^{2}-y^{2}u^{2}}-x}{uy}$, and $z_2 := \displaystyle \frac{-\sqrt{x^{2}-y^{2}u^{2}}-x}{uy}.$ Notice that $z_0$ and $z_1$ are always inside $C$ but not $z_2$. Using the residues at the simple poles, the double integral becomes

$$ \begin{align} &\int_0^1 2\pi i \left(\operatorname{Res}\left(\frac{1+z^{2}}{2xz^{2}+uyz\left(1+z^{2}\right)}, z = z_1\right) + \operatorname{Res}\left(\frac{1+z^{2}}{2xz^{2}+uyz\left(1+z^{2}\right)}, z = z_2\right)\right)du \\ =& \int_0^1 2\pi i \left( \lim_{z \to z_0} (z-z_0) \cdot \frac{1+z^{2}}{2xz^{2}+uyz\left(1+z^{2}\right)} + \lim_{z \to z_1} (z-z_1) \cdot \frac{1+z^{2}}{2xz^{2}+uyz\left(1+z^{2}\right)}\right)du. \\ \end{align} $$

We proceed as follows:

$$ \begin{align} I &= \pi\ln x+\pi y\int_{0}^{1}\left(\frac{1}{uy}-\frac{x}{uy\sqrt{x^{2}-u^{2}y^{2}}}\right)du \\ &= \pi\ln x+\pi\int_{0}^{1}\frac{\sqrt{x^{2}-y^{2}u^{2}}-x}{u\sqrt{x^{2}-y^{2}u^{2}}}du \\ &= \pi\ln x-\pi\int_{x}^{\sqrt{x^{2}+y^{2}}}\frac{v-x}{\sqrt{x^{2}-v^{2}}\frac{v}{y}}\frac{v}{y\sqrt{x^{2}-v^{2}}}dv \\ &= \pi\ln x+\pi\int_{x}^{\sqrt{x^{2}+y^{2}}}\frac{dv}{x+v} \\ &= \pi\ln x\ +\ \pi\Big[\ln\left(x+v\right)\Big]_{x}^{\sqrt{x^{2}+y^{2}}} \\ &= \pi\ln\left(\frac{x+\sqrt{x^{2}-y^{2}}}{2}\right). \\ \end{align} $$

Accelerator
  • 4,923
1

By my post, we have $$ \int_0^\pi \ln (x+y \cos t) d t = \pi \ln \left(\frac{x+\sqrt{x^2-y^2}}{2}\right) $$

Lai
  • 20,421