Solving an equation $x\cdot e^{(x-C)^2}=1$

159 Views Asked by At

I would like to solve the following equation: $$x\cdot e^{(x-C)^2}=1.$$ I tried to use Lambert W function but unsuccessfully. Is there any way to get an exact (or approximate for some non-zero $C$) solution to the equation above?

My attempt was to reduce it to the form of $\tau \cdot e^\tau = B$ which can be solved as $\tau = W(B)$. Yet the $-C$ term in the exponent does not allow me to do this and the trick works only for $C=0$.

2

There are 2 best solutions below

2
On BEST ANSWER

As noted by OP, this can be solved for $C=0$ by squaring both sides and multiplying by $2$, yielding $$ 2x^2 e^{2x^2}=2, $$ or $2x^2=W(2)$, or $x=\sqrt{W(2)/2}\approx 0.652919$. For $C=1$, of course, the solution is $x=1$. More generally, note that the solution is a fixed point of $$ f(x) = \exp\left(-(x-C)^2\right); $$ since this function is a contraction of $\mathbb{R}$ onto $(0,1]$, it has a unique fixed point, and iterating $x\rightarrow f(x)$ (starting at $0$, say) will rapidly converge to the solution for any $C$. In particular, the initial iterate of $e^{-C^2}$ is an excellent approximation for even moderately large $|C|$... it differs from the exact solution by less than $10\%$ for $C=\pm 2$, by about $1\%$ for $C=\pm 2.5$, and by less than $0.1\%$ for $|C|\ge 3$.


Expanding in powers of $x$, we have $$ x e^{(x-C)^2}=xe^{C^2}e^{-2Cx + x^2}=1, $$ or $$ xe^{C^2}=e^{2Cx-x^2}=1+(2Cx-x^2)+\frac{1}{2!}(2Cx-x^2)^2+\frac{1}{3!}(2Cx-x^2)^3+\ldots. $$ This has a self-consistent asymptotic solution of $x \sim e^{-C^2}+\sum_{k=2}^{\infty}b_k(C)e^{-kC^2}$, where the coefficients are polynomials in $C$ and can be found by substitution and equating like terms.

0
On

Beside numerical methods, you can obtain an approximation of the solution od $$x\, e^{(x-c)^2}=1$$ at least when $c$ is large enough.

Expanded as a series around We have $$x\,e^{(x-c)^2}=e^{c^2} \sum_{n=0}^p (-1)^n P_n(c)\, x^{n+1} +O(x^{p+1})$$ where the first polynomials are $$\left( \begin{array}{cc} n & P_n(c) \\ 0 & 1 \\ 1 & 2 c \\ 2 & 2 c^2+1 \\ 3 & \frac{4 c^3}{3}+2 c \\ 4 & \frac{2 c^4}{3}+2 c^2+\frac{1}{2} \\ 5 & \frac{4 c^5}{15}+\frac{4 c^3}{3}+c \\ 6 & \frac{4 c^6}{45}+\frac{2 c^4}{3}+c^2+\frac{1}{6} \\ 7 & \frac{8 c^7}{315}+\frac{4 c^5}{15}+\frac{2 c^3}{3}+\frac{c}{3} \\ 8 & \frac{2 c^8}{315}+\frac{4 c^6}{45}+\frac{c^4}{3}+\frac{c^2}{3}+\frac{1}{24} \\ 9 & \frac{4 c^9}{2835}+\frac{8 c^7}{315}+\frac{2 c^5}{15}+\frac{2 c^3}{9}+\frac{c}{12} \\ 10 & \frac{4 c^{10}}{14175}+\frac{2 c^8}{315}+\frac{2 c^6}{45}+\frac{c^4}{9}+\frac{c^2}{12}+\frac{1}{120} \end{array} \right)$$

Now, using series reversion $$x=\sum_{n=1}^p Q_n(c)\, e^{-n c^2}$$ where the first polynomials are $$\left( \begin{array}{cc} n & Q_n(c) \\ 1 & 1 \\ 2 & 2 c \\ 3 & 6 c^2-1 \\ 4 & \frac{64 c^3}{3}-8 c \\ 5 & \frac{250 c^4}{3}-50 c^2+\frac{5}{2} \\ 6 & \frac{1728 c^5}{5}-288 c^3+36 c \\ 7 & \frac{67228 c^6}{45}-\frac{4802 c^4}{3}+343 c^2-\frac{49}{6} \\ 8 & \frac{2097152 c^7}{315}-\frac{131072 c^5}{15}+\frac{8192 c^3}{3}-\frac{512 c}{3} \\ 9 & \frac{1062882 c^8}{35}-\frac{236196 c^6}{5}+19683 c^4-2187 c^2+\frac{243}{8} \\ 10 & \frac{80000000 c^9}{567}-\frac{16000000 c^7}{63}+\frac{400000 c^5}{3}-\frac{200000 c^3}{9}+\frac{2500 c}{3} \end{array} \right)$$

Tryng for a few values $$\left( \begin{array}{ccc} c & \text{approximation} & \text{solution} \\ 1.5 & 0.170299585094517 & 0.170953214901680 \\ 1.6 & 0.107895033682801 & 0.107929924415624 \\ 1.7 & 0.070212923033771 & 0.070214469092901 \\ 1.8 & 0.046142704232074 & 0.046142759547435 \\ 1.9 & 0.030328358050644 & 0.030328359630533 \\ 2.0 & 0.019818944318480 & 0.019818944354308 \\ 2.1 & 0.012825805020904 & 0.012825805021547 \\ 2.2 & 0.008196886530498 & 0.008196886530498 \end{array} \right)$$