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 have this equation, and I want to find solution for x.

$\begin{align*}&(-2 x+2 α+1/(2 σ^2))\exp[(-(x-α)^2+(x-μ)/(2 σ^2))]+\\&(-2 x+2 β+1/(2σ^2))\exp[(-(x-β)^2+(x-μ)/(2 σ^2))]=0\end{align*}$

I have already used Wolfram, but it calculates the solution for $\sigma$, and other solvers say that they "Can not solve for x". Does anyone have an idea? Thank you all, in advance, for your concern.

P.S. Can I say that if this equation is equal to $0$, then only $(-2x+2 α+1/(2 σ^2))=0$ and $(-2 x+2 β+1/(2σ^2))=0$ at the same time, since exp is always $>0$.

share|cite|improve this question
It looks to me that you'd be hard-pressed to find a closed-form solution, given that you have polynomials of different degrees inside and outside the exponential... – J. M. Nov 20 '11 at 15:25
@J.M. What do you think about my idea at (P.S.)? It's completely wrong? – johan paul Nov 20 '11 at 15:33
According to Maple solution for $x$ is composed of Lambert W functions – pedja Nov 20 '11 at 15:34
If you're sure everything is always real, then the P.S. ought to nail it, yes. – Henning Makholm Nov 20 '11 at 15:45
In fact, if we assume $\alpha \lt \beta$, \alpha+1/(4\sigma^2) \lt x \lt \beta+1/(4\sigma^2)$ (Otherwise just flip the inequalities). This will allow numeric solution to proceed easily. You could check out chapter 9 of or any numerical analysis text. Like the others, I don't think you will find an algebraic solution. – Ross Millikan Nov 20 '11 at 16:33

First a trivial algebraic simplification: $$\begin{align}&{}\qquad (-2 x+2 α+1/(2 σ^2))\exp[(-(x-α)^2+(x-μ)/(2 σ^2))]\\ &{}\quad+(-2 x+2 β+1/(2σ^2))\exp[(-(x-β)^2+(x-μ)/(2 σ^2))] \\ \\ & = (-2 x+2 α+1/(2 σ^2))\exp[-(x-α)^2] \cdot \exp[(x-μ)/(2 σ^2)]\\ &{}\quad+(-2 x+2 β+1/(2σ^2))\exp[-(x-β)^2]\cdot\exp(x-μ)/(2 σ^2)], \end{align}$$ so if this is $0$, then you can divide both sides by $\exp[(x-\mu)/(2\sigma^2)]$, since, as a value of the exponential function, that can never be $0$.

You have $$ \left(-2(x-\alpha) + \frac{1}{2\sigma^2}\right) \exp(-(x-\alpha)^2) + \left(-2(x-\beta) + \frac{1}{2\sigma^2}\right) \exp(-(x-\beta)^2) = 0. $$ A trivial substitution moves some complications into one place rather than two: $$ \left(-2w + \frac{1}{2\sigma^2}\right) \exp(-w^2) + \left(-2(w-\gamma) + \frac{1}{2\sigma^2}\right) \exp(-(w-\gamma)^2) = 0. $$ At this point I ponder whether some other trivial simplifications might help. E.g. you could cancel $\exp(-w^2)$ from both sides, and a few other things like that. But those don't seem potentially fruitful.

So, I'm thinking maybe Newton--Raphson or the like.

But: This looks like something that might have come from trying to find some MLEs. So are you sure you shouldn't be trying to solve for $\alpha$, $\beta$, and $\sigma$ instead?

share|cite|improve this answer
i have to solve this for x, in any way, because this part is only a calculating part of my whole exercise, in order to find a rejection algorithm. I want the solution that verifies my equation, in order to use it to find an upper bound. – johan paul Nov 20 '11 at 17:09

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.