I'm trying to prove:
$$\lim_{x \to \infty} f(x) = \lim_{x \to \infty} \frac{x^2 + x - 1}{3x^2 + 2x + 1} = \frac{1}{3}$$
using $\delta$-$\epsilon$ language. Here is my attempt:
Proof: We wish to show that as $x$ gets arbitrarily large that the difference between $f(x)$ and $\frac{1}{3}$ gets arbitrarily small. In other words, we show that $\forall \epsilon > 0$ $\exists \delta > 0$ such that $$x > \delta \Rightarrow \bigg| \frac{x^2 + x - 1}{3x^2 + 2x + 1} - \frac{1}{3} \bigg| < \epsilon$$
Now observe for $x > 2$,
\begin{align*} \bigg| \frac{x^2 + x - 1}{3x^2 + 2x + 1} - \frac{1}{3} \bigg| &= \bigg| \frac{x-4}{9x^2 + 6x + 3} \bigg| \tag{$\star$} \\ &\leq \bigg| \frac{x-4}{3(x^2 + 2x + 1)} \bigg|\\ &= \bigg| \frac{x-4}{3(x + 1)^2} \bigg| \\ &= \bigg| \frac{1}{3(x+1)} - \frac{5}{3(x+1)^{2}} \bigg|\\ &< \frac{1}{x+1} \end{align*}
Let $\delta = \max\left\{ 2, \dfrac{1}{\epsilon} - 1 \right\}$. Then, if $x > \delta$ we have that $$\star < \dfrac{1}{x+1} < \frac{1}{\delta + 1} = \dfrac{1}{\left(\frac{1}{\epsilon} - 1 \right) + 1} = \epsilon$$
I just want to make sure that I did this correctly. Thank you.
It's correct, but it can be simplified.
When you are at $$ \left|\frac{x-4}{9x^2+6x+3}\right| $$ you can observe that it's not restrictive to assume $x>4$; next, $x-4<x$ and $9x^2+6x+3>9x^2$, so $$ \frac{x-4}{9x^2+6x+3}<\frac{x}{9x^2}<\frac{1}{9x} $$ Therefore we can take $$ \delta=\max\left\{4,\frac{1}{9\varepsilon}\right\} $$