A Reduction Formula

We may use the method of integration by parts to obtain a reduction formula for $x^ne^x\, dx$: \[\int x^ne^x\, dx=x^ne^x-n\int x^{n-1}e^x\, dx.\] What would be good choices for $u$ and $dv$ to obtain this formula?

Reduction formulas may also be found for integrals of trigonometric functions such as $\displaystyle\int\! \cos^n(x)\, dx$.