Answer
$$\frac{{{x^n}{e^{ax}}}}{a} - \frac{n}{a}\int {{e^{ax}}{x^{n - 1}}dx} ,\,\,\,\,\,\,\,a \ne 0$$
Work Step by Step
$$\eqalign{
& \int {{x^n}{e^{ax}}} dx \cr
& {\text{Using the integration by parts method }} \cr
& \,\,\,\,\,{\text{Let }}\,\,\,\,\,u = {x^n},\,\,\,\,\,\,\,du = n{x^{n - 1}}dx \cr
& \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,dv = {e^{ax}}dx,\,\,\,\,\,\,\,v = \frac{1}{a}{e^{ax}} \cr
& \cr
& {\text{Integration by parts formula }}\int {udv} = uv - \int {vdu.{\text{ T}}} {\text{hen}}{\text{,}} \cr
& \int {udv} = uv - \int {vdu} \,\,\,\, \cr
& \to \int {{x^n}{e^{ax}}} dx = \left( {{x^n}} \right)\left( {\frac{1}{a}{e^{ax}}} \right) - \int {\left( {\frac{1}{a}{e^{ax}}} \right)\left( {n{x^{n - 1}}dx} \right)} \cr
& \cr
& {\text{simplifying}} \cr
& \int {{x^n}{e^{ax}}} dx = \frac{{{x^n}{e^{ax}}}}{a} - \int {\frac{n}{a}{e^{ax}}{x^{n - 1}}dx} \cr
& \int {{x^n}{e^{ax}}} dx = \frac{{{x^n}{e^{ax}}}}{a} - \frac{n}{a}\int {{e^{ax}}{x^{n - 1}}dx} ,\,\,\,\,\,\,\,a \ne 0 \cr} $$