Determinate $\lambda\in R$ so that the following equation has 2 real,distinct solutions. Determinate $\lambda\in R$ so that the following equation has 2 real,distinct solutions. $$2x+\ln x-\lambda(x-\ln x)=0$$
I think this should be solved using Rolle property for finding intervals with solutions.So i calculated $f^|(x)=\frac{2x-\lambda x+1+\lambda}{x}$.So $x=\frac{\lambda+1}{\lambda -2}$ so $f(x)=-\lambda-1+(1-\lambda )\ln \frac{2}{\lambda-2}-2$ Here I got stuck.Any help?
 A: Hint: defining $$f(x)=2x+2\ln(x)-\lambda(x-\ln(x))$$ then $$f'(x)=2+\frac{2}{x}-\lambda\left(1-\frac{1}{x}\right)$$ then $$f'(x)=0$$ if $$x_E=\frac{\lambda+2}{\lambda-2}$$ and $$f''(x_E)=-\frac{(-2+\lambda)^2}{\lambda+2}$$ then must hold
$$f''(x_E)<0$$ and $$f(x_E)=(\lambda+2)\left(\ln(x_E)-1\right)>0$$
A: We have
$$
(2-\lambda)x+(\lambda+1)\ln x = 0
$$
now making $z = \ln x$
$$
\frac{2-\lambda}{\lambda+1} = (-z)e^{-z}
$$
Now using the Lambert function $W$ we have
$$
-z = W\left(\frac{2-\lambda}{\lambda+1}\right)\Rightarrow x = e^{- W\left(\frac{2-\lambda}{\lambda+1}\right)}
$$
Now you can choose a suitable $\lambda$ which gives you two solutions.
https://en.wikipedia.org/wiki/Lambert_W_function
A: The function to study is
$$
f(x)=(2-\lambda)x+(1+\lambda)\ln x
$$
If the function must have exactly two real zeros, its derivative must vanish exactly once. Since
$$
f'(x)=2-\lambda+\frac{1+\lambda}{x}=\frac{(2-\lambda)x+(1+\lambda)}{x}
$$
we need
$$
x_0=\frac{\lambda+1}{\lambda-2}>0
$$
that is, $\lambda<-1$ or $\lambda>2$. Note that for $\lambda<-1$ the point $x_0$ is a point of minimum and for $\lambda>2$ it is a point of maximum, because
$$
f''(x)=-\frac{1+\lambda}{x^2}
$$
which is positive for $\lambda<-1$ and negative for $\lambda>2$
We have
$$
f(x_0)=(\lambda+1)(-1+\ln x_0)
$$
For $\lambda<-1$ we need $f(x_0)<0$, which translates to $-1+\ln x_0>0$, that is,
$$
\frac{\lambda+1}{\lambda-2}>e
$$
which is easily seen to be false for all $\lambda<-1$.
For $\lambda>2$ we need $f(x_0)>0$, which translates again to $-1+\ln x_0>0$, that is,
$$
\frac{\lambda+1}{\lambda-2}>e
$$
or
$$
\lambda<\frac{2e+1}{e-1}=\frac{2e-2+3}{e-1}=2+\frac{3}{e-1}
$$
Final result
$$
2<\lambda<\frac{2e+1}{e-1}\approx 3.74593
$$
