Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I messed up the equation last time I asked this - Can someone please solve this function for X?

$Y = \displaystyle 0.5\:a\:\text{erf}\left(\frac{x-b}{c\sqrt{2}}+.5\right)+d$

When I solve for Y with x=1 and

a =       1.412
b =       1.259
c =       1.003
d =      0.3016 

I get 0.5460

I want to plug 0.5460 into a formula and get 1 back.

I am aware that there exists a function called "inverse error function" (erfinv) where erfinv(erf(x)) = x but I still can't figure this one out.

share|cite|improve this question
@El`endia Thanks for the edit :) – Mike Furlender May 11 '11 at 22:19
You're welcome. :) – El'endia Starman May 11 '11 at 22:31
possible duplicate of How can I solve this equation (contains error function) ? – J. M. May 12 '11 at 1:10
up vote 1 down vote accepted

As in the previous question, you just "unpack" it. $$Y-d=0.5a\text{ erf} \left(\frac{x-b}{c\sqrt{2}}+.5\right)$$

share|cite|improve this answer

I do not know how familiar you are with basic algebra, so I will do it step by step. Please feel free to hurry the process!

$1$. Subtract $d$ from both sides. You should get

$$Y-d=(0.5a)\text{erf}\left(\frac{x-b}{c\sqrt{2}}+ 0.5\right)$$

$2$. Divide both sides by $0.5a$. You should get

$$\frac{Y-d}{0.5a}=\text{erf}\left(\frac{x-b}{c\sqrt{2}}+ 0.5\right)$$

Now for brevity let


So we have

$$w=\text{erf}\left(\frac{x-b}{c\sqrt{2}}+ 0.5\right)$$

$3$. Now apply $\text{erfinv}$ to both sides. This is where we use the fact that $\text{erfinv}(\text{erf}(u))=u$. We get

$$\text{erfinv}(w)= \left(\frac{x-b}{c\sqrt{2}}+ 0.5\right)$$

$4$. Subtract $0.5$ from both sides. We get

$$\text{erfinv}(w)-0.5= \left(\frac{x-b}{c\sqrt{2}}\right)$$

$5$. Multiply both sides by $c\sqrt{2}$. We get

$$c\sqrt{2}(\text{erfinv}(w)-0.5)= {x-b}$$

$6$. Finally, add $b$ to both sides, and because I like $x$ on the left of the $=$ sign, interchange the two sides. We get

$$x= c\sqrt{2}(\text{erfinv}(w)-0.5) +b$$

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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