Seeking help to find $\int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x.$

282 Views Asked by At

Good News

Thanks to @Quanto who used dilogarithm function and gave an elegant answer to the integral $$\boxed{\int \ln(1+\sin x)dx= -x\ln2-2 \Im \text{Li}_2(i e^{i x}) }$$ Hence

\begin{align}& \int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x\\ = &2x\ln2+4 \Im \text{Li}_2(i e^{i x}) )-4x+(\tan x-\sec x)\left[(\ln(1+\sin x)+2)^2 +4\right]+C \end{align}


When I met the integral $$\int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x,$$ I first doubted whether it has elementary primitive. Then I tried the simpler one

$$\int \frac{\ln (1+\sin x)}{1+\sin x} d x.$$

I first integrate the denominator for integration by parts

$$\displaystyle \begin{aligned}\int \frac{1}{1+\sin x} d x = & \int \frac{1-\sin x}{\cos ^2 x} d x \\= & \int\left(\sec ^2 x-\tan x \sec x\right) d x \\= & \tan x-\sec x+c\end{aligned}\tag*{} $$ Now we can proceed the integration by parts. $$\displaystyle \begin{aligned}I & =\int \ln (1+\sin x) d(\tan x-\sec x) \\& =(\tan x-\sec x) \ln (1+\sin x)-\int(\tan x-\sec x) \frac{\cos x}{1+\sin x} \\& =\frac{\sin x-1}{\cos x} \ln (1+\sin x)-\int \frac{\sin x-1}{\cos x} \cdot \frac{\cos x}{1+\sin x} d x \\& =\frac{\sin x-1}{\cos x} \ln (1+\sin x)-\int\left(1-\frac{2}{1+\sin x}\right) d x \\& =\frac{\sin x-1}{\cos x} \ln (1+\sin x)-x+2(\tan x-\sec x)+C \\& = (\tan x-\sec x)\left[\ln (1+\sin x)+2\right]-x+C \end{aligned}\tag*{} $$


Then I tried the harder one similarly.

Latest update

$$ \begin{aligned}&\int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x \\= & \int \ln ^2(1+\sin x) d(\tan x-\sec x) \\ = & (\tan x-\sec x) \ln ^2(1+\sin x)+2\int \frac{ \ln (1+\sin x)}{1+\sin x}(1-\sin x) d x\\=& (\tan x-\sec x) \ln ^2(1+\sin x)+4 \int \frac{\ln (1+\sin x)}{1+\sin x} d x -2 \int \ln (1+\sin x) d x \\=& (\tan x-\sec x)\left[\left(\ln(1+\sin x)+2)^2+4\right]\right.-4x -2 \int \ln (1+\sin x) d x \end{aligned} $$ Then I was stuck by the last integral, the hardest one.

Having no idea, I tried to use the expansion of $\ln(1+x)$ for $|x|<1$,

$$ \int \ln (1+\sin x) d x=\sum_{k=1}^{\infty} \frac{(-1)^{k-1}}{k} \int \sin ^k x d x $$ Using $\sin x= \frac{e^{x i}-e^{-x i}}{2 i}$, we get

$$\int \sin ^{k} x d x=\frac{1}{2 ^k i ^k} \sum_{r=0}^k\left(\begin{array}{l} k \\ r \end{array}\right)(-1)^r\frac{e^{(k-2 r) x i}}{(k-2 r) i}$$

So $$\int \ln (1+\sin x) d x = -\sum_{k=1}^{\infty} \frac{i^{k-1}}{k2^k} \left[ \sum_{r=0}^k\left(\begin{array}{l} k \\ r \end{array}\right)(-1)^r\frac{e^{(k-2 r) x i}}{k-2 r}\right] +C$$ Now we can conclude that

$$\boxed{\int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x \\ = (\tan x-\sec x)\left[\left(\ln(1+\sin x)+2)^2+4\right]\right.-4x \\+2\left(\sum_{k=1}^{\infty} \frac{i^{k-1}}{k2^k} \left[ \sum_{r=0}^k\left(\begin{array}{l} k \\ r \end{array}\right)(-1)^r\frac{e^{(k-2 r) x i}}{k-2 r}\right]\right)}$$ which is ugly and not a closed form.


Can you help me to find the hardest one $\int \ln (1+\sin x) d x $?

Your suggestion and help are highly appreciated.

2

There are 2 best solutions below

2
On BEST ANSWER

Utilize the known integral $\int \ln(2\cos t)dt=\frac12\Im \text{Li}_2(-e^{-2i t}) $ and the substitution $x=\frac\pi2-2t$ to obtain $$J=\int \ln(1+\sin x)dx= -x\ln2-2 \Im \text{Li}_2(i e^{i x}) $$ and, in turn

\begin{align} &\int \frac{\ln ^2(1+\sin x)}{1+\sin x} d x\\ = &-2J-4x+(\tan x-\sec x)\left[(\ln(1+\sin x)+2)^2 +4\right] \end{align}

1
On

Beside the solution given by Wolfram Alpha, using $x=\sin^{-1}(t)$, we face $$I=\int \frac{\log ^2(1+\sin (x))}{1+\sin (x)}\,dx=\int \frac{\log ^2(t+1)}{(t+1) \sqrt{1-t^2}}\,dt$$ which has a solution if we invoke generalized hypergeometric functions (which hides polylogarithm functions).

Mathematica returns $$-\sqrt{2(t+1)}\,I=16 \, _3F_2\left(-\frac{1}{2},-\frac{1}{2},-\frac{1}{2};\frac{1}{2}, \frac{1}{2};\frac{t+1}{2}\right)+$$ $$\sqrt{2} \log (t+1) \left(4 \sqrt{t+1} \sin ^{-1}\left(\sqrt{\frac{t+1}{2}}\right)+\sqrt{1-t}\, (4+\log (t+1))\right)$$

From a computational point of view, this requires less effort than what Wolfram Alpha returns.