I differentiated firstly and looked for extreme values then checked function value nearby that point using calculator.Graphing is not easy for all the equations too. Is there any proper method that surely tells the number of roots for an equation?
2026-02-22 17:57:43.1771783063
Number of roots of the e
69 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2

$$f(x)=\log{x}-x+2$$
$$f'(x)=\frac{1}{x}-1$$
$$\frac{1}{x}-1=0$$
$$x=1$$
This tells us that $f(x)$ achieves maxima at $x=1$ and is strictly increasing from $(0,1)$ and strictly decreasing from $(1,\infty)$. Now just check where it approaches at $0$ and $\infty$
EDIT:
We can easily check that the function approaches $-\infty$ both at $0$ and $\infty$. This tells us that the function takes each value exactly once between $-\infty$ and $1$ in $(0,1)$ and also in $(1,\infty)$. Therefore it will take $0$ once in $(0,1)$ and then again $(1,\infty)$ which will constitute its two roots.