Question Number 26242 by abdo imad last updated on 22/Dec/17
$${prove}\:{that}\:\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:\:{cos}^{\mathrm{2}} \left({kx}\right)=\:\frac{{n}+\mathrm{1}}{\mathrm{2}}\:\:+\:\frac{{sin}\left(\left({n}+\mathrm{1}\right){x}\right){cos}\left({nx}\right)}{\mathrm{2}\:{sinx}} \\ $$$${x}\:{from}\:{R}−\left\{\:{k}\pi.{k}\varepsilon{Z}\right\}{then}\:{find}\:{the}\:{value}\:{of}\:{integral} \\ $$$$\int_{\mathrm{0}} ^{\pi} \:\:\frac{{sin}\left(\left({n}+\mathrm{1}\right){x}\right){cos}\left({nx}\right)}{{sinx}}{dx} \\ $$$$ \\ $$
Commented by abdo imad last updated on 28/Dec/17
$$\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:{cos}^{\mathrm{2}} \left({kx}\right)=\frac{\mathrm{1}}{\mathrm{2}}\:\sum_{{k}=\mathrm{0}} ^{{k}={n}\:} \left(\mathrm{1}+{cos}\left(\mathrm{2}{kx}\right)\right) \\ $$$$=\:\frac{{n}+\mathrm{1}}{\mathrm{2}}+\:\frac{\mathrm{1}}{\mathrm{2}}\:\sum_{{k}=\mathrm{0}} ^{{n}} {cos}\left(\mathrm{2}{kx}\right)\:{but}\:\:\:\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} {cos}\left(\mathrm{2}{kx}\right)\:={Re}\left(\:\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:{e}^{{i}\mathrm{2}{kx}} \:\right) \\ $$$$=\:{Re}\left(\frac{\mathrm{1}−{e}^{{i}\mathrm{2}\left({n}+\mathrm{1}\right){x}} }{\mathrm{1}−\:{e}^{{i}\mathrm{2}{x}} }\right)\:{but}\:\:\:\frac{\mathrm{1}−{e}^{{i}\mathrm{2}\left({n}+\mathrm{1}\right){x}} }{\mathrm{1}−{e}^{{i}\mathrm{2}{x}} }\:=\:\frac{\mathrm{1}−{cos}\mathrm{2}\left({n}+\mathrm{1}\right){x}\:−{isin}\left(\mathrm{2}\left({n}+\mathrm{1}\right){x}\right)}{\mathrm{1}\:−{cos}\left(\mathrm{2}{x}\right)−{isin}\left(\mathrm{2}{x}\right)} \\ $$$$=\frac{\:\mathrm{2}{sin}^{\mathrm{2}} \left({n}+\mathrm{1}\right){x}\:−\mathrm{2}{isin}\left({n}+\mathrm{1}\right){x}\:{cos}\left({n}+\mathrm{1}\right){x}}{\mathrm{2}{sin}^{\mathrm{2}} {x}\:−\mathrm{2}{i}\:{sinx}\:{cosx}} \\ $$$$=\:\frac{−{isin}\left({n}+\mathrm{1}\right){x}\left(\:{cos}\left({n}+\mathrm{1}\right){x}\:+{isin}\left({n}+\mathrm{1}\right){x}\right)}{−{isinx}\left(\:{cosx}\:+{i}\:{sinx}\right)} \\ $$$$=\:\frac{{sin}\left({n}+\mathrm{1}\right){x}}{{sinx}}\:{e}^{{i}\left({n}+\mathrm{1}\right){x}} \:{e}^{−{ix}} =\:\frac{{sin}\left({n}+\mathrm{1}\right){x}}{{sinx}}\:{e}^{{inx}} \\ $$$$=\:\frac{{sin}\left({n}+\mathrm{1}\right){x}}{{sinx}}{cos}\left({nx}\right)\:+{i}\:\frac{{sin}\left({n}+\mathrm{1}\right){x}\:{sin}\left({nx}\right)}{{sinx}} \\ $$$$\Rightarrow\:\:{Re}\left(\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:{e}^{{i}\mathrm{2}{kx}} \right)=\:\:\frac{{sin}\left({n}+\mathrm{1}\right){x}\:{cos}\left({nx}\right)}{{sinx}} \\ $$$$\Rightarrow\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:{cos}^{\mathrm{2}} \left({kx}\right)=\:\frac{{n}+\mathrm{1}}{\mathrm{2}}+\:\:\frac{{sin}\left({n}+\mathrm{1}\right){x}\:{cos}\left({nx}\right)}{\mathrm{2}{sinx}} \\ $$$$\int_{\mathrm{0}} ^{\pi} \frac{{sin}\left({n}+\mathrm{1}\right){x}\:{cos}\left({nx}\right)}{\mathrm{2}{sinx}}{dx}=\:\sum_{{k}=>} ^{{n}} \int_{\mathrm{0}} ^{\pi} {cos}^{\mathrm{2}} \left({kx}\right){dx}−\frac{\left({n}+\mathrm{1}\right)\pi}{\mathrm{2}} \\ $$$$=\:\frac{\mathrm{1}}{\mathrm{2}}\sum_{{k}=\mathrm{0}} ^{{k}={n}} \int_{\mathrm{0}} ^{\pi} \left(\mathrm{1}+\:{cos}\left(\mathrm{2}{kx}\right)\right){dx}\:−\frac{\left({n}+\mathrm{1}\right)\pi}{\mathrm{2}} \\ $$$$=\:\frac{\mathrm{1}}{\mathrm{2}}\:\sum_{{k}=\mathrm{0}} ^{{k}={n}} \:\int_{\mathrm{0}} ^{\pi} {cos}\left(\mathrm{2}{kx}\right){dx}\:=\:\frac{\pi}{\mathrm{2}}+\:\sum_{{k}=\mathrm{1}} ^{{k}={n}} \left[\frac{\mathrm{1}}{\mathrm{2}{k}}\:{sin}\left(\mathrm{2}{kx}\right)\right]_{{k}=\mathrm{0}} ^{{k}=\pi=} \\ $$$$=\frac{\pi}{\mathrm{2}}\:+\mathrm{0}\:=\:\frac{\pi}{\mathrm{2}}\Rightarrow\:\:\int_{\mathrm{0}} ^{\pi} \frac{{sin}\left({n}+\mathrm{1}\right){x}\:{cos}\left({nx}\right)}{{sinx}}{dx}\:=\pi \\ $$