Question Number 25887 by shivram198922@gmail.com last updated on 16/Dec/17
Answered by ajfour last updated on 16/Dec/17
$$\int_{\mathrm{0}} ^{\:\:\pi} \left[\mathrm{cos}\:\left({p}−{n}\right){x}−\mathrm{cos}\:\left({p}+{n}\right){x}\right]{dx} \\ $$$$=\frac{\mathrm{sin}\:\left({p}−{n}\right)\pi}{{p}−{n}}−\frac{\mathrm{sin}\:\left({p}+{n}\right)\pi}{{p}+{n}} \\ $$$$=\frac{{p}\left[\mathrm{sin}\:\left({p}−{n}\right)\pi−\mathrm{sin}\:\left({p}+{n}\right)\pi\right]}{{p}^{\mathrm{2}} −{n}^{\mathrm{2}} } \\ $$$$\:\:\:\:+\frac{{n}\left[\mathrm{sin}\:\left({p}−{n}\right)\pi+\mathrm{sin}\:\left({p}+{n}\right)\pi\right]}{{p}^{\mathrm{2}} −{n}^{\mathrm{2}} } \\ $$$$=\frac{−\mathrm{2}{p}\mathrm{sin}\:{n}\pi\mathrm{cos}\:{p}\pi+\mathrm{2}{n}\mathrm{sin}\:{p}\pi\mathrm{cos}\:{n}\pi}{{p}^{\mathrm{2}} −{n}^{\mathrm{2}} }\:. \\ $$