Week 10 Discussion Notes

Table of Contents

Limits of Functions

Definition

Given a function f ⁣:DR\func{f}{D}{\R}, we say that limxaf(x)=L\displaystyle\lim_{x\to a} f\p{x} = L if for every sequence {xn}nD{a}\set{x_n}_n \subseteq D \setminus \set{a} such that xnax_n \to a, we have limnf(xn)=L\displaystyle\lim_{n\to\infty} f\p{x_n} = L.

Compare with the definition of continuity:

f ⁣:DR\func{f}{D}{\R} is continuous at aDa \in D if for every sequence {xn}nD\set{x_n}_n \subseteq D such that xnax_n \to a, we have limnf(xn)=L\displaystyle\lim_{n\to\infty} f\p{x_n} = L.

The difference here is that in continuity, the terms of the sequence are allowed to be aa, but in the definition of a limit, the elements of your sequence are not allowed to be aa. Beyond that, there's not much else to say. Everything is defined in terms of sequences, so as you would expect, all the usual limit laws apply.

Example 1.

Show that limx1(x1/31x1)(x2+1)=23\displaystyle\lim_{x\to1} \p{\frac{x^{1/3} - 1}{x - 1}}\p{x^2 + 1} = \frac{2}{3}.

Solution.

Recall that a3b3=(ab)(a2+ab+b2)a^3 - b^3 = \p{a - b}\p{a^2 + ab + b^2}. If we set a=x1/3a = x^{1/3} and b=1b = 1, then

x1=(x1/3)31=(x1/31)(x2/3+x1/3+1),x - 1 = \p{x^{1/3}}^3 - 1 = \p{x^{1/3} - 1}\p{x^{2/3} + x^{1/3} + 1},

so

x1/31x1=x1/31(x1/31)(x2/3+x1/3+1)=1x2/3+x1/3+1    limx1x1/31x1=limx11x2/3+x1/3+1=13.\begin{gathered} \frac{x^{1/3} - 1}{x - 1} = \frac{x^{1/3} - 1}{\p{x^{1/3} - 1}\p{x^{2/3} + x^{1/3} + 1}} = \frac{1}{x^{2/3} + x^{1/3} + 1} \\ \implies \lim_{x\to1} \frac{x^{1/3} - 1}{x - 1} = \lim_{x\to1} \frac{1}{x^{2/3} + x^{1/3} + 1} = \frac{1}{3}. \end{gathered}

Since polynomials are continuous, we also have limx1(x2+1)=2\displaystyle\lim_{x\to1} \p{x^2 + 1} = 2, so by the limit laws,

limx1(x1/31x1)(x2+1)=(limx1x1/31x1)(limx1(x2+1))=132=23.\lim_{x\to1} \p{\frac{x^{1/3} - 1}{x - 1}}\p{x^2 + 1} = \p{\lim_{x\to1} \frac{x^{1/3} - 1}{x - 1}} \p{\lim_{x\to1} \p{x^2 + 1}} = \frac{1}{3} \cdot 2 = \frac{2}{3}.

Derivatives

Definition

Let IRI \subseteq \R be an interval and f ⁣:IR\func{f}{I}{\R} be a function. Then ff is differentiable at aIa \in I if

f(a)=limxaf(x)f(a)xaf'\p{a} = \lim_{x\to a} \frac{f\p{x} - f\p{a}}{x - a}

exists and is finite. In this case, we say f(a)f'\p{a} is the derivative of ff at aa.

Here are some very useful formulas for calculating derivatives:

Proposition

Suppose f,gf, g are differentiable at aRa \in \R and let cRc \in \R. Then

  1. cfcf is differentiable at aa and (cf)(a)=cf(a)\p{cf}'\p{a} = cf'\p{a}.
  2. f+gf + g is differentiable at aa and (f+g)(a)=f(a)+g(a)\p{f + g}'\p{a} = f'\p{a} + g'\p{a}.
  3. (product rule) fgfg is differentiable at aa and (fg)(a)=f(a)g(a)+f(a)g(a)\p{fg}'\p{a} = f'\p{a}g\p{a} + f\p{a}g'\p{a}.
  4. (quotient rule) If g(a)0g\p{a} \neq 0, then fg\frac{f}{g} is differentiable at aa and (fg)(a)=f(a)g(a)f(a)g(a)[g(a)]2\p{\frac{f}{g}}'\p{a} = \frac{f'\p{a}g\p{a} - f\p{a}g'\p{a}}{\br{g\p{a}}^2}.
Theorem (chain rule)

Let aRa \in \R. If ff is differentiable at g(a)g\p{a} and gg is differentiable at aa, then fgf \circ g is differentiable at aa and (fg)(a)=f(g(a))g(a)\p{f \circ g}'\p{a} = f'\p{g\p{a}} g'\p{a}.

The rest of the notes will be dedicated to examples, since there's not much else to talk about.

Example 2.
(28.8)

Let f(x)=x2f\p{x} = x^2 for xx rational and f(x)=0f\p{x} = 0 for xx irrational. Show that ff is differentiable at x=0x = 0.

Solution.

First, let's look at a wrong answer:

Notice that f(x)=2xf'\p{x} = 2x if xx is rational. Thus, f(0)=0f'\p{0} = 0.

The problem with this statement is that ff is not continuous if x0x \neq 0, which means that f(x)f'\p{x} doesn't exist for x0x \neq 0. As a result, "f(x)f'\p{x} if xx is rational" is meaningless. This tells us that our formulas above won't be useful for this problem, and we'll have to do it directly from the definition.

We want to calculate limx0f(x)f(0)x0\lim_{x\to0} \frac{f\p{x} - f\p{0}}{x - 0}, so it'll be a good idea to see what the function in the limit looks like. If x0x \neq 0, then

f(x)f(0)x0=f(x)x={xif x is rational,0otherwise.\frac{f\p{x} - f\p{0}}{x - 0} = \frac{f\p{x}}{x} = \begin{cases} x & \text{if } x \text{ is rational}, \\ 0 & \text{otherwise}. \end{cases}

This limit should be 00, so let's try to prove that. Let {xn}n\set{x_n}_n be a sequence such that xn0x_n \neq 0 for all nn and xn0x_n \to 0. Let ε>0\epsilon > 0, so by definition, there exists NRN \in \R such that if n>Nn > N, then xn<ε\abs{x_n} < \epsilon. Thus,

f(xn)f(0)xn0={xnif xn is rational,0otherwise<ε,\begin{aligned} \abs{\frac{f\p{x_n} - f\p{0}}{x_n - 0}} &= \begin{cases} \abs{x_n} & \text{if } x_n \text{ is rational}, \\ 0 & \text{otherwise} \end{cases} \\ &< \epsilon, \end{aligned}

since it's less than ε\epsilon in both cases. Thus, because {xn}n\set{x_n}_n was an arbitrary sequence,

f(0)=limx0f(x)f(0)x0=0.f'\p{0} = \lim_{x\to0} \frac{f\p{x} - f\p{0}}{x - 0} = 0.
Example 3.
(28.14)

Suppose ff is differentiable at aa. Prove:

  1. limh0f(a+h)f(a)h=f(a)\displaystyle \lim_{h\to0} \frac{f\p{a + h} - f\p{a}}{h} = f'\p{a}
  2. limh0f(a+h)f(ah)2h=f(a)\displaystyle \lim_{h\to0} \frac{f\p{a + h} - f\p{a - h}}{2h} = f'\p{a}
Solution.
  1. Since ff is differentiable at aa, we know that for any sequence {xn}n\set{x_n}_n such that xnax_n \neq a and xnax_n \to a, we have

    f(a)=limnf(xn)f(a)xna.f'\p{a} = \lim_{n\to\infty} \frac{f\p{x_n} - f\p{a}}{x_n - a}.

    Let {hn}n\set{h_n}_n be a sequence such that hn0h_n \neq 0 and hn0h_n \to 0. Notice that a+hnaa + h_n \neq a for all nn and a+hn0a + h_n \to 0, so if we set xn=a+hnx_n = a + h_n, we can apply the equation above to get

    limnf(a+hn)f(a)hn=limnf(a+hn)f(a)(a+hn)a=limnf(xn)f(a)xna=f(a).\begin{aligned} \lim_{n\to\infty} \frac{f\p{a + h_n} - f\p{a}}{h_n} &= \lim_{n\to\infty} \frac{f\p{a + h_n} - f\p{a}}{\p{a + h_n} - a} \\ &= \lim_{n\to\infty} \frac{f\p{x_n} - f\p{a}}{x_n - a} \\ &= f'\p{a}. \end{aligned}

    Since {hn}n\set{h_n}_n was an arbitrary sequence, it follows that

    limh0f(a+h)f(a)h=f(a).\lim_{h\to0} \frac{f\p{a + h} - f\p{a}}{h} = f'\p{a}.
  2. Notice that

    f(a+h)f(ah)2h=f(a+h)f(a)+f(a)f(ah)2h=12(f(a+h)f(a)h+f(a)f(ah)h)=12(f(a+h)f(a)h+f(a+(h))f(a)(h)).\begin{aligned} \frac{f\p{a + h} - f\p{a - h}}{2h} &= \frac{f\p{a + h} - f\p{a} + f\p{a} - f\p{a - h}}{2h} \\ &= \frac{1}{2} \p{\frac{f\p{a + h} - f\p{a}}{h} + \frac{f\p{a} - f\p{a - h}}{h}} \\ &= \frac{1}{2} \p{\frac{f\p{a + h} - f\p{a}}{h} + \frac{f\p{a + \p{-h}} - f\p{a}}{\p{-h}}}. \end{aligned}

    We can calculate the limit of both terms in the parentheses by the definition of the derivative, so by the limit laws,

    limh0f(a+h)f(ah)2h=limh012(f(a+h)f(a)h+f(a+(h))f(a)(h))=12(f(a)+f(a))=f(a).\begin{aligned} \lim_{h\to0} \frac{f\p{a + h} - f\p{a - h}}{2h} &= \lim_{h\to0} \frac{1}{2} \p{\frac{f\p{a + h} - f\p{a}}{h} + \frac{f\p{a + \p{-h}} - f\p{a}}{\p{-h}}} \\ &= \frac{1}{2} \p{f'\p{a} + f'\p{a}} \\ &= f'\p{a}. \end{aligned}
Example 4.

True or false: If limh0f(a+h)f(ah)2h\displaystyle \lim_{h\to0} \frac{f\p{a + h} - f\p{a - h}}{2h} exists and is finite, then ff is differentiable at aa.

Solution.

False. The exercise above tells us that if the derivative exists, then we can calculate f(a)f'\p{a} using the above formula. If the derivative doesn't exist, then the formula may no longer be true. For example, if f(x)=xf\p{x} = \abs{x}, then

limh0f(a+h)f(ah)2h=limh0hh2h=0,\lim_{h\to0} \frac{f\p{a + h} - f\p{a - h}}{2h} = \lim_{h\to0} \frac{\abs{h} - \abs{-h}}{2h} = 0,

but ff is not differentiable at x=0x = 0.

Example 5.
(28.16)

Let ff be a function defined on an open interval II containing aa. Show that f(a)f'\p{a} exists if and only if there is a function ε(x)\epsilon\p{x} defined on II and a real number bb such that

f(x)f(a)=(xa)(bε(x))andlimxaε(x)=0.f\p{x} - f\p{a} = \p{x - a}\p{b - \epsilon\p{x}} \quad\text{and}\quad \lim_{x\to a} \epsilon\p{x} = 0.
Solution.

"    \implies"

Suppose f(a)f'\p{a} exists. Let's try to reverse engineer what ε\epsilon and bb would have to be:

f(x)f(a)=(xa)(bε(x))    ε(x)=bf(x)f(a)xa.f\p{x} - f\p{a} = \p{x - a}\p{b - \epsilon\p{x}} \implies \epsilon\p{x} = b - \frac{f\p{x} - f\p{a}}{x - a}.

For ε(x)\epsilon\p{x} to tend to 00 as x0x \to 0, we would need b=f(a)b = f'\p{a}, by the definition of the derivative. Now let's prove that this works:

Technically, ε\epsilon is defined on I{a}I \setminus \set{a}, but its value at x=ax = a doesn't matter since we're taking limits, so we can set it to be any number we like to get a function defined on II. Then

f(x)f(a)=(xa)(f(a)ε(x))f\p{x} - f\p{a} = \p{x - a}\p{f'\p{a} - \epsilon\p{x}}

just by definition of ε(x)\epsilon\p{x}, and by our choice of bb, we get limxaε(x)=0\displaystyle\lim_{x\to a} \epsilon\p{x} = 0 automatically.

"    \impliedby"

Suppose that ε(x)\epsilon\p{x} and bb exist as in the problem statement. By rearranging the equation in the problem statement and applying limit laws,

f(x)f(a)xa=bε(x)    limxaf(x)f(a)xa=limxa(bε(x))=blimxaε(x)=b,\begin{aligned} \frac{f\p{x} - f\p{a}}{x - a} &= b - \epsilon\p{x} \\ \implies \lim_{x\to a} \frac{f\p{x} - f\p{a}}{x - a} &= \lim_{x\to a} \p{b - \epsilon\p{x}} \\ &= b - \lim_{x\to a} \epsilon\p{x} \\ &= b, \end{aligned}

so by definition of the derivative, f(a)f'\p{a} exists and is equal to bb.