While I was looking at the definition of a limit I came up with the followig idea to prove : say I have a function $f(x) : \mathbb{R} \to \mathbb{R}$ and that I have established
For every $\epsilon>0$ there is another positive number $M$ such that $$x > M \implies |f(x)-L| < g(\epsilon) $$ with $g(\epsilon) \to 0 $ when $\epsilon \to0$
Is this enough to state that $\lim_{x \to +\infty} f(x) = L$ ?
I have tried to write down the definition for $g(\epsilon) \to 0 $ when $\epsilon \to0$ , and the definition of a limit at infinity but I'm not managing to use them to finish the argument. However, I think that intuitively it should be true because $g(\epsilon)$ becomes small as $\epsilon$ becomes small, so the distance between $f(x)$ and $L$ gets smaller and smaller.
By definition of limit for $g$, we have for all $\epsilon>0$:
$$\exists \delta>0:|x|<\delta \implies |g(x)|<\epsilon$$
Consider $0<\dfrac12\delta<\delta$.
Then there is some positive number $M$ such that:
$$x>M\implies |f(x)-L|<\left|\ g\left(\frac12\delta\right)\right|$$
Since $\dfrac12\delta < \delta$, we have $\left| \ g\left(\dfrac12\delta\right)\right|<\epsilon$. That is, $|f(x)-L|<\epsilon$ for $x>M$.
Since $\epsilon$ is arbitrary, we have shown that $\displaystyle \lim_{x \to+\infty}f(x)=L$.