TITLE: Trigonometric and Exponential Integration
QUESTION [6 upvotes]: If $\displaystyle I_{n} =\int^{\infty}_{\frac{\pi}{2}}e^{-x}\cos^{n}(x)dx.$  Then $\displaystyle \frac{I_{2018}}{I_{2016}}$ is 

Try: using by parts
$$I_{n}=\int^{\infty}_{\frac{\pi}{2}}e^{-x}\cos^{n}(x)dx$$
$$I_{n}=-\cos^{n}(x)\cdot e^{-x}\bigg|^{\infty}_{\frac{\pi}{2}}-n\int^{\infty}_{\frac{\pi}{2}}\cos^{n-1}(x)\sin(x)\cdot e^{-x}dx$$
$$I_{n}=n\int^{\infty}_{\frac{\pi}{2}}\cos^{n-1}(x)\sin(x)\cdot e^{-x}dx$$
Could some help me to solve it, Thanks

REPLY [5 votes]: For brevity we set
$$f_{c,s}(x):= e^{-x}\cos^c(x)\sin^s(x),$$
$$F_{c,s}(x):=\int f_{c,s}(x)\,dx.$$
Then by parts, integrating on $e^{-x}$,
$$F_{c,0}=-f_{c,0}-cF_{c-1,1}$$
and
$$F_{c-1,1}=-f_{c-1,1}-(c-1)F_{c-2,2}+F_{c,0}.$$
Using $\sin^2x=1-\cos^2x$ (i.e. $F_{c-2,2}=F_{c-2,0}-F_{c,0}$) and the fact that the $f$ terms vanish, we have after simplification,
$$(c^2+1)F_{c,0}=c(c-1)F_{c-2,0}.$$