$$\mathrm{erf}(x) = \dfrac{1}{\sqrt{\pi}}\int_{-x}^xe^{-t^2}\,\mathrm dt$$
How would one go about differentiating this function? I have tried this method:
$$f'(x) = \dfrac{1}{\sqrt{\pi}} \left(e^{-x^2} - e ^{-(-x^2)}\right) = 0$$
This doesn't seem like the right answer but I don't know how else to go about it. Any help?
As $\displaystyle\textrm{erf}(x)=\frac{2}{\sqrt{\pi}}\int_0^xe^{-t^2}dt$, $\displaystyle \frac{d}{dx}(\text{erf}(x))=\frac{2}{\sqrt{\pi}}e^{-x^2}$.
Alternatively, $\displaystyle\textrm{erf}(x)=\frac{1}{\sqrt{\pi}}\int_0^xe^{-t^2}dt-\frac{1}{\sqrt{\pi}}\int_0^{-x}e^{-t^2}dt$, so
\begin{align*} \frac{d}{dx}(\text{erf}(x))&=\frac{1}{\sqrt{\pi}}e^{-x^2}-\frac{1}{\sqrt{\pi}}\frac{d}{d(-x)}\left(\int_0^{-x}e^{-t^2}dt\right)\frac{d(-x)}{dx}\\ &=\frac{1}{\sqrt{\pi}}e^{-x^2}-\frac{1}{\sqrt{\pi}}e^{-(-x)^2}(-1)\\ &=\frac{2}{\sqrt{\pi}}e^{-x^2} \end{align*}