It is known that the following integrals can be solved like this:
$$I_1=\int{xe^xdx}=xe^x-e^x+C_1$$ $$I_2=\int{(xe^x)^2dx}=\frac 1 2x^2e^{2x}-\frac 1 2 xe^{2x}+\frac 1 4e^{2x}+C_2$$
What about $\int{(xe^x)^\sqrt2dx}$ or $\int{(xe^x)^edx}$?
It is known that the following integrals can be solved like this:
$$I_1=\int{xe^xdx}=xe^x-e^x+C_1$$ $$I_2=\int{(xe^x)^2dx}=\frac 1 2x^2e^{2x}-\frac 1 2 xe^{2x}+\frac 1 4e^{2x}+C_2$$
What about $\int{(xe^x)^\sqrt2dx}$ or $\int{(xe^x)^edx}$?
Copyright © 2021 JogjaFile Inc.
Let, $$ I_a=\int (xe^x)^a\,\mathrm dx. $$ If $a$ is a nonnegative integer we may evaluate $I_a$ in closed-form using repreated integration by parts. If, however, $a$ is not a nonnegative integer integration by parts no longer works and we instead perform the substitution $u=-ax$ to write $$ \begin{align} I_a &=(-a)^{-a-1}\int u^ae^{-u}\,\mathrm du\\ &=(-a)^{-a-1}\int_0^u t^ae^{-t}\,\mathrm dt\\ &=(-a)^{-a-1}\gamma(a+1,u)+C\\ &=(-a)^{-a-1}\gamma(a+1,-a x)+C, \end{align} $$ where $\gamma(s,z)$ is the lower incomplete gamma function. Indeed, if $a=n=0,1,2,\dots$ we may use the specialized value found here to write $$ I_n=(-n)^{-n-1} n!\left(1-e^{ax}\sum_{k=0}^n\frac{(-ax)^k}{k!}\right)+C, $$ which is the solution you would obtain via integration by parts.