# Prove that there is some $\delta \gt 0$ such that $f(x) \lt f(y)$.

Suppose that $$\lim_{x \to a^{-} } f(x) \lt \lim_{x \to a^{+} } f(x)$$. Prove that there is some $$\delta \gt 0$$ such that $$f(x) \lt f(y)$$ whenever $$x \lt a \lt y$$ and $$|x-a| \lt \delta$$ and $$|y-a| \lt \delta$$.

My solution:

We know that $$\exists ~\delta_1$$ such that for every $$\epsilon \gt 0$$ $$0 \lt a -x \lt \delta_1 \implies |f(x) -L_1 | \lt \epsilon$$ Similarly, $$0 \lt x-a \lt \delta_2 \implies |f(x) - L_2| \lt \epsilon$$

Let $$\delta = min ( \delta_1, \delta_2)$$, then we have $$0 \lt a -x \lt \delta \implies |f(x) -L_1 | \lt \epsilon \\ 0 \lt x-a \lt \delta \implies |f(x) - L_2| \lt \epsilon$$ Let's call the inputs greater than but within the $$\delta$$ of $$a$$ as $$y$$ $$0 \lt |x -a| \lt \delta \implies |f(x) -L_1 | \lt \epsilon ~~~~~~~~~~~~~~~x \lt a \\ 0 \lt |y-a| \lt \delta \implies |f(x) - L_2| \lt \epsilon~~~~~~~~~~~~~~~~~~y \gt a$$ By adding the two inequalities (involving $$\epsilon$$) we have $$|f(x) - f(y) + L_2 -L_1| \lt 2 \epsilon \\ \text{ let \epsilon = \frac{L_2 - L_1}{2}, as we know L_2 \gt L_1}$$

$$|f(x) - f(y) + L_2 -L_1| \lt L_2 - L_1 \\ L_1 - L_2 \lt f(x) - f(y) + L_2 -L_1 \lt L_2 -L_1$$

$$2 (L_1 - L_2 ) \lt f(x) -f(y) \lt 0 \\ f(x) - f(y) \lt 0 \\ f(x) \lt f(y)$$

Is my solution correct and rigorous?

The final addition step doesn't seem correct. More simply, we need to assume a smaller value for $$\varepsilon$$ that is for example
$$\varepsilon \le \frac{L_2 - L_1}{3}$$
and then since $$L_2>L_1$$ we can conclude
$$|f(x) -L_1 | \lt \varepsilon \implies f(x)<\varepsilon+L_1=\frac{L_2 +2 L_1}{3}$$
$$|f(y) -L_2 | \lt \varepsilon \iff f(y)>-\varepsilon+L_2=\frac{2L_2 + L_1}{3}>f(x)$$