How I can evaluate in closed form this trigonometry integral
$$I_p=\int_0^{\pi}\frac{(1-\cos (px))(1+\cos x)}{\sin x}dx$$ , $p≥0$ positive integer
Original question is find : $(p+2)I_{p+2}-2I_{p+1}-pI_p$
What's about
$t=\tan (\frac{x}{2})$
Thanks!
How I can evaluate in closed form this trigonometry integral
$$I_p=\int_0^{\pi}\frac{(1-\cos (px))(1+\cos x)}{\sin x}dx$$ , $p≥0$ positive integer
Original question is find : $(p+2)I_{p+2}-2I_{p+1}-pI_p$
What's about
$t=\tan (\frac{x}{2})$
Thanks!
Copyright © 2021 JogjaFile Inc.
For $p\in\Bbb Z$, let
$$I_p=\int_0^\pi \frac{(1-\cos px)(1+\cos x)}{\sin x}\mathrm dx$$
Note first that the integral is convergent, since $\dfrac{1-\cos px}{\sin x}=\dfrac{p^2x^2/2+O(x^4)}{x+O(x^3)}=O(x)$ as $x\to0$, and likewise $\dfrac{1+\cos (\pi-x)}{\sin (\pi-x)}=\dfrac{1-\cos x}{\sin x}=O(x)$ as $x\to 0$.
Then
$$I_{p+2}=\int_0^\pi \frac{(1-\cos (p+2)x)(1+\cos x)}{\sin x}\mathrm dx\\ =\int_0^\pi \frac{(1-\cos px \cos 2x+\sin px\sin 2x)(1+\cos x)}{\sin x}\mathrm dx\\ =\int_0^\pi \frac{(1-\cos px (1-2\sin^2 x)+2\sin px\sin x\cos x)(1+\cos x)}{\sin x}\mathrm dx\\ =I_p+\int_0^\pi 2(\cos px \sin x+\sin px\cos x)(1+\cos x)\mathrm dx\\ =I_p+2\int_0^\pi \sin[(p+1)x](1+\cos x)\mathrm dx\\ =I_p+2\int_0^\pi \sin(p+1)x+\frac{\sin(p+2)x+\sin px}{2}\mathrm dx$$
Note that for integer $p\ne0$,
$$\int_0^\pi \sin px\mathrm dx=\left[\frac{-\cos px}{p}\right]_0^\pi=\frac{1-\cos\ p\pi}{p}=\frac{1-(-1)^p}{p}$$
To simplify the notation, we will still use this formula when $p=0$, with the convention that the term is zero if the denominator (and then also the numerator) is zero, which is harmless, since $\int_0^\pi \sin px\mathrm dx=0$ then.
Hence for all $p$
$$I_{p+2}=I_p+2\frac{1+(-1)^p}{p+1}+\frac{1-(-1)^p}{p+2}+\frac{1-(-1)^p}{p}$$
We have trivially $I_0=0$ and $I_1=\int_0^\pi\sin x\mathrm dx=2$.
See below for the proof of your recurrence relation. Here is the derivation of $I_{2p}$ and $I_{2p+1}$ for $p\ge0$. Both parts rely on what is proved above.
Then, from the recurrence, $I_{2p+2}=I_{2p}+\frac{4}{2p+1}$, hence
$$I_{2p}=4\left(\frac{1}{2p-1}+\frac{1}{2p-3}+\dots+\frac{1}{1}\right)=4\sum_{k=0}^{p-1}\frac{1}{2k+1}=4(H_{2p}-\frac12H_p)$$
And $I_{2p+1}=I_{2p-1}+\frac{2}{2p+1}+\frac{2}{2p-1}$, hence
$$I_{2p+1}=\frac{2}{2p+1}+4\left(\frac{1}{2p-1}+\frac{1}{2p-3}+\cdots+\frac{1}{1}\right)=\frac{2}{2p+1}+4(H_{2p}-\frac12H_p)$$
Now let $u_p=(p+2)I_{p+2}-2I_{p+1}-pI_p$ and let's prove $u_{p}=u_{p-2}$, then $u_p=4$ for all $p$.
Let $A_p=2\dfrac{1+(-1)^p}{p+1}+\dfrac{1-(-1)^p}{p+2}+\dfrac{1-(-1)^p}{p}$ and apply the previous relation $I_{p+2}=I_p+A_p$:
$$u_p=(p+2)I_{p+2}-2I_{p+1}-pI_p=(p+2)I_p+(p+2)A_p-2I_{p-1}-2A_{p-1} -pI_{p-2}-pA_{p-2}\\ =pI_p-2I_{p-1}-(p-2)I_{p-2}+(p+2)A_p-2A_{p-1}-pA_{p-2}+2I_p-2I_{p-2}$$
And $2I_p-2I_{p-2}=2A_{p-2}$, hence
$$u_{p}-u_{p-2}=(p+2)A_p-2A_{p-1}-(p-2)A_{p-2}$$
$$u_{p}-u_{p-2}=(p+2)\left[2\dfrac{1+(-1)^p}{p+1}+\dfrac{1-(-1)^p}{p+2}+\dfrac{1-(-1)^p}{p}\right]-2\left[2\dfrac{1-(-1)^p}{p}+\dfrac{1+(-1)^p}{p+1}+\dfrac{1+(-1)^p}{p-1}\right]-(p-2)\left[2\dfrac{1+(-1)^p}{p-1}+\dfrac{1-(-1)^p}{p}+\dfrac{1-(-1)^p}{p-2}\right]$$
$$u_{p}-u_{p-2}=\left[2\frac{p+2}{p+1}-\frac{2}{p+1}-\frac{2}{p-1}-2\frac{p-2}{p-1}\right](1+(-1)^p)+\left[\frac{p+2}{p+2}+\frac{p+2}{p}-\frac{4}{p}-\frac{p-2}{p}-\frac{p-2}{p-2}\right](1-(-1)^p)$$
And finally $u_{p}-u_{p-2}=0$.
We have yet to prove $u_0=u_1=4$. To achieve this, use again the recurrence relation $I_{p+2}=I_p+A_p$ to compute $I_2$ and $I_3$, as we already know $I_0=0$ and $I_1=2$. We get $I_2=4$ and $I_3=\frac{14}{3}$.
Then
$$u_0=2I_2-2I_1-0I_0=8-4=4$$ $$u_1=3I_3-2I_2-I_1=14-8-2=4$$
And we are done, $(p+2)I_{p+2}-2I_{p+1}-pI_p=4$ for all $p\in\Bbb Z$.