Value of $k$ such that $f(x) = kx$ has solutions 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.
 A: 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


*

*no solution if $|k|<\sqrt{2e}$;

*one solution if $k=\pm\sqrt{2e}$;

*two solutions if $|k|>\sqrt{2e}$.


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$:

A: Let's start with the 2 functions:$$f(x)=\exp(x^2)\\g(x)=kx$$ Notice that for $k>0,x\le 0$ $f(x)\ne g(x)$, so we left only with positive $x$.
Let's start with no solutions, if we have no solutions and $f(0)>g(0)$ it means that $f(x)>g(x)$ for all $x$(by the intermediate value theorem).
So we search for some $k$ such that $\exp(x^2)>kx$, this inequality is not something we can easily solve, so before solving it let's try to find relation between this case and between the case of one solution.
If we have one solution it means that at the solution the derivatives are also equal, before the solution the derivative of $g(x)$ need to be greater and after the solution the derivative of $f(x)$ need to be greater (it is also worth noting that both of the functions not decreasing for $x>0$).
So we search for $x_0$ such that $f(x_0)=g(x_0),f'(x_0)=g'(x_0), f'(x_1>x_0)>g'(x_1>x_0),f'(x_1<x_0)<g'(x_1<x_0)$, like you found in the post that $x_0=\frac1{\sqrt2}$(you have to check the other 2 conditions), using this we can find $k$:$$\exp(x_0^2)=kx_0\implies k=\sqrt{2\exp(1)}$$.
If we are decreasing $k$ we get $g(x)<\sqrt{2\exp(1)}x\le f(x)$ hence we have no solutions if $k<\sqrt{2\exp(1)}$.
Of we are increasing $k$ we have $g(x)>\sqrt{2\exp(1)}x\le f(x)$, and we have the spacial case of $x_0$: $$g(x_0)>\sqrt{2\exp(1)}x_0= f(x_0)$$.
We can show that if $k>\sqrt{2\exp(1)}$  we have exactly $2$ solutions by the fact that $g''(x)=0$

For negative $k$ we just ignore the positive $x$'s and do the exact same thing
