Question: > 
> Prove that for every $x>0$:
>  $$\ln x \ge \frac{x-1}{x}$$
> 
> 
> 

What I did:

$$f(x) = \ln x, \text{ } g(x) = \frac{x-1}{x} $$

$$f(1) = g(1) = 0 $$

So it's enough to prove that $$ f'(x) \ge g'(x)$$
I proved this for every $x>1$.
How can I prove this for every $0<x\le1$ ?

Answer: 
You approach is good, but there is another which is worthy of consideration. Define $h : (0,\infty) \rightarrow \mathbb{R}$ by
\begin{equation}
h(x) = x \text{ln}(x) - x + 1.
\end{equation}
and show that this function is non-negative if and only if $f(x) \ge g(x)$. Then subject $h$ to a standard functional analysis in order to determine its range.
Compute the limits as $x$ tends to $0$ and $\infty$. Moreover, the derivative of $h$ is easily seen to be $\text{ln}(x)$. You should find that $h$ is always non-negative.

Edit: word "positive" replaced with the correct word "non-negative".
I thought it might be instructive to present a way forward that does not rely on calculus, but rather elementary analysis only.

In [THIS ANSWER](https://math.stackexchange.com/questions/1589429/how-to-prove-that-logxx-when-x1/1590263#1590263) and [THIS ONE](https://math.stackexchange.com/questions/1446831/find-lim-limitsx-to-infty-frac-ln-left13x-right-ln-left12x-rig/1446837#1446837), I showed using only the limit definition of the exponential function and Bernoulli's Inequality that the exponential function satisfies the inequality 

$$e^x\ge 1+x \tag 1$$

Setting $x=-z/(z+1)$ into $(1)$ and taking the logarithm of both sides reveals

$$\log(1+z)\ge \frac{z}{z+1} \tag 2$$

for $z>-1$. Finally, substituting $x=1+z$ in $(2)$ yields the coveted inequality

$$\frac{x-1}{x}\le \log x$$

for $x>0$.