derivative of error function

$\begingroup$

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.

$\endgroup$ 1

2 Answers

$\begingroup$

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.

==Added==

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.

$\endgroup$ 2 $\begingroup$

Just to spell it our for the derivative w.r.t. $\mu$:$$\Phi(\mu,\sigma^2) = \frac{1}{2}[1+erf(\frac{x-\mu}{\sigma \sqrt{2}})]$$$$\Phi(\mu,\sigma^2) = \frac{1}{2} + \frac{1}{2} \frac{2}{\sqrt{\pi}} \int_0^{\frac{x-\mu}{\sigma \sqrt{2}}} e^{-t^2} dt$$$$\frac{\Phi(\mu,\sigma^2)}{d\mu} = \frac{1}{\sqrt{\pi}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} (-\frac{1}{\sqrt{2}\sigma})$$$$\frac{\Phi(\mu,\sigma^2)}{d\mu} = -\frac{1}{\sqrt{2 \pi}\sigma} e^{-\frac{(x-\mu)^2}{2 \sigma^2}} = - \phi(\mu,\sigma^2)$$Same thing w.r.t. $\sigma$:$$\frac{\Phi(\mu,\sigma^2)}{d\sigma} = \frac{\mu-x}{\sqrt{2 \pi}\sigma^2} e^{-\frac{(x-\mu)^2}{2 \sigma^2}} = \phi(\mu,\sigma^2) \frac{\mu-x}{\sigma}$$

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like