There I hope to minimize an optimization problem: $$ \min_{x \in \mathbb{R}_+} f(x) = x^2 -ye^{-x^2} + r(x -d )^2,$$ where $y, d \in \mathbb{R}$ and $r \in \mathbb{R}_+$.
For this equation, the most natural idea is to find the critical point $x_0$ where $f'(x_0) = 0$. That is, $(r+1)x + yxe^{-x^2} = r$.
But this form is not similar with Lambert W function since quadratic term is involved. Is there any method to find the analytic/ numerical solution of this equation? Thanks in advance!
Considering that you look for the zero of function $$g(x)=(r+1)x + yxe^{-x^2} - r$$ Its derivative $$g'(x)=(r+1)+y\,e^{-x^2} \left(1-2 x^2 \right)$$ cancels at $$x_*=\frac 1{\sqrt 2}\sqrt{1-2 W\left(-\frac{\sqrt{e} (r+1)}{2 y}\right)}$$ (since you look for ${x \in \mathbb{R}_+}$). Now, two possibilities :