Could someone help me in evaluating this integral please? :
$$\int_{0}^x t^2\exp(-t^2) dt$$
By error function method please
I spliced the integrand into $t\cdot t\cdot \exp(-t^2)$ then doing integral by parts I arrived to $-\frac{x}{2}\exp(-x^2)+\frac{1}{2}\text{erf}(x)$
But in my problem set the result is given by $-\frac{x}{2}\exp(-x^2) + \frac{\sqrt{\pi}}{4}\text{erf}(x)$
I don't know what is the problem here Please help
Rewriting the given integral, we have \begin{align*} \int_{0}^x t^2 e^{-t^2} \;\mathrm{d}t & = -\frac{1}{2}\int_{0}^x t \;\mathrm{d}\left(e^{-t^2}\right) \\ & = -\frac{1}{2}\left\{\left[t e^{-t^2}\right]\Bigg{|}_{0}^x - \int_{0}^x e^{-t^2} \; \mathrm{d}t\right\} \\ & = -\frac{x}{2}e^{-x^2}+\frac{1}{2}\int_{0}^x e^{-t^2} \; \mathrm{d}t \\ & = -\frac{x}{2}e^{-x^2}+\frac{1}{2} \times \frac{\sqrt{\pi}}{2}\operatorname{erf}(x) \\ & = \frac{x}{2}e^{-x^2} + \frac{\sqrt{\pi}}{4}\operatorname{erf}(x). \end{align*}