# derivative of error function

How can I calculate the derivatives

$$\frac{\partial \mbox{erf}\left(\frac{\ln(t)-\mu}{\sqrt{2}\sigma}\right)}{\partial \mu}$$ and $$\frac{\partial \mbox{erf}\left(\frac{\ln(t)-\mu}{\sqrt{2}\sigma}\right)}{\partial \sigma}$$

where $\mbox{erf}$ denotes the error function can be given by $$\mbox{erf}(x)=\frac{2}{\sqrt{\pi}}\int_{0}^{x}\exp(-t^2)\,dt$$

I have tried it using WA derivative calculator but I am not able to understand the steps.

• The error function erf($x$) is just $\frac{2}{\sqrt\pi}\int_0^xe^{-t^2}\ dt$, so its derivative is just $\frac{2}{\sqrt\pi}e^{-x^2}$. All you have to do for your examples is use the chain rule. – almagest Apr 23 '16 at 7:58

You have error in your definition of error function :-). The definition of error function is $$\operatorname{erf}(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,\mathrm dt = \int_0^x \frac{2}{\sqrt\pi}e^{-t^2}\,\mathrm dt.$$ Derivative of this integral with variable is it's integrand applied to upper boundary and multiplicated by boundary's derivative. ($\frac{\partial x}{\partial x}=1$) $$\frac{\partial \operatorname{erf}(x) }{\partial x}=1\cdot\frac{2}{\sqrt\pi}e^{-x^2}$$
You should treat $t$ and $\mu$ as a parameters. For example: $$\frac{\partial \frac{\ln(t)-\mu}{\sqrt{2}\sigma}}{\partial \sigma}=\frac{\ln(t)-\mu}{\sqrt{2}}{\ln|\sigma|}$$ Continue it.