# How do you integrate int 3xe^(x^2+1) dx?

In this case, the integrand is the derivative of a function composition (up to a multiplicative constant):
$g \left(y\right) = {e}^{y}$
$f \left(x\right) = {x}^{2} + 1$
$\Rightarrow g \left(f \left(x\right)\right) = {e}^{{x}^{2} + 1}$
$\Rightarrow \frac{d}{\mathrm{dx}} \left[g \left(f \left(x\right)\right)\right] = \frac{d}{\mathrm{dx}} \left[{e}^{{x}^{2} + 1}\right] = 2 x {e}^{{x}^{2} + 1}$

The only difference is the multiplicative constant (it's $2$ instead of $3$), so we can rewrite the integral to look like the derivative of ${e}^{{x}^{2} + 1}$ by working with multiplicative constants:
$\int 3 x {e}^{{x}^{2} + 1} \mathrm{dx} = \frac{3}{2} \int 2 x {e}^{{x}^{2} + 1} \mathrm{dx} = \frac{3}{2} {e}^{{x}^{2} + 1} + C$

Another (very similar) way of solving this was to consider the substitution $u \left(x\right) = {x}^{2} + 1$. We could relate the two differentials $\mathrm{du} = 2 x \mathrm{dx}$ and rewrite the integral in terms of $u$:
$\int 3 x {e}^{{x}^{2} + 1} \mathrm{dx} = \int \frac{3}{2} {e}^{{x}^{2} + 1} \left(2 x \mathrm{dx}\right) = \int \frac{3}{2} {e}^{u} \mathrm{du} = \frac{3}{2} {e}^{u} + C$
Now we could return back to $x$:
$\frac{3}{2} {e}^{u} + C = \frac{3}{2} {e}^{{x}^{2} + 1} + C$