# How can I solve for $x\,$? $:\;\;x-x_r=(x-x_1)e^{\large -(x-x_1)^2}$

I want to find $x$ for given values of $x_r$ and $x_1\,$ (domain $\mathbb{R}$):

$$x-x_r=(x-x_1)e^{\large -(x-x_1)^2}$$

Thanks

• I think you will have to content yourself with a numerical solution. Commented Jan 13, 2013 at 16:06

You can rewrite the equation as ${{x-x_r}\over{x-x_1}}=e^{-(x-x_1)^2}$ and graph each side. The left is a hyperbola with a vertical asymptote at $x=x_1$ and a horizontal one at $y=1$. The right side is a bell shaped curve with max at $(x_1,1)$. Now decide based on $x_r>x_1$ or $x_r<x_1$ to see where the unique root is going to be. Next you my try to get some asymptotics of the answer. It all depends.
• You will have an easier time if you change your variables. Let $x=x_r+y$ and $a=x_r-x_1$ then your equation becomes $y=(y+a)e^{-(y+a)^2}$. Now you have just one parameter to worry about namely $a$. Commented Jan 14, 2013 at 5:33
• $y$ becomes an odd function of $a$ meaning if you change sign of $a$ then sign of $y$ will also change. So you can concentrate on positive $a$'s. Many software or online pages/apps solve this type of equation for you. In Maple you can use: for i from 0 by .1 to 4 do z := fsolve(x-(x+i)*exp(-(x+i)^2) = 0, x); print(i, z) end do; to get 0.1, 0.3821323792; 0.2, 0.4225239009; 0.3, 0.4284936468; 0.4, 0.4188046129; 0.5, 0.4002917456; 0.6, 0.3763617819; 0.7, 0.3490298472; 0.8, 0.3196340536; and so on. Commented Jan 14, 2013 at 6:13
• Yes that expansion does provide useful answer. For the first attempt I get $y\approx a^{1/3}$ which seems to agree with numerical answers for very small values of $a$. For example for $a=0.004$, $y=.1554124270$, while $a^{1/3}=.158$. Commented Jan 14, 2013 at 13:29
• For large values of $a$ you can get $y\approx a e^{-a^2}$. Commented Jan 14, 2013 at 13:38