# Calculus/Choosing delta

Recall the definition of a limit:

A number ${\displaystyle L}$ is the limit of a function ${\displaystyle f(x)}$ as ${\displaystyle x}$ approaches ${\displaystyle c}$ if and only if for all numbers ${\displaystyle \epsilon >0}$ there exists a number ${\displaystyle \delta >0}$ such that

${\displaystyle {\Big |}f(x)-L{\Big |}<\epsilon }$

whenever

${\displaystyle 0<|x-c|<\delta }$ .

In other words, given a number ${\displaystyle \epsilon }$ we must construct a number ${\displaystyle \delta }$ such that assuming

${\displaystyle 0<|x-c|<\delta }$

we can prove

${\displaystyle {\Big |}f(x)-L{\Big |}<\epsilon }$

moreover, this proof must work for all values of :${\displaystyle \epsilon >0}$ .

Note: this definition is not constructive -- it does not tell you how to find the limit ${\displaystyle L}$ , only how to check whether a particular value is indeed the limit. We use the informal definition of the limit, experience with similar problems, or theorems (L'Hopital's rule, for example), to determine the value, and then can prove the correctness of this value using the formal definition.

Example 1: Suppose we want to find the limit of ${\displaystyle f(x)=x+5}$ as ${\displaystyle x}$ approaches ${\displaystyle c=9}$ . We know that the limit ${\displaystyle L}$ is 9+5=14, and desire to prove this.

We choose ${\displaystyle \delta =\epsilon }$ (this will be explained later). Then, since we assume

${\displaystyle |x-9|<\delta }$

we can show

 ${\displaystyle {\Big |}(x+5)-14{\Big |}}$ ${\displaystyle =|x-9|}$ ${\displaystyle <\delta }$ ${\displaystyle =\epsilon }$

which is what we wanted to prove.

We chose δ by working backwards from the formula we are trying to prove: ${\displaystyle {\Big |}f(x)-L{\Big |}<\epsilon }$ . In this case, we desire to prove

${\displaystyle |x-9|<\epsilon }$

given

${\displaystyle |x-9|<\delta }$

so the easiest way to prove it is by choosing ${\displaystyle \delta =\epsilon }$ . This example, however, is too easy to adequately explain how to choose ${\displaystyle \delta }$ in general. Lets try something harder:

Example 2: Prove that the limit of ${\displaystyle f(x)=x^{2}-9}$ as ${\displaystyle x}$ approaches ${\displaystyle 2}$ is ${\displaystyle L=-5}$ .

We want to prove that

${\displaystyle {\Big |}f(x)-L{\Big |}=|x^{2}-4|<\epsilon }$

given

${\displaystyle |x-2|<\delta }$ .

We choose ${\displaystyle \delta }$ by working backwards. First, we need to rewrite the equation we want to prove using ${\displaystyle \delta }$ instead of ${\displaystyle x}$:

${\displaystyle {\begin{matrix}|x^{2}-4|&<&\epsilon \\|x-2|\cdot |x+2|&<&\epsilon \\\delta (\delta +4)&=&\epsilon \end{matrix}}}$

Note: we used the fact that ${\displaystyle |x+2|\leq \delta +4}$ , which can be proven with the triangle inequality.

Word of caution: the above series of equations is not a logical series of steps, and is not part of any proof, but is an informal technique used to help write the proof. We will select a value of ${\displaystyle \delta }$ so that the last equation is true, and then use the last equation to prove the equations above it in turn (which is what was meant earlier by working backwards).

Note: in the equations above, when ${\displaystyle \delta }$ was substituted for ${\displaystyle x}$ , the sign ${\displaystyle <}$ was replaced with ${\displaystyle =}$ . This can be done (but is not necessary) because we are not told that ${\displaystyle |x-2|=\delta }$ , but rather ${\displaystyle |x-2|<\delta }$ . The justification for this becomes clear when the above equations are used in backwards order in the proof.

We can solve this last equation for ${\displaystyle \delta }$ using the quadratic formula:

${\displaystyle \delta ={\frac {-4+{\sqrt {16-4(-\epsilon )}}}{2}}={\sqrt {4+\epsilon }}-2}$

Note: ${\displaystyle \delta }$ is almost always in terms of ${\displaystyle \epsilon }$ . A constant value of ${\displaystyle \delta }$ (e.g., ${\displaystyle \delta =0.5}$) will not work unless the limit is of a constant function (for instance, ${\displaystyle \lim _{x\to 3}5=5}$).

Now, we have a value of ${\displaystyle \delta }$ , and we can do our proof:

given

${\displaystyle |x-2|<\delta }$

${\displaystyle {\begin{matrix}{\Big |}f(x)-L{\Big |}&=&|x^{2}-4|\\\ &=&|x-2|\cdot |x+2|\\\ &<&\delta (\delta +4)\\\ &<&{\big (}{\sqrt {4+\epsilon }}-2{\big )}{\big (}{\sqrt {4+\epsilon }}+2{\big )}\\\ &<&{\big (}{\sqrt {4+\epsilon }}{\big )}^{2}-2^{2}\\\ &<&\epsilon \end{matrix}}}$

Here a few more examples of choosing ${\displaystyle \delta }$ ; try to figure them out before reading the explanation.

Example 3: Prove that the limit of ${\displaystyle f(x)={\frac {\sin(x)}{x}}}$ as ${\displaystyle x}$ approaches ${\displaystyle 0}$ is ${\displaystyle L=1}$ .

Explanation:

Example 4: Prove that ${\displaystyle f(x)={\frac {1}{x}}}$ has no limit as ${\displaystyle x}$ approaches ${\displaystyle 0}$ .

Example 5: Prove that ${\displaystyle \lim _{x\to 2}x^{2}=4}$

Solution: To do it, we'll look at two cases: ${\displaystyle \epsilon \geq 4}$ and ${\displaystyle \epsilon <4}$ . The ${\displaystyle \epsilon \geq 4}$ case is easy. First let's let ${\displaystyle \epsilon =4}$ . That means we want the values chosen in the domain to map to ${\displaystyle (0,8)}$ in the range. We want a delta such that ${\displaystyle (2+\delta )^{2}=8}$ so let's choose ${\displaystyle \delta =2{\sqrt {2}}-2}$ . The chosen ${\displaystyle \delta }$ defines the interval ${\displaystyle (4-2{\sqrt {2}},2{\sqrt {2}})}$ in our domain. This gets mapped to ${\displaystyle (24-16{\sqrt {2}},8)}$ in our range, which is contained in ${\displaystyle (0,8)}$ . Notice that ${\displaystyle \delta }$ doesn't depend on ${\displaystyle \epsilon }$ . So for ${\displaystyle \epsilon >4}$, we widen the interval in the range that we are allowed to map onto, but our interval in the domain stays fixed and always maps to the same sub-interval in the range. So ${\displaystyle \delta =2{\sqrt {2}}-2}$ works for any ${\displaystyle \epsilon \geq 4}$.

Now suppose ${\displaystyle 0<\epsilon <4}$ . We want a ${\displaystyle \delta }$ such that ${\displaystyle 0<|x^{2}-4|<\epsilon }$ whenever ${\displaystyle 0<|x-2|<\delta }$ . So let's assume ${\displaystyle 0<|x^{2}-4|<\epsilon }$ and work backwards to find a suitable ${\displaystyle \delta }$:

${\displaystyle 0<|x^{2}-4|<\epsilon }$
${\displaystyle -\epsilon
${\displaystyle 4-\epsilon

Since ${\displaystyle 0<\epsilon <4}$ , we have ${\displaystyle 4-\epsilon >0}$ . Since both numbers above are positive, we can take the (positive) square root of both extremes of the inequality:

${\displaystyle {\sqrt {4-\epsilon }}
${\displaystyle {\sqrt {4-\epsilon }}-2

The above equation represents the distance, either negative or positive, that ${\displaystyle x}$ can vary from 2 and still be within ${\displaystyle \epsilon }$ of 4. We want to choose the smaller of the two extremes to construct our interval. It turns out that ${\displaystyle {\Big |}{\sqrt {4+\epsilon }}-2{\Big |}\leq {\Big |}{\sqrt {4-\epsilon }}-2{\Big |}}$ for ${\displaystyle 0<\epsilon <4}$ , so choose ${\displaystyle \delta ={\sqrt {4+\epsilon }}-2}$ . As a sanity check, let's try with ${\displaystyle \epsilon =0.002}$ .

${\displaystyle \delta ={\sqrt {4+\epsilon }}-2}$
${\displaystyle \delta ={\sqrt {0.002+4}}-2}$

which is approximately

${\displaystyle \delta =0.0004999375}$

At the extreme right of the domain, this gives

${\displaystyle x=2.0004999375}$

and

${\displaystyle x^{2}=2.0004999375^{2}=4.00199999993750390625}$

which is within 0.002 of 4.