Integral with respect to $x +$ constant Is this a valid expression:
$$\int xd(x+5)$$
I am trying to calculate the value using a u-sub, of $u = x + 5$. So then $du = d(x+5)$ and so the result is:
$$\int (u - 5)du= \frac{u^2}{2} - 5u + C = \frac{(x+5)^2}{2} - 5(x+5) +C = \frac{x^2}{2} -12.5 + C $$
Or is it correct to just do $d(x+5) = dx$ from the beginning and calculate $$\int xd(x+5) = \int xdx$$ 

Of course it's a valid expression. So is this. Note that [1] and [2] are the same expression. :-)
$$\begin{align}
\int xe^{-x^2}dx &= \int \frac{xe^{-x^2}dx}{1}\\
&= \int \frac{xe^{-x^2}dx}{1}\cdot\frac{\frac{d(-x^2)}{dx}}{\frac{d(-x^2)}{dx}}\\
&= \int \frac{xe^{-x^2}dx\cdot\frac{d(-x^2)}{dx}}{-2x}\\
&= \int \frac{xe^{-x^2}d(-x^2)}{-2x}\\
&= \color{red}{-\frac{1}{2}\int e^{-x^2}d(-x^2)} &[1]\\
&= \color{green}{-\frac{1}{2}\int e^udu} &[2]\\
&= -\frac{1}{2}e^u + C\\
&= -\frac{1}{2}e^{-x^2} + C\\
\end{align}$$
