I have two functions $ f(x) = \exp(x^2)$ and $g(x) = kx$. I need to find values of $k > 0$ such that $f(x)=g(x)$ has solutions.
Here is what I did :
If $k < \exp(1)$, these two functions do not touch so there is no solution;
If $k = \exp(1)$, these functions touch only once, that is, $g$ is tangent to $f$ at some point. Denote the tangent point $x_0$, then $\exp(x_0^2) = kx_0 = \exp(1)x_0$. The slopes of the two functions have to be the same at this point as they are tangent:
$f'(x_0) = g'(x_0) <=> 2x_0\exp(x_0^2) = \exp(1)$. And so $ \exp(x_0^2) = 2x_0^2\exp(x_0^2) <=> x_0 = 1\displaystyle /\sqrt(2)$;
If $ k > \exp(1)$, these two functions touch two times. I don't know how to pursue from there.
Thank you for your help.
If $k=0$, there is no solution. If $k<0$, the equation can also be written as $$ \exp((-x)^2)=(-k)(-x) $$ so we can assume $k>0$ (the case $k<0$ is symmetric).
The solution to $\exp(x^2)=kx$, if it exists, is positive, so we can as well transform the problem into $x^2=\log k+\log x$.
Consider $h(x)=x^2-\log x-\log k$ (defined for $x>0$). We have $$ \lim_{x\to0}h(x)=\infty,\qquad \lim_{x\to\infty}h(x)=\infty $$ so $h$ has an absolute minimum. Now $$ h'(x)=2x-\frac{1}{x}=\frac{2x^2-1}{x} $$ only vanishes at $x=1/\sqrt{2}$. We have $$ h(1/\sqrt{2})=\frac{1}{2}+\frac{1}{2}\log2-\log k=\log\frac{\sqrt{2e}}{k} $$ The minimum is $\le0$ if and only if $$ \frac{\sqrt{2e}}{k}\le 1 $$ that is, $k\ge\sqrt{2e}$.
The final answer is thus, keeping into account the initial discussion, that the equation has
Here is a graph for the three cases; the green function corresponds to the case $0<k<\sqrt{2e}$, the red one for $k=\sqrt{2e}$, the black one for $k>\sqrt{2e}$.
The same for $e^{x^2}-kx$: