Integration by parts or substitution? $$\int_{}^{}x e^x \mathrm dx$$
One of my friends said substitution , but I can't seem to get it to work.
Otherwise I also tried integration by parts but I'm not getting the same answer as wolfram.
The space in the question seems like it shouldn't take more than 2 lines though. Am I missing something?
Thanks to all the answers below , I messed up in the original question it was actually 
$$\int_{}^{}x e^{x^2} \mathrm dx$$
With help from the below answers I did the following:
Let $u = x^2$ , then $du=2x\mathrm dx$
So rewriting the integral
$$\int_{}^{}{{x\cdot e^u} {1 \over 2x}} \mathrm dx$$
Simplifying yields:
$${1 \over 2x}\int_{}^{}{e^u}\mathrm dx$$
Which in turn yields:
$${\frac{e^u}{2}} + C$$ 
The rest is fairly obvious!
 A: Definitely by parts, as substitution of $x$ won't get you anywhere.
Let $u=e^x$ and $dv=e^x$ in $\int udv=uv-\int vdu$
and we have
$$ 
\int xe^xdx=xe^x-\int e^x dx=xe^x-e^x+c
$$
As a general tip, you will usually want to use parts if you have an exponential, which doesn't get any nastier as you anti-differentiate, and a polynomial which will disappear after some number of differentiations. A notable exception is when you have something like
$$
\int xe^{x^2}dx
$$
Where a $u=x^2$ substitution will cancel out the $x$ coefficient on the exponential.
A: Yes you can solve it by substitution (which is not trivial in this case) but you can choose:
$$u = e^x(x-1) \rightarrow du=xe^xdx\rightarrow dx=\dfrac{du}{xe^x}$$ 
Replacing in the integral, you get:
$$\int{xe^x \mathrm dx}= \int{du=u+C=e^x(x-1)}+C$$
NOTE the easiest way to solve the integrals in this form ($P_1(x)e^x$) is by using integration by parts
A: You can do it by parts $$\int { x{ e }^{ x }dx }  =\int { xd{ e }^{ x } } =x{ e }^{ x }-\int { { e }^{ x }dx } ={ e }^{ x }\left( x-1 \right) +C$$
