Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

Someone me asked this and I was unable to answer. How can I maximize the function $f(x)=Ae^{-(x-b)^2}+Be^{-(x-c)^2}$?

Progress: For $A=B$, this is the same as maximizing $-(x-b)^2(x-c)^2$, which is easy. If $A\neq B$, I'm not sure how to factor in the coefficients, however.

share|cite|improve this question

$f'(x)=-2(x-b)Ae^{-(x-b)^2}-2(x-c)Be^{-(x-c)^2}$. This looks like it won't yield to algebra and will need a numerical solution. I would start at the average of $b$ and $c$ and go from there. You could use a root-finder on this or a maximizer on the original. Routines are given in any numerical analysis text.

share|cite|improve this answer
I was hoping there's an exact solution through some clever manipulation. Like, the derivative of $e^{-(x-b)^2}+e^{-(x-c)^2}$ is also difficult to solve with algebra, but since the relationship between the two summands is "equal" you can intuitively replace this problem with that of maximizing $-(x-b)^2(x-c)^2$ (i.e. the maximum is at the average). From here it doesn't seem like a far stretch to be able to do the same with unequal coefficients, as long as you figure out how they factor into the entire dirty business. But maybe this is just my lack of experience talking... – add Feb 8 '13 at 22:38

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.