# Evaluating $\int_{0}^{\pi}\frac{\cos^m(x/2)}{1+\sin(x/2)} \frac{\sin^n(x/2)}{\ln\sin(x/2)}dx$

We wish to evaluate this integral, $$\int_{0}^{\pi}\frac{\cos^m(x/2)}{1+\sin(x/2)}\cdot \frac{\sin^n(x/2)}{\ln\sin(x/2)}\mathrm dx=F(m,n)$$

We also know the closed form for:

$$F(3,n)=-2\ln\left(\frac{n+2}{n+1}\right)$$

$$F(5,n)=-2\ln\left(\frac{(n+2)(n+3)}{(n+1)(n+4)}\right)$$

This is not a contest integral, it is just made up integral.

• Using mathematica to solve the integrals, there does seem to be a formula for odd $m$. I conjecture that $$F(m,n)=2\ln\left(\frac{(n+1)^a(n+3)^b(n+6)^c\dots}{(n+2)^d(n+4)^e(n+5)^f\dots}\right)$$ Where all of the superscipts are binomial coefficients. So for $m=13$, $$F(13,n)=2\ln\left(\frac{\left(1+k\right)\left(4+k\right)^5\left(5+k\right)^{10}\left(8+k\right)^{10}\left(9+k\right)^5\left(12+k\right)}{\left(2+k\right)\left(3+k\right)^5\left(6+k\right)^{10}\left(7+k\right)^{10}\left(10+k\right)^5\left(11+k\right)}\right)$$ There is definitely a nicer way of writing this but I am in a hurry. Jul 10, 2019 at 21:34
• Thank you @Tom Himler
– user569129
Jul 10, 2019 at 22:04
• Here is another way of writing it (I'll leave it to you to decide if this is cleaner), for odd $m>1$, $$F(m,n)=2\sum_{k=0}^{\lfloor\frac{m-1}{4}\rfloor}\left(\binom{\frac{m-3}{2}}{2k} \ln\left(\frac{4k+1+n}{4k+2+n}\right)+\binom{\frac{m-3}{2}}{2k+1}\ln\left(\frac{4k+4+n}{4k+3+n}\right)\right)$$ There may be some simplifications that can be done. I'll take a crack at trying to solve it, but this may be better for the higher ups. Jul 11, 2019 at 0:51
• In fact, the above can be written as, $$2\sum_{k=0}^{\lfloor\frac{m-1}{2}\rfloor} (-1)^k\binom{\frac{m-3}{2}}{k}\ln\left(\frac{2k+1+n}{2k+2+n}\right)$$ Jul 11, 2019 at 0:58

Note this solution is only for odd $$m>1$$. Using the substitution $$u=\frac{x}{2}$$ followed by $$t=\sin(u)$$ $$I(m,n)=\int_{0}^\pi \frac{\cos^m(x/2)\sin^n(x/2)}{(1+\sin(x/2))\ln(\sin(x/2))}dx=$$ $$2\int_{0}^1\frac{(1+t)^{\frac{m-1}{2}-1}(1-t)^{\frac{m-1}{2}}t^n}{\ln(t)}dt$$ Now using the binomial theorem, $$I_n(m,n)=2\int_{0}^1(1+t)^{\frac{m-1}{2}-1}(1-t)^{\frac{m-1}{2}}t^ndx=$$ $$2\sum_{v=0}^{\frac{m-3}{2}}\sum_{w=0}^{\frac{m-1}{2}}\binom{\frac{m-3}{2}}{v}\binom{\frac{m-1}{2}}{w}(-1)^w\int_{0}^1 t^{v+w+n}=$$ $$2\sum_{v=0}^{\frac{m-3}{2}}\sum_{w=0}^{\frac{m-1}{2}}\binom{\frac{m-3}{2}}{v}\binom{\frac{m-1}{2}}{w}(-1)^w\frac{1}{1+v+w+n}$$ This implies, $$I(m,n)=2\sum_{v=0}^{\frac{m-3}{2}}\sum_{w=0}^{\frac{m-1}{2}}\binom{\frac{m-3}{2}}{v}\binom{\frac{m-1}{2}}{w}(-1)^w\ln(1+v+w+n)+f(m)$$ For some function $$f(m)$$. I'm a bit tired, so I'm going to stop here. Numerically it seems that this agrees for values up to about $$1 if $$f(m)=0$$, but then it diverges slowly off. I'm not entirely sure if it's my calculator or if $$f(m)$$ is causing it to diverge. Also, the above sum can most likely be simplified to what I wrote in the comments. Another note is that I'm not really sure why this applies to odd integers greater than $$1$$. It could have to do with $$f(m)$$.