Determine a positive integer $n\leq5$,such that $\int_{0}^{1}e^x(x-1)^ndx=16-6e$.
I tried to solve it.But since $n$ is given to be $\leq$ 5,my calculations went lengthy.
Applying integration by parts repeatedly,we get
\begin{align}
\int e^x(x-1)^n \, dx &= \left[(x-1)^ne^x-n(x-1)^{n-1}e^x+n(n-1)(x-1)^{n-2}e^x \right. \\
& \hspace{5mm} \left.-n(n-1)(n-2)(x-1)^{n-3}e^x+n(n-1)(n-2)(n-3)(x-1)^{n-4}e^x \right. \\
& \hspace{5mm} \left.-n(n-1)(n-2)(n-3)(n-4)e^x\right]
\end{align}
\begin{align}
\int_{0}^{1}e^x(x-1)^n \, dx &= -n(n-1)(n-2)(n-3)(n-4)e-(-1)^n+n(-1)^{n-1}-n(n-1)(-1)^{n-2} \\
& \hspace{5mm} +n(n-1)(n-2)(-1)^{n-3}-n(n-1)(n-2)(n-3)(-1)^{n-4} \\
& \hspace{5mm} +n(n-1)(n-2)(n-3)(n-4) \\
&=16-6e
\end{align}
Now solving this is very difficult,is there another simple and elegant method to find $n=3.$