Integrating $\int^2_0 xe^{x^2}dx$
You mean $\frac12 e^4-\frac12$.
Also, one might set
$g(x) = e^{x^2}; \tag 1$
then
$g'(x) = 2xe^{x^2}; \tag 2$
then
$\displaystyle \int_0^2 xe^{x^2} \; dx = \dfrac{1}{2} \int_0^2 g'(x) \; dx = \dfrac{1}{2}(g(2) - g(0))$ $= \dfrac{1}{2}(e^{2^2} - e^0) = \dfrac{1}{2} (e^4 - 1) = \dfrac{1}{2}(e^4 - 1) = \dfrac{1}{2}e^4 - \dfrac{1}{2}. \tag{3}$
If one wants to use indefinite integrals, we write
$\displaystyle \int xe^{x^2} \; dx = \dfrac{1}{2} \int g'(x) \; dx = \dfrac{1}{2}g(x) + C = \dfrac{1}{2}e^{x^2} + C, \tag 4$
and then proceed to take
$g(2) - g(0) = \dfrac{1}{2}e^4 - \dfrac{1}{2}; \tag 5$
the constant of integration $C$ of course has been cancelled out of this expression.