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.

  • $\begingroup$ 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. $\endgroup$ – 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}$$

The next step is calculating derivative of a composite function. I hope you can do it yourself.


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.

  • $\begingroup$ Thanks Georgy Dunaev It was a typographical error, I have corrected it. $\endgroup$ – Rakesh Apr 23 '16 at 8:06
  • $\begingroup$ I do not have to integrate with respect to x but with respect to mu and sigma $\endgroup$ – Rakesh Apr 23 '16 at 8:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.