Distinct real roots . Problem : If $|\log(x)| - px = 0$ has three distinct real roots then the range of $p$ will be ? 
My attempt : I tried to see the problem graphically and made the graph.
So I am able to see that variable line $y=px$ cuts on three distinct points but how do I calculate the range of p ? 
 A: Note first that $x>0$. Moreover $p\neq 0$ because this is only possible when $x=1$, which would not comply with the 3 roots assumption.
Next, we have 
$$
p = \frac{|\log (x)|}{x}
$$
When $0<x<1$, the right hand side derivative w.r.t $x$ is
$$
\frac{\log (x)-1}{x^2}
$$
Now, $\log(x)$ is negative, thus this function is increasing to the left of $x=1$. As a result, the function  $\frac{|\log (x)|}{x}$ ranges from $0$ to $\infty$ and it is strictly increasing. Hence, it must be true that $p>0$ and there is one root with $x\in (0,1)$.
Next, consider $x>1$, we need to have two roots that have $x>1$. The following is true in this interval.
$$
p = \frac{\log (x)}{x}
$$
The derivative is now
$$
\frac{1-\log (x)}{x^2}
$$
This function is positive when $x\in (0,e)$ and negative afterwards. Hence, the right hand side is increasing up to $e$ and decreasing after this point. The value at $0$ is $0$. At $e$, is $1/e$, and as $x\rightarrow \infty$ is equal to $0$ (verify this by L'hospitals rule).
Therefore, if $p>1/e$ then there cannot exist any roots that have $x>1$. If $p=1/e$ there would be two roots, one with $x<1$ and one with $x=e$. Finally if $0<p<1/e$, there will be three roots, one with $x<1$, one with $x\in (1,e)$ and one with $x\in (e,\infty)$.
