Finding analytically (not numerically) the maximum of a function

190 Views Asked by At

I need to find the maximum value of the following function

$$f(x):=\frac{-1}{h\sqrt{2\pi}}e^{\frac{-(x-a)^{2}}{2h^{2}}}-\lambda(x-b)^2$$

when $h,\lambda>0$ and $a,b\in\mathbb{R}$.

Remark: We are tempted to think that the problem is easy since the function is differentiable, but the reality is that being differentiable does not help.

Derivative and equating to zero we obtain the equation:

$$ \frac{(x-a)}{h^{3} \sqrt{2\pi}}e^{\frac{-(x-a)^{2}}{2h^{2}}}-2\lambda(x-b)=0.$$ If we had $a=b$ then the problem would be easy to solve, but I need to solve it for any values of $a$ and $b$, including $a\neq b$, in this case where I do not know what to do.