# College Math Teaching

## April 6, 2013

### Calculus and Analysis: the power of examples

In my non-math life I am an avid runner and walker. Ok, my enthusiasm for these sports greatly excedes my talent and accomplishments for these sports; I once (ONCE) broke 40 minutes for the 10K run and that was in 1982; the winner (a fellow named Bill Rodgers) won that race and finished 11 minutes ahead of me that day! 🙂 Now I’ve gotten even slower; my fastest 10K is around 53 minutes and I haven’t broken 50 since 2005. 😦

But alas I got a minor bug and had to skip today’s planned races; hence I am using this morning to blog about some math.

Real Analysis and Calculus
I’ve said this before and I’ll say it again: one of my biggest struggles with real analysis and calculus was that I often didn’t see the point of the nuances in the proof of the big theorems. My immature intuition was one in which differentiable functions were, well, analytic (though I didn’t know that was my underlying assumption at the time). Their graphs were nice smooth lines, though I knew about corners (say, $f(x) = |x|$ at $x = 0$.

So, it appears to me that one of the way we can introduce the big theorems (along with the nuances) is to have a list of counter examples at the ready and be ready to present these PRIOR to the proof; that way we can say “ok, HERE is why we need to include this hypothesis” or “here is why this simple minded construction won’t work.”

So, what are my favorite examples? Well, one is the function $f(x) =\left\{ \begin{array}{c}e^{\frac{-1}{x^2}}, x \ne 0 \\ 0, x = 0 \end{array}\right.$ is a winner. This gives an example of a $C^{\infty}$ function that is not analytic (on any open interval containing 0 ).

The family of examples I’d like to focus on today is $f(x) =\left\{ \begin{array}{c}x^ksin(\frac{\pi}{ x}), x \ne 0 \\ 0, x = 0 \end{array}\right.$, $k$ fixed, $k \in {1, 2, 3,...}$.

Note: henceforth, when I write $f(x) = x^ksin(\frac{\pi}{x})$ I’ll let it be understood that I mean the conditional function that I wrote above.

Use of this example:
1. Squeeze theorem in calculus: of course, $|x| \ge |xsin(\frac{\pi}{x})| \ge 0$; this is one time we can calculate a limit without using a function which one can merely “plug in”. It is easy to see that $lim_{x \rightarrow 0 } |xsin(\frac{\pi}{x})| = 0$.

2. Use of the limit definition of derivative: one can see that $lim_{h \rightarrow 0 }\frac{h^2sin(\frac{\pi}{h}) - 0}{h} =0$; this is one case where we can’t merely “calculate”.

3. $x^2sin(\frac{\pi}{x})$ provides an example of a function that is differentiable at the origin but is not continuously differentiable there. It isn’t hard to see why; away from 0 the derivative is $2x sin(\frac{\pi}{x}) - \pi cos(\frac{\pi}{x})$ and the limit as $x$ approaches zero exists for the first term but not the second. Of course, by upping the power of $k$ one can find a function that is $k-1$ times differentiable at the origin but not $k-1$ continuously differentiable.

4. The proof of the chain rule. Suppose $f$ is differentiable at $g(a)$ and $g$ is differentiable at $a$. Then we know that $f(g(x))$ is differentiable at $x=a$ and the derivative is $f'(g(a))g'(a)$. The “natural” proof (say, for $g$ non-constant near $x = a$ looks at the difference quotient: $lim_{x \rightarrow a} \frac{f(g(x))-f(g(a))}{x-a} =lim_{x \rightarrow a} \frac{f(g(x))-f(g(a))}{g(x)-g(a)} \frac{g(x)-g(a)}{x-a}$ which works fine, so long as $g(x) \ne g(a)$. So what could possibly go wrong; surely the set of values of $x$ for which $g(x) = g(a)$ for a differentiable function is finite right? 🙂 That is where $x^2sin(\frac{\pi}{x})$ comes into play; this equals zero at an infinite number of points in any neighborhood of the origin.

Hence the proof of the chain rule needs a workaround of some sort. This is a decent article on this topic; it discusses the usual workaround: define $G(x) =\left\{ \begin{array}{c}\frac{f(g(x))-f(g(a))}{g(x)-g(a)}, g(x)-g(a) \ne 0 \\ f'(g(x)), g(x)-g(a) = 0 \end{array}\right.$. Then it is easy to see that $lim_{x \rightarrow a} \frac{f(g(x))-f(g(a))}{x-a} = lim_{x \rightarrow a}G(x)\frac{g(x)-g(a)}{x-a}$ since the second factor of the last term is zero when $x = a$ and the limit of $G(x)$ exists at $x = a$.

Of course, one doesn’t have to worry about any of this if one introduces the “grown up” definition of derivative from the get-go (as in: best linear approximation) and if one has a very gifted class, why not?

5. The concept of “bounded variation” and the Riemann-Stiltjes integral: given functions $f, g$ over some closed interval $[a,b]$ and partitions $P$ look at upper and lower sums of $\sum_{x_i \in P} f(x_i)(g(x_{i}) - g(x_{i-1}) = \sum_{x_i \in P}f(x_i)\Delta g_i$ and if the upper and lower sums converge as the width of the partions go to zero, you have the integral $\int^b_a f dg$. But this works only if $g$ has what is known as “bounded variation”: that is, there exists some number $M > 0$ such that $M > \sum_{x_i \in P} |g(x_i)-g(x_{i-1})|$ for ALL partitions $P$. Now if $g(x)$ is differentiable with a bounded derivative on $[a,b]$ (e. g. $g$ is continuously differentiable on $[a,b]$ then it isn’t hard to see that $g$ had bounded variation. Just let $W$ be a bound for $|g'(x)|$ and then use the Mean Value Theorem to replace each $|g(x_i) - g(x_{i-1})|$ by $|g'(x_i^*)||x_i - x_{i-1}|$ and the result follows easily.

So, what sort of function is continuous but NOT of bounded variation? Yep, you guessed it! Now to make the bookkeeping easier we’ll use its sibling function: $xcos(\frac{\pi}{x})$. 🙂 Now consider a partition of the following variety: $P = \{0, \frac{1}{n}, \frac{1}{n-1}, ....\frac{1}{3}, \frac{1}{2}, 1\}$. Example: say $\{0, \frac{1}{5}, \frac{1}{4}, \frac{1}{3}, \frac{1}{2}, 1\}$. Compute the variation: $|0-(- \frac{1}{5})|+ |(- \frac{1}{5}) - \frac{1}{4}| + |\frac{1}{4} - (-\frac{1}{3})|+ |-\frac{1}{3} - \frac{1}{2}| + |\frac{1}{2} -(-1)| = \frac{1}{5} + 2(\frac{1}{4} + \frac{1}{3} + \frac{1}{2}) + 1$. This leads to trouble as this sum has no limit as we progress with more points in the sequence of partitions; we end up with a divergent series (the Harmonic Series) as one term as points are added to the partition.

6. The concept of Absolute Continuity: this is important when one develops the Fundamental Theorem of Calculus for the Lebesgue integral. You know what it means for $f$ to be continuous on an interval. You know what it means for $f$ to be uniformly continuous on an interval (basically, for the whole interval, the same $\delta$ works for a given $\epsilon$ no matter where you are, and if the interval is a closed one, an easy “compactness” argument shows that continuity and uniform continuity are equivalent. Absolute continuity is like uniform continuity on steroids. I’ll state it for a closed interval: $f$ is absolutely continuous on an interval $[a,b]$ if, given any $\epsilon > 0$ there is a $\delta > 0$ such that for $\sum |x_{i}-y_{i}| < \delta, \sum |f(x_i) - f(y_{i})| < \epsilon$ where $(x_i, y_{i})$ are pairwise disjoint intervals. An example of a function that is continuous on a closed interval but not absolutely continuous? Yes; $f(x) = xcos(\frac{\pi}{x})$ on any interval containing $0$ is an example; the work that we did in paragraph 5 works nicely; just make the intervals pairwise disjoint.