Question Number 67795 by mathmax by abdo last updated on 31/Aug/19
$${let}\:\:{A}_{{p}} =\int_{\mathrm{0}} ^{\pi} \:{x}^{{p}} \:{cos}\left({nx}\right){dx} \\ $$$$\left.\mathrm{1}\right)\:{calculate}\:{A}_{\mathrm{0}} ,{A}_{\mathrm{1}} ,{A}_{\mathrm{2}} \\ $$$$\left.\mathrm{2}\right){determine}\:{a}\:{relation}\:{of}\:{recurrence}\:{between}\:\:{A}_{{p}} \\ $$
Commented by mathmax by abdo last updated on 03/Sep/19
$$\left.\mathrm{1}\right)\:{A}_{\mathrm{0}} =\int_{\mathrm{0}} ^{\pi} \:{cos}\left({nx}\right){dx}\:=\left[\frac{\mathrm{1}}{{n}}{sin}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} \:=\mathrm{0} \\ $$$${A}_{\mathrm{1}} =\int_{\mathrm{0}} ^{\pi} \:{x}\:{cos}\left({nx}\right){dx}\:\:\:{by}\:{parts}\: \\ $$$${A}_{\mathrm{1}} =\left[\frac{{x}}{{n}}{sin}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi\:} −\int_{\mathrm{0}} ^{\pi} \frac{\mathrm{1}}{{n}}{sin}\left({nx}\right){dx} \\ $$$$=−\frac{\mathrm{1}}{{n}}\:\int_{\mathrm{0}} ^{\pi} \:{sin}\left({nx}\right){dx}\:=−\frac{\mathrm{1}}{{n}}\left[−\frac{\mathrm{1}}{{n}}{cos}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} =\frac{\mathrm{1}}{{n}^{\mathrm{2}} }\left\{\:\left(−\mathrm{1}\right)^{{n}} −\mathrm{1}\right\} \\ $$$${A}_{\mathrm{2}} =\int_{\mathrm{0}} ^{\pi} \:{x}^{\mathrm{2}} {cos}\left({nx}\right){dx}\:=_{{by}\:{parts}} \:\:\:\left[\frac{{x}^{\mathrm{2}} }{{n}}{sin}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} \:−\int_{\mathrm{0}} ^{\pi} \:\frac{\mathrm{2}{x}}{{n}}{sin}\left({nx}\right){dx} \\ $$$$=−\frac{\mathrm{1}}{{n}}\int_{\mathrm{0}} ^{\pi} \:{xsin}\left({nx}\right){dx}\:=−\frac{\mathrm{1}}{{n}}\left\{\:\left[−\frac{{x}}{{n}}{cos}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} −\int_{\mathrm{0}} ^{\pi} −\frac{\mathrm{1}}{{n}}{cos}\left({nx}\right){dx}\right\} \\ $$$$=−\frac{\mathrm{1}}{{n}}\left\{−\frac{\mathrm{1}}{{n}}\left(\pi\left(−\mathrm{1}\right)^{{n}} \right)\:+\frac{\mathrm{1}}{{n}^{\mathrm{2}} }\left[{sin}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} \right\} \\ $$$$=\frac{\pi}{{n}^{\mathrm{2}} }\left(−\mathrm{1}\right)^{{n}} \\ $$
Commented by mathmax by abdo last updated on 04/Sep/19
$$\left.\mathrm{2}\right)\:{by}\:{parts}\:\:{u}^{'} ={x}^{{p}} \:{and}\:{v}={cos}\left({nx}\right)\:\Rightarrow \\ $$$${A}_{{p}} =\left[\frac{{x}^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\:{cos}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} \:−\int_{\mathrm{0}} ^{\pi} \:\frac{{x}^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−{nsin}\left({nx}\right)\right){dx} \\ $$$$=\frac{\pi^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−\mathrm{1}\right)^{{n}} \:\:+\frac{{n}}{{p}+\mathrm{1}}\:\int_{\mathrm{0}} ^{\pi} \:\:{x}^{{p}+\mathrm{1}} \:{sin}\left({nx}\right){dx}\:{again}\:{by}\:{parts} \\ $$$${u}^{'} \:={x}^{{p}+\mathrm{1}} \:{and}\:{v}\:={sin}\left({nx}\right)\:\Rightarrow \\ $$$$\int_{\mathrm{0}} ^{\pi} \:\:{x}^{{p}+\mathrm{1}} \:{sin}\left({nx}\right){dx}\:=\left[\frac{{x}^{{p}+\mathrm{2}} }{{p}+\mathrm{2}}\:{sin}\left({nx}\right)\right]_{\mathrm{0}} ^{\pi} \:−\int_{\mathrm{0}} ^{\pi} \:\frac{{x}^{{p}+\mathrm{2}} }{{p}+\mathrm{2}}\frac{\mathrm{1}}{{n}}{cos}\left({nx}\right){dx} \\ $$$$=−\frac{\mathrm{1}}{{n}\left({p}+\mathrm{2}\right)}\:\int_{\mathrm{0}} ^{\pi} \:{x}^{{p}+\mathrm{2}} \:{cos}\left({nx}\right){dx}\:=−\frac{\mathrm{1}}{{n}\left({p}+\mathrm{2}\right)}\:{A}_{{p}+\mathrm{2}} \:\Rightarrow \\ $$$${A}_{{p}} =\frac{\pi^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−\mathrm{1}\right)^{{n}} \:+\frac{{n}}{{p}+\mathrm{1}}\left(−\frac{\mathrm{1}}{{n}\left({p}+\mathrm{2}\right)}\right){A}_{{p}+\mathrm{2}} \:\Rightarrow \\ $$$${A}_{{p}} =\frac{\pi^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−\mathrm{1}\right)^{{n}} −\frac{\mathrm{1}}{\left({p}+\mathrm{1}\right)\left({p}+\mathrm{2}\right)}\:{A}_{{p}+\mathrm{2}} \:\:\:\Rightarrow \\ $$$$\frac{\mathrm{1}}{\left({p}+\mathrm{1}\right)\left({p}+\mathrm{2}\right)}\:{A}_{{p}+\mathrm{2}} =\frac{\pi^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−\mathrm{1}\right)^{{n}} \:−{A}_{{p}} \:\Rightarrow \\ $$$${A}_{{p}+\mathrm{2}} =\left({p}+\mathrm{1}\right)\left({p}+\mathrm{2}\right)\frac{\pi^{{p}+\mathrm{1}} }{{p}+\mathrm{1}}\left(−\mathrm{1}\right)^{{n}} −\:\left({p}+\mathrm{1}\right)\left({p}+\mathrm{2}\right){A}_{{p}} \:\Rightarrow \\ $$$${A}_{{p}+\mathrm{2}} \:=\left({p}+\mathrm{2}\right)\left(−\mathrm{1}\right)^{{n}} \pi^{{p}+\mathrm{1}} \:−\left({p}+\mathrm{1}\right)\left({p}+\mathrm{2}\right){A}_{{p}} \\ $$