How many roots does this equation have depending on $\alpha$: $$\ln (x)=\alpha x$$
I tried to take derivatives of both parts, but got this:
$$\frac{1}{x}=\alpha$$ $$x=\frac{1}{\alpha}$$
How to solve it?
How many roots does this equation have depending on $\alpha$: $$\ln (x)=\alpha x$$
I tried to take derivatives of both parts, but got this:
$$\frac{1}{x}=\alpha$$ $$x=\frac{1}{\alpha}$$
How to solve it?
On
Let $f(x) = \ln x - ax$. The first thing to do is to find $f'(x) = \frac{1}{x} - a$.
By Rolle's theorem, if $a$ and $b$ are roots of $f(x)$, then there must be a stationary point between $x = a$ and $x = b$. When $a = b$ (i.e there is only one root), the stationary point and the root must coincide, so there is exactly one root when $f(x) = f'(x) = 0$. Now find the $x$ where this happens.
When the maximum of the function $f'(x)$ is less than $0$, there are no roots, and when it is greater than $0$, there are two roots (since there is only one $x$ where $f'(x) = 0$ regardless of $x$).
On
Another way to look at it.
Since $x=0$ cannot be a solution of the equation, consider that you loog for the zero's of function $$f(x)=\frac{\log (x)}{x}-a$$ for which $$f'(x)=\frac{1-\log (x)}{x^2}\qquad \text{and} \qquad f''(x)=\frac{2 \log (x)-3}{x^3}$$ The first derivative cancels at $x_*=e$ for which $$f(e)=\frac 1e-a\qquad \text{and} \qquad f''(e)=-\frac 1 {e^3} <0$$ So, $x=a$ corresponds to a maximum.
So,
two roots if $f(e) <0$ whish implies $a < \frac 1 {e}$
one double root if $a = \frac 1 {e}$
no root if $a >\frac 1 {e}$
On
A good way to directly obtain and visualize the solutions is to look at the function plots. Since we are searching the roots of $y=\log(x)/x-a$, we can start with the simplest case $a=0$ and draw the function $y=\log(x)/x$:
The function is defined for $x>0$. In the lower range of $x$ the function is negative, but rapidly increases to $0$ for $x=1$ and achieves its maximum $1/e$ for $x=e$ (this is directly obtained by considering the derivative $[1-\log(x)]/x^2)$. For further increasing $x$, the function progressively decreases, tending to $0$ as $x \rightarrow \infty$. So, in this case there is only one root given by $x=1$.
Now let us consider the case $a<0$. The resulting curve $y=\log(x)/x-a$ is translated vertically upward by $|a|$ and still intersects the $x$- axis only in one point, so that in this case there is again only one real root. In particular, the root is given by $x=e^{-W_0(-a)}$, where $W_0$ indicates the main branch of the Lambert $W$ function. Here is an example of the plot for $a=-5$. The function $y=\log(x)/x+5$ has a single real root in $x=e^{-W_0(5)}\approx 0.265$:
Now let us consider the case $a>0$. The curve $y=\log(x)/x-a$ is translated vertically downward by $a$. If this translation does not move the whole curve below the $x$-axis, that is to say if $0<a<1/e$, the curve intersects the $x$- axis in two points, so that in this case there are two real roots. In particular, the roots are given by $x=e^{-W_0(-a)}$ and $x=e^{-W_{-1}(-a)}$, where $W_0$ and $W_{-1}$ indicate the corresponding branches of the Lambert $W$ function. Here is an example of the plot for $a=0.25$. The function $y=\log(x)/x-0.25$ has two real roots in $x=e^{-W_0(-0.25)}\approx 1.429$ and $x=e^{-W_{-1}(-0.25)}\approx 8.613$:
If the translation moves the curve below the $x$-axis so that its maximum point is on the $x$-axis, i.e. if $a=1/e$, the curve intersects the $x$- axis in only one point, so that in this case there is again only one real root, given by $x=e^{-W_0(-1/e)}=e$. Here is an example of the plot for $a=1/e$:
Lastly, if the translation moves the whole curve completely below the $x$-axis, that is to say if $a>1/e$, the curve no longer intersects the $x$- axis, so that in this case there are no real roots. Here is an example of the plot for $a=0.5$:
On
Using the Lambert-W function we find:
$$\begin{aligned} \log(x) =a x &\iff x = e^{ax} \\&\iff -axe^{-ax} = -a \\&\iff -ax = W(-a) \\&\iff x = \frac{W(-a)}{-a} = e^{-W(-a)} \end{aligned}$$
Let $ f(x)=ax- \ln x$ with the domain $x>0$ and consider $a\le 0$ and $a>0$ separately below.
For $a\le 0$, $f’(x) = a - \frac1x< 0$, which means $f(x)$ is strictly decreasing from $f(0)= \infty$ to $f(\infty) =-\infty$, crossing the $x$-axis only once. Thus, there is only one root in this case.
For $a>0$ on the other hand, note that $x= \frac1a$ is where $f’(x) =0$ and the corresponding minimum value $f_{min}=f(\frac1a) = 1+\ln a$. Then,
If $f_{min} > 0$, or $a > \frac1e$, there is no root;
If $f_{min} = 0$, or $a = \frac1e$, there is one root;
If $f_{min} < 0$, or $0< a < \frac1e$, there are two roots.