Question Number 39034 by maxmathsup by imad last updated on 01/Jul/18
$${calculate}\:{interms}\:{of}\:{n} \\ $$$${A}_{{n}} =\:\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\:\frac{{cos}\left({nx}\right)}{{cosx}\:+{sinx}}{dx}\:\:{and}\:{B}_{{n}} =\:\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\:\frac{{sin}\left({nx}\right)}{{cosx}\:+{sinx}}{dx}\:. \\ $$
Commented by math khazana by abdo last updated on 04/Jul/18
$${we}\:{have}\:{A}_{{n}} ={Re}\left(\:\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\frac{{e}^{{inx}} }{{cosx}\:+{sinx}}{dx}\right){and} \\ $$$${B}_{{n}} ={Im}\left(\:\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\frac{{e}^{{inx}} }{{cosx}\:+{sinx}}{dx}\right)\:{changement} \\ $$$${e}^{{ix}} ={z}\:{give} \\ $$$$\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\:\frac{{e}^{{inx}} }{{cosx}\:+{sinx}}{dx}\:=\:\int_{\mid{z}\mid=\mathrm{1}} \:\frac{{z}^{{n}} }{\frac{{z}+{z}^{−\mathrm{1}} }{\mathrm{2}}+\frac{{z}−{z}^{−\mathrm{1}} }{\mathrm{2}{i}}}\:\frac{{dz}}{{iz}} \\ $$$$=\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\:\frac{−\mathrm{2}{iz}^{{n}} }{{z}\left({z}+{z}^{−\mathrm{1}} −{i}\left({z}−{z}^{−\mathrm{1}} \right)\right)}{dz} \\ $$$$=\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\:\frac{−\mathrm{2}{i}\:{z}^{{n}} }{{z}^{\mathrm{2}} \:+\mathrm{1}−{iz}^{\mathrm{2}} \:+{i}}{dz} \\ $$$$=\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\:\:\frac{−\mathrm{2}{i}\:{z}^{{n}} }{\left(\mathrm{1}−{i}\right){z}^{\mathrm{2}} \:+\mathrm{1}+{i}}{dz} \\ $$$$=\frac{−\mathrm{2}{i}}{\mathrm{1}−{i}}\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\:\:\frac{{z}^{{n}} }{{z}^{\mathrm{2}} \:+\frac{\mathrm{1}+{i}}{\mathrm{1}−{i}}} \\ $$$$=\frac{−\mathrm{2}{i}\left(\mathrm{1}+{i}\right)}{\mathrm{2}}\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\:\:\frac{{z}^{{n}} }{{z}^{\mathrm{2}} \:+{i}}{dz}\:=\left(\mathrm{1}−{i}\right)\:\int_{\mid{z}\mid=\mathrm{1}} \:\:\frac{{z}^{{n}} }{{z}^{\mathrm{2}} \:+{i}}{dz} \\ $$$${let}\:\varphi\left({z}\right)=\frac{{z}^{{n}} }{{z}^{\mathrm{2}} \:+{i}}\:\Rightarrow\varphi\left({z}\right)\:=\frac{{z}^{{n}} }{{z}^{\mathrm{2}} −\left(\sqrt{−{i}}\right)^{\mathrm{2}} } \\ $$$$=\:\frac{{z}^{{n}} }{\left({z}−\sqrt{−{i}}\right)\left({z}+\sqrt{−{i}}\right)}\:=\frac{{z}^{{n}} }{\left({z}−{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)\left({z}+{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)} \\ $$$$\int_{−\infty} ^{+\infty} \:\:\varphi\left({z}\right){dz}\:=\mathrm{2}{i}\pi\left\{\:{Res}\left(\varphi,{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)\:+{Res}\left(\varphi,{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)\right\} \\ $$$${Res}\left(\varphi,\:{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)\:=\:\:\frac{{e}^{−{i}\frac{{n}\pi}{\mathrm{4}}} }{\mathrm{2}{e}^{−{i}\frac{\pi}{\mathrm{4}}} }\:=\:\frac{{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} }{\mathrm{2}} \\ $$$${Res}\left(\varphi,−{e}^{−\frac{{i}\pi}{\mathrm{4}}} \right)=\:\frac{\left(−\mathrm{1}\right)^{{n}} \:{e}^{−{i}\frac{{n}\pi}{\mathrm{4}}} }{−\mathrm{2}{e}^{−\frac{{i}\pi}{\mathrm{4}}} } \\ $$$$=−\frac{\left(−\mathrm{1}\right)^{{n}} }{\mathrm{2}}\:{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \:\Rightarrow \\ $$$$\int_{−\infty} ^{+\infty} \:\:\varphi\left({z}\right){dz}\:=\mathrm{2}{i}\pi\left\{\:\frac{\mathrm{1}}{\mathrm{2}}\:{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \:−\frac{\left(−\mathrm{1}\right)^{{n}} }{\mathrm{2}}\:{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \right\} \\ $$$$={i}\pi\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right)\:{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \\ $$$$={i}\pi\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right)\left\{{cos}\left(\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}\right)−{i}\:{sin}\left(\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}\right)\right\} \\ $$$$=\pi\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right)\left\{{icos}\:\left(\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}\right)+{sin}\left(\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}\right)\right\}\Rightarrow \\ $$$$\int_{\mathrm{0}} ^{\mathrm{2}\pi} \:\:\:\frac{{e}^{{inx}} }{{cosx}\:+{sinx}}{dx}\:=\left(\mathrm{1}−{i}\right){i}\pi\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right){e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \\ $$$$={i}\pi\sqrt{\mathrm{2}}\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right){e}^{−{i}\frac{\pi}{\mathrm{4}}} \:{e}^{−{i}\frac{\left({n}−\mathrm{1}\right)\pi}{\mathrm{4}}} \\ $$$$={i}\pi\sqrt{\mathrm{2}}\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right)\:{e}^{−\frac{{in}\pi}{\mathrm{4}}} \\ $$$$=\pi\sqrt{\mathrm{2}}\:\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right){i}\left\{{cos}\left(\frac{{n}\pi}{\mathrm{4}}\right)−{i}\:{sin}\left(\frac{{n}\pi}{\mathrm{4}}\right)\right\} \\ $$$$=\pi\sqrt{\mathrm{2}}\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right)\left\{\:{i}\:{cos}\left(\frac{{n}\pi}{\mathrm{4}}\right)\:+{sin}\left(\frac{{n}\pi}{\mathrm{4}}\right)\right\}\:\Rightarrow \\ $$$${A}_{{n}} =\pi\sqrt{\mathrm{2}}\left(\mathrm{1}−\left(−\mathrm{1}\right)^{{n}} \right){sin}\left(\frac{{n}\pi}{\mathrm{4}}\right)\:\:{and} \\ $$$${B}_{{n}} \:=\pi\sqrt{\mathrm{2}}\left(\mathrm{1}−\left(−\mathrm{1}\right)^{\boldsymbol{{n}}} \right)\boldsymbol{{cos}}\left(\frac{\boldsymbol{{n}}\pi}{\mathrm{4}}\right)\:\Rightarrow \\ $$$${A}_{\mathrm{2}{n}} =\mathrm{0}\:{and}\:{B}_{\mathrm{2}{n}} =\mathrm{0} \\ $$$${A}_{\mathrm{2}{n}+\mathrm{1}} =\mathrm{2}\pi\sqrt{\mathrm{2}}{sin}\left(\frac{\left(\mathrm{2}{n}+\mathrm{1}\right)\pi}{\mathrm{4}}\right)\:\:{and} \\ $$$${B}_{\mathrm{2}{n}+\mathrm{1}} =\mathrm{2}\pi\sqrt{\mathrm{2}}{cos}\left(\frac{\left(\mathrm{2}{n}+\mathrm{1}\right)\pi}{\mathrm{4}}\right). \\ $$$$ \\ $$$$ \\ $$