We know the solutions of this integral (Bronstein-Semendijajev mathematics manual [page474]):
\begin{align} \int\limits_{0}^{\infty}x^n \cdot e^{-ax^2}dx = \frac{1\cdot3\dots(2k-1)\,\,\sqrt{\pi}}{2^{k+1}a^{k+1/2}}\longleftarrow\substack{\text{$n$ is the exponent over $x$}\\\text{while $k=n/2$}} \end{align}
But how do I calculate the integral if I change the upper limit from $\infty$ to $x_1$ which is constant - for example how do I calculate this integral:
\begin{align} \int\limits_{0}^{x_1}x^2 \cdot e^{-ax^2}dx \end{align}
Let
$$I(a) = \int_0^{x_1} dx \, e^{-a x^2} = \frac12 \sqrt{\frac{\pi}{a}} \text{erf}(\sqrt{a} x_1)$$
Then the integral in question is $-\partial I/\partial a$, which is
$$\frac14 \sqrt{\frac{\pi}{a^3}} \text{erf}(\sqrt{a} x_1) - e^{-a x_1^2} \frac{x_1}{2 a}$$
This may be used for even $n$, using successively higher derivatives with respect to $a$. For odd $n$, you may rather use derivatives with respect to $a$ of the integral
$$\int_0^{x_1} dx \, x \, e^{-a x^2} = \frac12 \frac{1-e^{-a x_1^2}}{a}$$