How do I solve this analytically $3^x=9x$

$$3^x=9x \Rightarrow 1 =\frac {9x}{3^x} \Rightarrow 1= 9x \cdot e ^{-x\ln 3}\Rightarrow \frac{1}{9}=x \cdot e ^{-x\ln 3} \Rightarrow$$

$$\Rightarrow \frac{-\ln 3}{9}=(-x \ln 3)\cdot e^{-x\ln 3}\Rightarrow W\left(\frac{-\ln 3}{9}\right)=-x \ln 3\Rightarrow$$

$$x= \frac{-W\left(\frac{-\ln 3}{9}\right)}{\ln 3}$$

where W is Lambert W function .


This equation has no analytical solution, you can find roots only numerically. But one root is obvious. And we can prove that there is no root which is more than 3 by taking the derivative of $y=((x-2)\ln(3))-(\ln(x))$ that gives $y'=\ln(3)-\frac{1}{x}>0$ when $x>3$. There is another solution approximately $0.127869$. Because of monotonicity and continuity of $y$ on $[0,\frac{1}{\ln3}]$ there is only one root there, analogically on $(\frac{1}{\ln3},\infty)$. That is only two roots.


It's easy to prove that $3^x \geq 9x$ for all real $x \leq 0$ and $x\geq 3$ with equality at $x=3$. Furthermore, in the interval $(0,3)$ there is exactly one $\alpha$ such that $3^\alpha = 9\alpha$. Put all this together and it's not hard to show that $3^x > 9x$ for $x \in (-\infty,\alpha) \cup (3,\infty)$ and $3^x < 9x$ for $x \in (\alpha,3)$.

There is no way of algebraically manipulating the equation $3^x = 9x$ around to get this(*) - you have to use calculus (or something to that effect).

(*): Unless you don't mind using facts about the Lambert W function, and that amounts to the same as using calculus; essentially.