Limits and continuity
=====================

Limits
------
The notation
    lim_{x -> b} f(x) = c
means:
    f(x) is arbitrarily close to c for all x sufficiently close, but not
    equal, to b.

Graphically:
    For any horizontal strip around c,
    there is a vertical strip around b such that
	f is defined on the vertical strip (except perhaps at b itself),
	and the graph of f within the vertical strip is contained in the
	horizontal strip (except maybe above b itself).
    (demonstrate on a graph with a removable singularity, and on one with a
    jump discontinuity)

Examples and non-examples:
    * lim_{x -> 0} x = 0

    * Let f be the function:
     	f(x) = x if x != 0;
	f(0) = 37.
	Then lim_{x->0} f(x) = 0.

    * Let f(x) = sin(1/x).
	f(x) = 1 for x arbitrarily close to 0 (x=1/(pi/2 + 2k pi))
	but it is *not* the case that lim_{x->0} f(x) = 1

    * lim_{x -> 0} x*sin(1/x) = 0
	because -x <= x*sin(1/x) <= x

Fact:
    Limits are unique when they exist.

    i.e. if lim_{x->b} f(x) = c_1 and lim_{x->b} f(x) = c_2, then c_1=c_2.


More notation:
    f(x) -> c as x -> b                  }
                                         }
    f(x) -----> c                        }  same
	  x->b                           } meaning
                                         }
    "the limit of f at b is c"           }


    "f has no finite limit at b"
    means
    lim_{x->c} f(x) != c for any c in R

    (this is _not_ the same as lim_{x->c} f(x) = +/- \infty)

Example:
    lim_{x->0} (e^x-1)/x
	draw graphs and briefly indicate l'Hôpital argument
	then give power series argument

One-sided limits
    lim_{x -> b+} f(x) = c
    lim_{x -> b-} f(x) = c
	defined as above, but only considering x to the right/left of b.

    e.g. f(x) := 0 if x < 0, 1 if x >= 0

Infinite limits:
    lim_{x -> b} f(x) = \infty
	if f(x) is arbitrarily positive for all x sufficiently close, but not
	equal, to b.
    
    e.g.
	lim_{x -> 0} x^-2 = \infty
	lim_{x -> 0+} x^-1 = \infty
	lim_{x -> 0-} x^-1 = -\infty

Limits at infinity:
    lim_{x -> \infty} f(x) = c
	if f(x) is arbitrarily close to c for all sufficiently positive x.

    lim_{x -> \infty} 1-e^x = 0

    lim_{x -> -\infty} x^2 = \infty

"Limit laws": see 2.3

Continuity
----------
Definition:
    f is _continuous_ at b iff
	lim_{x->b} f(x) = f(b)

	(if the limit doesn't exist, or f(b) isn't defined, then f is not
	continuous at b)

Examples:
    The following are all continuous at every point in their domains:
	polynomials, exp, sin, cos, arctan, abs(x) = |x|,
	rational functions (p(x)/q(x) with p,q polynomials), tan, log, arcsin,
	arccos.

    f(x) := 0 if x < 0, 1 if x >= 0 is continuous everywhere except 0

    x*sin(1/x) is continuous everywhere except 0, where it isn't defined.

    f(x) := x*sin(1/x) if x != 0, f(0) = 0
	is continuous everywhere.

Continuous functions make computing limits easy:

Fact:
    If lim_{x -> b} g(x) exists, and f is continuous at lim_{x->b}g(x), then
	lim_{x -> b} f(g(x)) = f( lim_{x -> b} g(x) )

Example:
    lim_{x -> 0} e^{ (e^x-1)/x }
	= e^{ lim_{x->0} ((e^x-1)/x)}
	= e^1 = e

Consequence:
    If f and g are continuous, then so is the composition f o g:

	lim_{x->b} f(g(x)) = f(lim_{x->b} g(x)) = f(g(b)).
