Solving $\ln{x}=\tan{x}$ with infinitely many solutions Lets take $f(x)=\ln{x}$ and $g(x)=\tan{x}$

When $f(x)=g(x)$ that is $\ln{x}=\tan{x}$, we see that the graph is like:



Hence we see that there are infinitely many solutions to $x$ but the two graphs do not coincide (like while solving "$x=x$"!)

The solutions as given by WolframAlpha were like : 


So i decided to use Newton's method to solve this but due to having infinitely many solutions, all solutions given by that method were close to the approximations given by WolframAlpha but were not as accurate.
$x_{n+1} = x_{n} - \dfrac{\ln{x_{n}}-\tan{x_{n}}}{{\dfrac{1}{x_{n}}}-\sec^2{x_{n}}}$
giving us x = 4.02 , 7.31 , ... (and hence not correct)

So is there any other way to solve these system of equations? Maybe using Lambert-W or maybe it does have some simple solution which I'm missing?

Please help, Thanks!  
 A: In each interval $\left(\pi n - \frac{\pi}{2}, \pi n + \frac{\pi}{2}\right)$ there is exactly one solution $x_n$ (i.e. $\tan x_n = \ln x_n$), and, when $n$ is large, it appears that $x_n$ is approximately $\pi n + \frac{\pi}{2}$.  Let's show this.
Since $\tan$ is $\pi$-periodic we have
$$\tan\left(\pi n + \frac{\pi}{2} - x_n\right) = \tan\left(\frac{\pi}{2} - x_n\right)$$
$$\hspace{2.4 cm} = \frac{1}{\tan x_n}$$
$$\hspace{2.6 cm} = \frac{1}{\ln x_n} \to 0$$
as $n \to \infty$, where the second-to-last equality follows from the identites $$\sin\left(\frac{\pi}{2} - \theta\right) = \cos \theta,$$ $$\cos\left(\frac{\pi}{2} - \theta\right) = \sin \theta.$$
Since $-\frac{\pi}{2} < \pi n + \frac{\pi}{2} - x_n < \frac{\pi}{2}$ and since $\tan$ is continuous in this interval we have $\pi n + \frac{\pi}{2} - x_n \to 0$ as $n \to \infty$.
So, we know that
$$
x_n = \pi n + \frac{\pi}{2} + o(1).
$$
Let's get an estimate for the error term.  If we set $w_n = \left(\pi n + \frac{\pi}{2}\right)^{-1}$ and $z_n = w_n^{-1} - x_n$ then
$$
\tan x_n = \frac{1}{\tan z_n}
$$
by the above calculation and
$$
\ln x_n = \ln w_n^{-1} + \ln(1+w_n z_n),
$$
so the equation $\tan x_n = \ln x_n$ becomes
$$
\frac{1}{\tan z_n} = \ln w_n^{-1} + \ln(1+w_n z_n). \tag{$*$}
$$
Now $w_n,z_n \to 0$ as $n \to \infty$, so
$$
\frac{1}{\tan z_n} \sim \frac{1}{z_n}
$$
and
$$
\ln w_n^{-1} + \ln(1+w_n z_n) \sim \ln w_n^{-1}
$$
as $n \to \infty$.  Thus, from $(*)$,
$$
\frac{1}{z_n} \sim \ln w_n^{-1},
$$
or
$$
z_n \sim \frac{1}{\ln w_n^{-1}} = \frac{1}{\ln(\pi n + \pi/2)}.
$$
By definition of $z_n$ we therefore get the asymptotic
$$
x_n = \pi n + \frac{\pi}{2} - \frac{1}{\ln(\pi n + \pi/2)} + o\left(\frac{1}{\ln n}\right).
$$
A: If you do not mind a contour integral expression for your roots, one can use the Delves-Lyness scheme to represent your roots:
$$x_{\ast}=\frac1{2\pi i}\oint_\gamma \frac{z f^\prime(z)}{f(z)}\,\mathrm dz$$
where $f(x_{\ast})=0$ and $\gamma$ is any anticlockwise contour encircling the desired root and has no poles of $f(x)$ within.
In particular, borrowing Claude's strategy of reformulating the equation as $\log x\cos x-\sin x=0$ and localizing the roots around $x=\pi\left(k+\frac12\right)$, we can use the contour $\gamma=\pi\left(k+\frac12\right)+\frac{\pi}{4}\exp(it)$ to evaluate the Delves-Lyness contour integral. A realization in Mathematica for finding the first $10$ roots goes like this:
Table[Re[NIntegrate[Exp[I t] (Cos[#] - # Log[#] Sin[#] - # Cos[#])/
                    (Log[#] Cos[#] - Sin[#]) &[π (k + 1/2) + π Exp[I t]/4],
                    {t, 0, 2 π},
                    Method -> {"Trapezoidal", "SymbolicProcessing" -> 0}]/8],
      {k, 10}]

   {4.095461605910074, 7.390369571112949, 10.59483666075098, 13.772896612324644,
    16.93905539111342, 20.098667030734298, 23.254225459730314, 26.40706896072724,
    29.55798827765332, 32.70748457864333}

and these can be polished further with Newton-Raphson or some other iterative method if need be.
A: A simple recursion for $x^{(n)}$ (the $n-$th root, around $n \pi$, with $n\ge 1$) is
$$ x^{(n)}_{i+1}= \tan^{-1} \left( \log x^{(n)}_{i}  \right) + n \pi$$
starting with $x^{(n)}_{0}= n \pi$. 
