1

Integrate $$\int_{0}^{\pi/2} \ln(p + q \cos^2x)dx,$$

where $p > 0, q \geq 0$

What I tried already

This task seems to be about parameter derivation. I tried both to differentiate by $p$ or by $q$. By $q$ it seems more logical - because $q\geq 0$, it would be easy to find constant when $q = 0.$ After derivation I get a pretty stange integral, which I sometimes with plenty of mistakes manage to count, but it becomes almost impossible to integrate it after. 2. I tried to use that when $x = 0$ to $\pi/2d$,

$$I = \int_{0}^{\pi/2} \ln(p + q \cos^2x)dx = \int_{0}^{\pi/2} \ln(p + q \sin^2x)dx,$$

which implies

$$\begin{align} I &= \frac{1}{2}(I + I) \\ &= \frac{1}{2}\int_{0}^{\pi/2} (\ln(p + q \cos^2x) + \ln(p + q \sin^2x)) dx \\ &= \frac{1}{2} \int_{0}^{\pi/2} \ln((p + q \cos^2x)(p + q \sin^2x))dx \\ &= \frac{1}{2} \int_{0}^{\pi/2} \ln(p^2 + pq + q^2 \frac{\sin^22x}{4})dx\| & = \frac{1}{2} \int_{0}^{\pi} \ln(p^2 + pq + q^2 \frac{\sin^2x}{4})dx \end{align}$$

This almost gives nothing, I tried to count the last integral also by derivation, but got nothing. Maybe problem is wrong, but I don't think so. Thanks for the help)

nezudem
  • 101
  • Where did you see this? Do you know about e.g. contour integration? – FShrike Apr 02 '22 at 21:02
  • Yeah, I know contuer integration. – nezudem Apr 02 '22 at 21:03
  • Sorry for bad formula, I'm new to stack( – nezudem Apr 02 '22 at 21:05
  • Hint: with $t:=\tan x$, differentiation with respect to $q$ gives$$\int_0^\infty\frac{dt}{(1+t^2)(p+q+pt^2)}=\frac1q\int_0^\infty\left(\frac{1}{1+t^2}-\frac{p}{p+q+pt^2}\right)dt=\frac{\pi}{2}\left(q^{-1}-\color{blue}{q^{-1}(1+q/p)^{-1/2}}\right).$$If you integrate that with respect to $q$, the hard part in blue succumbs to $z:=\sqrt{1+q/p}$. – J.G. Apr 02 '22 at 21:37

3 Answers3

2

Please consider this post as a some development of the solution provided by @FShrike. It's a bit longue for a comment. $$I(p,q)=\int_0^{\pi/2}\ln(p+q\cdot\cos^2x)d x$$ $$\frac{\partial}{\partial p}I(p,q)=I'_p(p,q)=\int_0^{\pi/2}\frac{1}{p+q\cos^2x}d x$$ Using the substitution $t=\tan x$ $$I'_p(p,q)=\int_0^\infty\frac{dt}{p+q+pt^2}=\frac{1}{p+q}\int_0^\infty\frac{dt}{1+\frac{p}{p+q}t^2}=\frac{\pi}{2}\frac{1}{\sqrt p\sqrt{p+q}}$$ $$I(p,q)=\frac{\pi}{2}\int^p\frac{ds}{\sqrt s\sqrt{s+q}}+f(q)=\frac{\pi}{2}\int^\frac{p}{q}\frac{dt}{\sqrt t\sqrt{t+1}}+f(q)=\pi\int^\sqrt{\frac{p}{q}}\frac{dx}{\sqrt{x^2+1}}+f(q)$$ $$I(p,q)=\pi\ln\Big(\sqrt\frac{p}{q}+\sqrt{\frac{p}{q}+1}\,\Big)+f(q)$$ At $p=0$ $$I(o,q)=\int_0^{\pi/2}\ln(q\cos^2x)d x=\frac{\pi}{2}\ln q+2\int_0^{\pi/2}\ln(\cos x)d x=\frac{\pi}{2}\ln q-\pi\ln 2=f(q)$$ Finally, $$I(p,q)=\pi\ln\Big(\sqrt\frac{p}{q}+\sqrt{\frac{p}{q}+1}\,\Big)+\frac{\pi}{2}\ln q-\pi\ln 2=\pi\ln\frac{\sqrt p+\sqrt{p+q}}{2}$$

Svyatoslav
  • 15,657
  • Thank you, your solving seems good, but with 1 problem: you use fact that p = 0 when counting constant, but p > 0, not like q. Need to think about it a bit more and reserach Quanto's solving. Probably it is more right. – nezudem Apr 03 '22 at 07:27
  • @nezudem Thank you for you comment. The integral is well defined for $p=0, q\neq 0$ as well, so we are allowed to use this option for defining the constant of integration (which depends only on $q$). Due to the uniqueness and continuity of the function, the solution is also true for the case $p\neq0; q=0$. – Svyatoslav Apr 03 '22 at 07:34
1

With $t=2x$ $$ I=\int_{0}^{\pi/2} \ln(p + q \cos^2x)dx =\frac12\int^{\pi}_{0} \ln[a(1+2r\cos t +r^2)] dt$$ where $a=\frac14\left(\sqrt p+\sqrt{p+q}\right)^2$ and $r = \frac q{4a}$. Then, utilize the result $\int^{\pi}_{0} {\ln(1+r^2 +2r\cos t)}dt=0$ to obtain $$ I =\frac\pi2\ln a =\pi\ln\frac{\sqrt p+\sqrt{p+q}}2$$

Quanto
  • 97,352
1

$\newcommand{\d}{\,\mathrm{d}}\newcommand{\arcosh}{\operatorname{arcosh}}$A different approach based on J.G's comment:

$$I(p):=\int_0^{\pi/2}\ln(p+q\cdot\cos^2x)\d x\overset{t=\tan x}{=}\underset{J(p)}{\underbrace{\int_0^\infty\frac{\ln(p(1+t^2)+q)}{1+t^2}\d t}}-\underset{\pi\ln2}{\underbrace{\int_0^\infty\frac{\ln(1+t^2)}{1+t^2}\d t}}$$

About why the latter integral is $\pi\ln2$.

Differentiate $J$ w.r.t $p$:

$$J'(p)=\frac{1}{x}\int_0^\infty\frac{1}{t^2+\frac{p+q}{p}}\d t=\frac{1}{p\sqrt{\frac{p+q}{p}}}\int_0^\infty\frac{1}{t^2+1}\d t=\frac{\pi}{2}\cdot\frac{1}{\sqrt{p^2+pq}}$$

So that:

$$\begin{align}J(p)&=\frac{\pi}{2}\int_0^p\frac{1}{\sqrt{x^2+qx}}\d x+C\\&=\frac{\pi}{2}\int_0^p\frac{1}{\sqrt{(x+q/2)^2-q^2/4}}\d x+C\\&=\frac{\pi}{q}\int_0^p\frac{1}{\sqrt{\left(\frac{2}{q}x+1\right)^2-1}}\d x+C\\&=\frac{\pi}{2}\int_1^{\frac{2}{q}p+1}\frac{1}{\sqrt{x^2-1}}\d x+C\\&=\frac{\pi}{2}\arcosh\left(\frac{2}{q}p+1\right)+C\end{align}$$

We have:

$$C=J(0)=\int_0^\infty\frac{\ln q}{1+t^2}\d t=\frac{\pi}{2}\ln q$$

Putting it all together:

$$I(p)=J(p)-\pi\ln2=\frac{\pi}{2}\cdot\left(\ln q-2\ln2+\arcosh\left(\frac{2}{q}p+1\right)\right)$$

N.B. If the results concerning the $\pi\ln2$ integral are too complicated I expect you can solve the integral without subtracting out $\ln(1+t^2)$, it'd just be more tedious I think.

FShrike
  • 40,125