This seminar by Cale took place on 14th June 2007, in #mathematics channel of

The timestamps displayed in the IRC text are at an unknown offset.
Any explanation or errors regarding this seminar should be recorded in the discussion page.


[TRWBW] ding!
* thermoplyae doubts Cale needs introduction
[Cale] hehe
[Cale] Everyone here?
[mustmr] I think so.
[Cale] ailndx?
[Cale] It would be a shame if he missed it, seeing as he's been bothering me for a week or something about it :)
[Mephisto] i'm here, but only half .. exam tomorrow
[Cale] Okay. Let me just get some sense of where to start...
[Cale] Anyone not know what a function (from a set A to a set B) is?
[Cale] Okay :)
[Nichevo] :)
[Nichevo] domain to range?
[Cale] domain to codomain
[Cale] Perhaps I'll just state it.
[Nichevo] right
[Cale] A function f: A -> B is a collection of pairs (a,b) with a in A and b in B, such that for each a in A, there is
       exactly one b in B such that (a,b) is in f.
[Cale] When (a,b) is in f, we write f(a) = b.
[Cale] A is called the domain of f
[ailndx] Cale: im here, was out running! :)
[Nichevo] one to one correspondence, ey?
[Cale] B is called the codomain
[Cale] Nichevo: sort of -- only one way.
[nawa] that's not a one to one correspondence, it merely means one element isnt mapped to more than one thing
[Nichevo] ah
[Cale] There might be distinct x,y in A such that f(x) = f(y).
[Cale] If it so happens that whenever x and y are elements of A with x not equal to y, we have that f(x) /= f(y), then
       f is called an injective function or one-to-one.
[Cale] Also, note that in general, there might be elements b in B for which there is no a in A such that f(a) = b
[Nichevo] If I get it right. Different elements do not map to same element?
[Cale] right
[Cale] If that happens, f is injective.
[Cale] If for every b in B, there is some a in A such that f(a) = b, then f is called surjective, or onto.
[ailndx] "When (a,b) is in f, we write f(a) = b." isnt (a,b) always in f?
[Cale] ailndx: not for all pairs (a,b)
[ailndx] ah ok
[Cale] In fact, for each a in A, there's only one b in B such that (a,b) is in f
[nawa] (5,24) isn't in f where f(x) = x^2.  (5, 25) is in f
[Cale] right :)
*** cjeris (i=null@ has joined channel #mathematics
[Cale] Okay, so we have N = {0,1,2,...} the set of natural numbers, and R the set of real numbers.
[ailndx] can you show a small example of injective and surjective?
[Cale] sure
[Cale] Let's do a really small example :)
[Nichevo] ^^
[Cale] Let A = {apple, blueberry, carrot}, and B = {1,2,3}
[Cale] So, first, an example of a function which is not injective:
[Cale] f(apple) = 1
[Cale] f(blueberry) = 3
[Cale] f(carrot) = 1
[Cale] That is, f is the set of pairs {(apple,1), (blueberry,3), (carrot,1)}
[Cale] apple is not equal to carrot, but f(apple) is equal to f(carrot)
[Nichevo] what they map to
[Cale] Also, note that this function is not surjective, because there's no a in A such that f(a) = 2
[Cale] We can define the range of f as the set of elements b in B such that there is some a in A with f(a) = b
[Cale] In this case, the range of f is {1,3}
[Cale] A function is surjective if and only if its range is equal to its codomain.
*** thermoplyae has left channel #mathematics
[Cale] Want an example of some functions which are surjective and injective, or is that cool?
[Cale] Well, let's do one which is both
[Cale] g(apple) = 2
[Nichevo] so f(x) = x^2 + 4  x E R is not surjective?
[Cale] g(blueberry) = 1
[Cale] g(carrot) = 3
[nawa] Nichevo: depends on what you are considering to be the codomain
[Nichevo] pardon the breakage
[Cale] Nichevo: right
[Cale] If the codomain is R
[Nichevo] yes
[Cale] You can always choose the codomain to be small enough that the function is surjective.
[Cale] Okay, so let's talk a bit about sequences, since this is supposed to be about Calculus. :)
[Nichevo] :D
[Cale] A sequence (of real numbers) is a function f: N -> R, where N = {0,1,2,...} is the set of natural numbers,
       and R is the set of real numbers.
[Cale] Often we'll use another notation for sequences
[Cale] We might say that {x_0, x_1, x_2, ...} is a sequence
[Cale] Really, this is just a fancy way to write the function whose pairs are {(0,x_0), (1,x_1), ...}
[Cale] So let's have an example...
[Cale] f(n) = 1/(n+1)
[Cale] That is, {1, 1/2, 1/3, 1/4, ...}
[Cale] Or f(n) = n sqrt(2)
[Cale] which is the sequence (0, sqrt(2), 2 sqrt(2), ...)
[Cale] Looking again at that first sequence
[Cale] (1,1/2,1/3,1/4,...)
[Cale] It seems that the elements are getting closer and closer to zero.
[Nichevo] indeed they are
[Cale] We'd like to be able to formalise that idea.
[Cale] The basic idea of a sequence converging to a limit L is that if you go "far enough out"
       in the sequence of numbers, everything will be very close to L.
[Cale] How close? As close as you want, so long as you're willing to look far enough out.
[Cale] To put this more formally,
[Cale] A sequence f: N -> R converges to the limit L if: for any number e > 0 (no matter how small),
       there is some natural number M so that if n > M, we 
have that |f(n) - L| < e
[Cale] Note that |f(n) - L| is the distance between f(n), the nth element of the sequence, and the limit L
[Cale] We're saying that no matter how small you want that to be, there will be some point after which all
       the elements of the sequence will be that close to L.
[medfly] why do we have n > M?
[Cale] medfly: That is, n is after M
[Cale] We're looking at the elements f(n) in the sequence which are after the Mth one.
[Nichevo] ah right
[ailndx] can we have an example?
[Cale] For example, you might claim that the sequence (1,1/2,1/3,...) converges to 0
[Nichevo] there is always a smaller number down the sequence, to put it bluntly?
[Nichevo] or closer
[Cale] And I'd say, oh yeah? Let e = 1/100
[Cale] What does M have to be?
[Cale] That is, how far out do we have to go before all the elements are within 1/100 of 0?
[Cale] Anyone want to guess?
[Nichevo] well, a hundred?
[Cale] Of course :)
[ailndx] huh
[nawa] the n > M means that the sequence will 'eventually' remain within any specified range around L even if
       it isnt for the first few terms
[ailndx] isnt it <= e then?
[Cale] yeah, maybe 101 :)
[nawa] ailndx: n > 100 means you start from 101 :)
[Cale] Yeah, M is 100
[ailndx] ah ok
[Cale] which means that we've dropped 101 terms from the start of the sequence, and we're looking at the rest
[nawa] M = 101 is fine to use too though. M = 200 is also fine
[medfly] Cale, youre using 1/(n+1), not 1/n :)
[Cale] well, 1/n has the little problem with n = 0 ?
[Cale] er, not ?
[Nichevo] ><
[Cale] hehe
[Cale] I mean, not question-mark.
[Nichevo] in that case n = 0 is fine
[nawa] medfly is pointing out that M=100 actually doesnt work.  lol
[Cale] oh, right :)
[Cale] sorry
[Cale] M = 101 is okay though.
[medfly] (i thought i was pointing out M=100 does work, but if you say so)
[Cale] Er, hang on, if n > 100, then |f(n) - 0| = |1/(n+1)| = 1/n < 1/100
[Cale] So it works :)
[Cale] Best to just do it :)
[Cale] Let me grab a slice of pizza, I'll be back in a sec.
[medfly] i wonder if they do that on universities too.
[Cale] all right
[medfly] (the slice of pizza thing, that was meant to be a joke, i know im not funny)
[Cale] So, to really prove that this thing converges to 0, we'll actually need to know something
       about the real numbers
[Cale] Let's just start off...
[Cale] Let e > 0 be chosen arbitrarily.
[Cale] (so if we can pick an M from here and show that it works, it'll work for any e)
[Cale] What would we like M to be in this case?
[medfly] 42
[Cale] Well, given our experiments, we'd like M to be a number large enough so that 1/M is smaller than e
[ailndx] is it a proof even if we pick one arbitrarily?
[nawa] yes
[Cale] ailndx: by "pick one arbitrarily" I mean don't really pick one.
[Cale] Like, we're not choosing e = 42 here :)
[ailndx] ok ^^
[Cale] We're saying that e is just some positive real number, and we don't really know what it is.
[nawa] it is basically saying since it didnt matter which e we chose, proving it for some arbitrary e will
       mean proving it true 'for all e > 0'
[Cale] This just helps to keep your head straight about what's going on, because it's easier to think about
       some arbitrary real number than it is to think 
       about all of them at once.
[Cale] Suppose that 1/M < e
[Cale] then if n > M, we get:
[Cale] |f(n) - L| = |1/(n+1) - 0| = 1/(n+1) < 1/M < e
[Cale] So if we can pick an M so that 1/M < e, everything will be good.
[Cale] The fact that we can do this is called the Archimedean property of the real numbers.
[Cale] Let's actually prove that, because it's not so hard, and it's an important fact :)
[Cale] To prove it, we'll use something which I'm really going to consider a basic property of the reals, called
       the least upper bound property.
[Cale] An upper bound for a set S of real numbers is a real number a such that for every s in S, we have s <= a.
[Cale] If in addition to being an upper bound for s, the number a has the property that whenever b is another
       upper bound for S, we have a <= b, then a is called a least upper bound for S.
[Cale] That is, it's the "smallest" number which is also an upper bound.
[Cale] Some examples: 3 is a least upper bound of {1,2,3}
[Cale] 1 is a least upper bound of the interval (0,1)
[Cale] (note that 1 isn't an element of (0,1)
[Cale] )
[ailndx] it aint?
[Cale] (0,1) is the set of real numbers x such that 0 < x < 1
[ailndx] oki
[Cale] Okay
[Cale] so note that if a set has a least upper bound, then it is unique
[Cale] that is, suppose that a and b are both least upper bounds for S
[nawa] you can prove that there is M s.t 1/M < e without needing this property?
[Cale] nawa: You can't actually -- at least, you need something equivalent to the property I'm going to talk about
[Nichevo] what did I miss?
[Cale] that is, suppose that a and b are both least upper bounds for S
[Cale] [nawa] you can prove that there is M s.t 1/M < e without needing this property?
[Cale] [Cale] nawa: You can't actually -- at least, you need something equivalent to the property I'm going to talk about
[Nichevo] ty
[nawa] so i take it dividing and rounding up doesn't work for some reason?
[nawa] er, dividing being.. taking reciprocal
[Cale] Well, it does, but to really show that, I suspect we'd need this property :)
[nawa] ok, i see now
[Cale] and this is important for lots of other reasons anyway :)
[Cale] Okay, so suppose that a and b are both least upper bounds for S
[Cale] then since a is a least upper bound and b is another upper bound, we have a <= b
[Cale] but since b is a least upper bound and a is another upper bound, we also have b <= a
[Cale] so a = b.
[Cale] So if they exist, least upper bounds are unique.
[Cale] The least upper bound property says that if S is a nonempty set of real numbers, and S has an upper bound, then S
       has a least upper bound.
[Cale] This is actually part of the axiomatic definition of the real numbers. I could go into that if people really wanted.
*** Signoff: Nichevo (Remote closed the connection)
[Cale] It's a fairly non-obvious property, but it's rather important.
[ailndx] w8 a sec, "Okay, so suppose that a and b are both least upper bounds for S" of they are both least upper bounds
         doesnt that mean, a = b and that "a <= b" is false and "b <= a" is also false?
[Cale] ailndx: hm?
[Cale] if a = b, then surely a <= b
[ailndx] i suppose only one bound can be least
[Cale] That's what I was proving
[Cale] I was proving that if you have two least upper bounds, then they're really the same.
[ailndx] if a is 5 and b is 5 then a = b, but then a <= b is false
[Cale] no it isn't
[ailndx] ah sorry
[Cale] a <= b is true if a < b or if a = b
[nawa] <= means less than OR equal to
[ailndx] alright, im with you again :)
[Cale] Okay, because it's so important, I'll state the LUB property again:
[ailndx] should stop tabbing between stuff
[Cale] If S is a nonempty set of real numbers, and S has an upper bound, then S has a least upper bound.
[Cale] I'm not going to prove that because to do it would require a specific definition of the reals, like Dedekind cuts,
       and that would make a whole other 
lecture :)
[Cale] We'll just take it as an axiom.
[Cale] Okay, so let's show that N is not bounded above.
[Cale] We'll do it by contradiction
[Cale] N is not an empty set, (it contains 37, for example)
[Cale] so if it's bounded above, it has a least upper bound (which is a real number)
[Cale] Let this least upper bound be called a
[Cale] So n <= a for every n in N
[Cale] so n + 1 <= a for every n in N
[Cale] because if n is in N, then so is n+1
[Cale] so, subtracting 1 from both sides, we have
[Cale] n <= a - 1
[Cale] for every n in N
[Cale] But a - 1 < a and not equal to it.
[Cale] and we just said that it's an upper bound for N
[Cale] So a couldn't have been the least upper bound for N
[Cale] So N doesn't have a least upper bound.
[Cale] So N doesn't have an upper bound at all.
[Cale] Everyone follow that?
[medfly] i know i am.
[Nichevo] what about (23:07:47) Cale: so n + 1 <= a for every n in N
[Cale] Nichevo: well, if n is in N, then so is n+1, right?
[Nichevo] why_
[Cale] N is the set of natural numbers
[Nichevo] yes
[Cale] 0 is in N, and if n is in N, then n+1 is in N
[Cale] that's the defining property of the naturals.
[Nichevo] right
[Nichevo] then I follow
[Cale] So, as a corollary to this, for any e > 0, there is a natural number n with 1/n < e
[Cale] Suppose not. Then 1/n > e for every n in N.
[Nichevo] which is absurd (? )
[Cale] er, 1/n >= e for every n in N, rather.
[Cale] thus, n <= 1/e for all n in N
[Cale] but that means that 1/e is an upper bound for N
[Cale] which is absurd.
[ailndx] "N is the set of natural numbers, 0 is in N, and if n is in N, then n+1 is in N" what
         do you mean "if n is in N", isnt it always in N?
[Cale] ailndx: Well, there are numbers not in N.
[Cale] For example, 1/2 isn't in N.
[nawa] so we needed the least upper bound stuff only to prove that N was unbounded?
[Cale] nawa: for now.
[Cale] I expect we might need it some more later :)
[nawa] wow, i always took that for granted
[Nichevo] doesnt is follow from induction if n is in N, then n+1 is in n and there is no upper boud?
[Cale] Nichevo: Well, how would you show that there's no upper bound?
[ailndx] Cale and 1/2 is a natural number?
[Cale] ailndx: no
[Cale] ailndx: that's the point,  "n is in N" means "n is a natural number"
[ailndx] alright, im following then, just misinterpreted
[Cale] It's possible to have other kinds of numbers, that's why I said "if n is in N"
[Cale] Nichevo: You can show that for any element n of N, there is a larger element
[nawa] you need to basically show that every real number lies between two integers which i guess may need that property
[Cale] Nichevo: it's hard to show that there's not some really large real number which is larger than all the naturals.
[Cale] I really wish the topic *said* that it was for lectures, rather than "Don't ask to ask".
* Cale squints at Gauss and Giordano.
[Cale] :)
[Cale] Anyway...
[Cale] with that done, we've *really* taken apart the proof that the sequence (1, 1/2, 1/3, ...) converges.
[Cale] Note that there are of course sequences which don't converge to any number.
[Cale] For example, (0,1,2,3,...)
[Cale] or (0,1,0,1,0,1,...)
[Cale] all right
[Cale] We'd like some good criteria for finding sequences which are going to converge.
* Cale has changed the topic to: Welcome to #mathematics. This channel is for lectures, for questions, see #math.
       Current lecture: Foundations of Calculus.
[Nichevo] good
[Nichevo] consecutive terms which get smaller
[Nichevo] ?
[Cale] We'll say that a sequence {x_0,x_1,x_2,...} is increasing if x_(n+1) > x_n for all n
[Cale] and nondecreasing if x_(n+1) >= x_n for all n
[nawa] nichevo, {1-1, 1-1/2, 1-1/3, ...} each term gets larger but it still converges to 1
[Nichevo] ya
[Cale] We'll define decreasing and nonincreasing analogously.
[nawa] and be careful, something can be not decreasing and not non-decreasing :)
* Nichevo shivers
[Nichevo] increasing?
[Cale] not decreasing just means that there's some n for which x_n <= x_(n+1)
* Safrole ( has joined #mathematics
[Nichevo] yes
[Cale] So that doesn't really say too much about the sequence as a whole.
[Cale] So, why are these interesting? Here's a theorem
[Cale] If {x_0, x_1, x_2, ...} is nondecreasing and has an upper bound, then it converges.
[Nichevo] sounds powerful
[Cale] (a similar statement holds for nondecreasing sequences which are bounded below)
[Cale] nonincreasing*
[Cale] Okay
[Cale] The set S of numbers {x_0, x_1, x_2, ...} (the range of the function that is the sequence),
       is nonempty and bounded above, so it has a least upper bound, say a.
[Cale] We claim that {x_n} converges to a.
[Cale] (I'm going to write {x_n} as a shorthand for {x_0, x_1, ...} from now on, if that's okay :)
[Nichevo] sure
[Cale] Let e > 0.
[ailndx] "(the range of the function that is the sequence), is nonempty and bounded above" is it
         always like that, or just in this case?
[Cale] ailndx: Well, it's always nonempty, and in this case, we're assuming that it's bounded above
       as one of the conditions of the theorem.
[ailndx] that its bounded above
[ailndx] al right
[Cale] Since a is the least upper bound, there is some m for which a - x_m  < e.
[Cale] Why is this true?
[Cale] Well, if not, then for every m, we have a - x_m >= e
[Safrole] By the approximation property of the supremum
[Cale] So then a - e >= x_m for every m
[medfly] no spoilers! :)
[Nichevo] lol
[Cale] and a - e is a lesser upper bound
[Cale] but we're assuming that a is the least, so that'd be a contradiction
[Cale] Uh...
[Olathe] O-o
[Cale] okay
[Nichevo] gotcha
[Cale] So, we have that a - x_m < e for some m.
[Cale] Then, if n > m, we have that
[Cale] a_n >= a_m
[Cale] so a - a_n <= a - a_m < e
[Cale] er, blah
[Nichevo] why >= ?
[Cale] those should be x_n and x_m
[Cale] Because it's a nondecreasing sequence.
[medfly] a - x_n <= a - x_m < e
[Nichevo] right
[Cale] and so |x_n - a| < e
[Cale] for every n > m
[Cale] And so the sequence converges to a
[Cale] I'll leave the proof that if {x_n} is nonincreasing and bounded below, then it
       converges to its greatest lower bound as an exercise)
[Manyfold] trivially
[Cale] Theorem (Peak points lemma): Any sequence {x_n} contains a subsequence which is
       either nonincreasing or nondecreasing.
[Cale] I should really say what I mean by subsequence :)
[Cale] If {n_k} is an increasing sequence of natural numbers, and {x_n} is any sequence,
       then {x_(n_k)} is called a subsequence of {x_n}
[medfly] can we have an example of a subsequence?
[Cale] Sure.
[Cale] So (1,1/2,1/3,1/4,...,1/(n+1),...) is a sequence
[Cale] and (1,1/2,1/4,1/8,...,1/2^(n+1),...) is a subsequence of it
[Cale] It contains only elements of the original sequence, in the order that they occurred,
       but it skips some.
[Cale] Also, (1,1/3,1/5,1/7,....) is another subsequence.
[Cale] Or (1/2,1/4,1/6,...)
[Nichevo] could you also have an empty sequence be a subsequence of it?
[Cale] No, it has to be a sequence
[Nichevo] if that makes any snese at all
[dmhouse] Sequences have to be infinite in length.
[Cale] So it'll have an nth term for every n in N.
[dmhouse] (They're functions from the natural numbers, remember.)
[Nichevo] no I dont ^^
[Cale] Right, behind the scenes, it's still a function N -> R
[Cale] which means that for every n in N, there's exactly one x in R for which (n,x) is in the function.
[Cale] (which we're writing as x_n)
[Cale] Basically, subsequences still have to be sequences.
[ailndx] any reason why you aint using r instead of x?
[Cale] nope
[ailndx] k
[Cale] So this last theorem is pretty powerful, but it can still be tricky to decide whether some
       sequences are bounded above or not.
[Cale] For example, consider the sequence: (1, 1 + 1/2, 1 + 1/2 + 1/3, 1 + 1/2 + 1/3 + 1/4, ...)
[Cale] This is obviously increasing, but is it bounded?
[Cale] Anyway, that's a side point, we'll probably come back to it. :)
[Cale] The next little lemma is fairly important, and it's often called the peak points lemma.
[Manyfold] no9 it's not bounded
[Cale] If {x_n} is any sequence, then either it has a subsequence which is nonincreasing or it has a
        subsequence which is nondecreasing.
[Cale] Manyfold: thanks for giving it away :)
[Manyfold] :(
[Cale] That's fine :)
[Cale] People can still wonder about why it's not bounded :)
[Cale] So, for the purposes of this lemma, if k is a natural number, we'll call it a "peak point" of
      {x_n} if x_n < x_k for all n > k.
[Cale] That is, the sequence never has another element as large as x_k after it.
[Cale] Everyone okay with that definition?
[Cale] Need an example?
[Nichevo]   my head hurts :)
[Manyfold] Cale: could you give an example please?
[Cale] Okay
[Cale] So say we have the sequence (1,7,3,2,1,1/2,1/3,1/4,...) (that starts off with 1,7,3,2 and then
       becomes more regular)
[Cale] so x_1 = 7, and so 1 is a peak point, because everything after that is smaller than 7
[Cale] also x_2 = 3
[Cale] and everything after that is smaller than 3, so 2 is a peak point
[Cale] so is 3
[Manyfold] Cale is thwere an example in closed form like x_n = ?
[Cale] Well, I could have picked our good friend x_n = 1/(n+1)
[Cale] every point of that sequence is a peak point
[Cale] because everything after it is smaller
[Manyfold] so x_n=1/n is also and x_n=1/n^2
[Cale] well, x_n = 1/n isn't defined for n = 0
[sorear] (mutters) x_n = 1 / y_n  for all y monotonically increasing
[Cale] Let's take the sequence such that x_0 = 0 and x_n = 1/n for positive n.
[Cale] Then 0 is not a peak point
[Cale] because there are elements after x_0 which are larger than 0
[Manyfold] well i defined n ? N / {0}
[Manyfold] but did not say so :(
[Cale] There are two cases to this theorem.
[Cale] Remember that we want to show that either there's a nonincreasing sequence, or there's a
       nondecreasing sequence.
[Cale] Case 1: The sequence {x_n} has infinitely many peak points.
[Cale] That is, if n_1 < n_2 < ... are the peak points, then x_(n_1) > x_(n_2) > x_(n_3) > ...
[Manyfold] then it must be surely monotonic decreasing
[Cale] and that's a nonincreasing subsequence, so we're done.
[Cale] Case 2: The sequence {x_n} has only finitely many peak points.
[Cale] If that's the case, let n_1 be greater than all the peak points.
[Cale] Since n_1 is not a peak point, there is some n_2 > n_1 such that x_(n_2) >= x_(n_1)
[Cale] Since n_2 is not a peak point, there is some n_3 > n_2 such that x_(n_3) >= x_(n_2)
[Cale] and continuing that process, we obtain a nondecreasing subsequence.
[dmhouse] Cale: how do you know there's an element greater than all the peak points? If you take
          the sequence {1, 0, 0, 0, ... }, then only 1 is a peak point, but there are no elements
          greater than all the peak points.
[Cale] dmhouse: I assumed there were finitely many peak points for that case.
[nawa] because there's finitely many and you have an infinite sequence in case 2
[Cale] dmhouse: The peak points themselves are natural numbers
[Cale] By "larger than all the peak points", I mean "after all the peak points"
[dmhouse] Ah.
[nawa] if you have a finite amount of terms, one cant hide at the 'infinite part' of a sequence
[nawa] :)
[dmhouse] What a confusing way of doing things. Sorry. :) Go on.
[Cale] Okay, so now we have a rather nice corollary.
[Cale] If {x_n} is a bounded sequence, that is it has both an upper and lower bound, then it has
       a convergent subsequence.
[nawa] true, that is a nice corollary
[Cale] This is because it either has a nonincreasing subsequence and it's bounded below, so it
       converges, OR it has a nondecreasing subsequence and it's bounded above, in which case it converges.
[Cale] (that subsequence converges, rather)
[Cale] Okay...
[Cale] Suppose that a sequence {x_n} converges.
[Cale] Since all the terms are eventually very close to some number L, we'd expect them all to be very close
       to one another as well.
[Cale] To make this more precise, if the limit of the sequence {x_n} is L, then for any e > 0, there is some
       M for which |x_n - L| < e/2 for all n > M
[Cale] so if we have n > M and m > M
[Cale] |x_n - x_m| <= |x_n - L| + |L - x_m| < e/2 + e/2 = e
[Cale] Everyone follow that?
[nawa] it's hard for a single person to answer that
[Cale] I just showed that if {x_n} is a convergent sequence, then for any e > 0, there is some M such that
       if n > M and m > M, we have that |x_n - x_m| < e.
[Nichevo] I think my brain has said good night
[dmhouse] "|x_n - L| < e/2" means that if you drew a rectangle of width e around L (picture the number
          line here), x_n would be somewhere within that rectangle, for anyone who's having
          trouble picturing that.
[Cale] Yeah, it's important to read |x - y| as "the distance from x to y"
[Cale] So we have that if the sequence converges, then its terms get close together.
[Cale] The natural question is whether we can go the other way.
[Cale] A sequence {x_n} is called a Cauchy sequence if for every e > 0, there is a natural number M
       such that for all m > M and n > M, we have |x_n - x_m| < e.
[Cale] Theorem: A sequence converges if and only if it is a Cauchy sequence.
[castbot] <Crito@ef> I think this is the same approach that Protter/Morrey
          "A First Course in Real Analysis" use ;)
[castbot] <nawa@ef> i like it
[Cale] :)
[Cale] We've already shown that a sequence is a Cauchy sequence if it converges.
[Cale] To go the other way only requires one trick: we show that every Cauchy sequence {x_n} is bounded.
* nawa suspects using a convergent subsequence will come into play here
[nawa] woot.
[Cale] If we take e = 1 in the definition of Cauchy sequence, we get that there's some M such that
       whenever n > M, m > M, we have |x_n - x_m| < 1.
[Cale] In particular, this means that |x_n - x_(M+1)| < 1 for all n > M.
[Cale] Since there are only finitely many other points in the sequence, this shows that the
       whole sequence is bounded.
[Cale] Hence, we have that there's some subsequence of the Cauchy sequence which converges.
[Cale] We want to show that the Cauchy sequence itself converges to the same limit as
       that converging subsequence.
[Cale] So, let e > 0.
[Cale] We have that for any d > 0, there's some M for which |x_n - L| < d whenever n > M.
[Cale] er no
[Cale] We have that for any d > 0, there's some M for which |x_n - x_m| < d whenever
       n > M and m > M, rather.
[Cale] and we have that for any d' > 0, there's some M' for which |x_(n_k) - L| < d' whenever k > M'
[Cale] (that's the converging subsequence)
[Cale] So we'll take d = e/2 and d' = e/2
[Cale] and get M and M', and we'll take M* to be the larger of the two.
[Cale] Er, sorry.
[Cale] We want to ensure that n_k is large enough
[Cale] So we'll actually take the larger of M and n_(M') to be M*
[Cale] That will ensure that:
[Cale] If n and m are larger than M*, then n and m are both larger than M, so |x_n - x_m| < d = e/2
[Cale] and if n is larger than M*, we have that n is larger than n_M', so |x_n - L| < e/2
[nawa] um..
[Cale] er, blah
[Cale] not quite :)
[nawa] |x_(n_k) - L| < e/2 you mean?
[Cale] we have that any k such that n_k > n will have |x_(n_k) - L| < e/2
[Cale] but then, this n_k and n will both be larger than M*
[Cale] and so |x_(n_k) - x_n| < e/2
[Cale] right.
[nawa] yes that looks nice
[Cale] and hence, |x_n - L| <= |x_n - x_(n_k)| + |x_(n_k) - L| < e/2 + e/2 = e
[Cale] phew.
[Cale] So it converges.
[Cale] Little tricky getting all the indices right, but it works. :)
[Cale] So what do we have?
[nawa] proof of the theorem
[Cale] Convergent sequences have a nice easy definition, but to show that a sequence
       is convergent straight from the definition, you sort of need to know the limit already.
[Cale] Cauchy sequences don't have an L in their definition, but now if we know that if
       a sequence is Cauchy, we know that it actually does converge to something,
       even if we can't guess what that is.
[Cale] Who's still following along?
[nawa] lol is it just me? :(
[dmhouse] I am :)
[Nichevo] Im skimming
[Nichevo] fell out some while ago :(
[Cale] I've been chattering for 2 and a half hours now :)
[Nichevo] ^^
[nawa] i am finding this stuff all new and interesting
[nawa] esp that twin peak theorem or whatever it was
[nawa] twin peak lemma
[Cale] peak points lemma
[Cale] nothing twin about them :)
[nawa] thats it
<malik> following :)
[Nichevo] :)
[medfly] my sister wanted to computer for a bit so im trying to catch up
[medfly] ill never abandon you cale :)
[nawa] yeah i don't know where twin peaks came from.  must be the name of
       a mountain or something
[ailndx] im following, but also trying to catch up
[Nichevo] think so
[Cale] I really like this approach of starting off with sequences, because I think that
       it's a little easier to grasp the definition of a convergent sequence before trying
       to understand what it means for a function to converge at a point.
[Cale] Calculus is really all about functions f: R -> R though, even though we can really
       leverage sequences as an important tool quite often.
[Cale] So... with all that behind us, I hope the following definition will look not so scary:
[Cale] Let f: R -> R be a function on real numbers.
[Cale] The function f approaches the limit L near the point a, if for any e > 0, there is
       some d > 0 such that whenever 0 < |x - a| < d, we have that |f(x) - L| < e.
[Cale] That is, whenever x is within distance d of the point a, and not equal to it,
       we have that f(x) is within distance e of the limit L.
[Cale] So d plays the role that M played for sequences, and 0 < |x - a| < d plays
       the role that n > M played.
[Cale] This intuitively means that if we want f to send us somewhere close to L, we just
       have to get close enough (but not equal to) a.
[Cale] Makes sense?
[nawa] it seems like you could describe that with sequences.  find all sequences in the
       domain\{a} that converge to a and if all sequences have f(sequence) all converge
       to the same number, then youre good to go.  this seems like a bad definition though :)
[Cale] That's actually quite a fine definition.
[nawa] bad as in hard to work with
[Cale] It turns out to be handy sometimes.
[Cale] Especially when showing that things are discontinuous.
[Cale] But I haven't defined continuous yet :)
[Cale] Also when showing that things don't have a limit.
[Cale] You just have to find some sequence then which converges to a (without being equal to it),
       and such that f applied to the elements of the sequence gives a sequence which doesn't converge.
[Cale] but before we get into that sort of thing, let's do some things with just limits
[Cale] First of all:
[Cale] A function cannot approach two different limits at a.
[Cale] That is, if f approaches L near a and if f approaches M near a, then L = M.
[Cale] Since f approaches L near a, we have that for any e > 0, there is some number d_1 > 0
       such that for all x, if 0 < |x - a| < d_1, we have |f(x) - L| < e
[Cale] Also, since f approaches M near a, we have that for any e > 0, there is some number d_2 > 0
       such that for all x, if 0 < |x - a| < d_2, we have |f(x) - M| < e
[Cale] We want both of those to work, so let d be the smaller of d_1 and d_2.
[Manyfold] ?
[Cale] So that if 0 < |x - a| < d, then |f(x) - L| < e and |f(x) - M| < e
[Cale] We're going to tackle this as a proof by contradiction, so assume that L and M are not equal.
[Cale] We want to choose an e which will cause the statement that the distances from f(x) to L and
       from f(x) to M is less than e will be contradictory.
[Cale] We'll take e to be |L - M|/2
[Cale] that is, half the distance between L and M
[Cale] (note that since we're assuming L is not equal to M, this is nonzero, as required)
[Cale] So it follows that there's some d > 0 for which if 0 < |x - a| < d, we have both:
       |f(x) - L| < |L-M|/2 and |f(x) - M| < |L-M|/2
[Cale] This implies that for 0 < |x - a| < d, we have that
       |L - M| <= |L - f(x)| + |f(x) - M| < |L - M|/2 + |L - M|/2 = |L - M|
[Cale] Hence, |L - M| < |L - M|, obviously nonsense.
[Cale] So L and M must be equal.
[nawa] that seemed like a lot of work
[Cale] Well, you could probably be a little more terse about it.
[Cale] It should show how the definition is used fairly well that way though.
[Cale] So now we have that if the limit exists at all, it's unique.
[Cale] We'll define the notation "limit as x -> a of f(x)" to mean the number which f approaches near a.
[Cale] (Supposing that it exists)
[Cale] This introduces a completely irrelevant letter x, but it turns out to be convenient for working
       with functions that are defined by what they do for a given x.
[Cale] We can write things like:  "limit as x -> 3 of x^2 + 1"
[Cale] Let's see, where should I go from here? :)
[Cale] We could prove things like that
       (limit as x -> a of f(x) + g(x)) = (limit as x -> a of f(x)) + (limit as x -> a of g(x))
[Cale] and similarly with multiplication in place of addition
[Cale] This is, of course, assuming that all three numbers exist.
[Cale] Or, we could do some examples of limits
[ailndx] Cale: is this related, used with derivaties/integrals?
[nawa] any non-trivial theorems?
[nawa] or interesting facts about limits
[Cale] Oh, there's the squeeze theorem.
[nawa] that you know that one might not come upon in 'normal' circumstances
[Cale] Suppose that f,g,h are functions, and that f(x) <= g(x) <= h(x) for all x. Then if the limit
       as x -> a of h(x) - f(x) = 0, we have that the limit as x -> a of g(x) exists.
[Cale] (and is equal to the limit as x -> a of f(x) and the limit as x -> a of h(x))
[nawa] and so both those limits exist if the difference limit exists?
* nawa wonders about that.  it seems like it could be true, but it also seems like it might not be true
[Cale] er, sorry, I suppose that one of them has to exist too.
[nawa] ok
[nawa] actually yeah
[nawa] f(x) = h(x) = 1/x with a = 0 would be a counterexample to what i was asking about
[Cale] This is what you can use to sort out things like the limit as x -> 0 of f(x), where
       f(x) = x^2 when x is rational, and f(x) = -x^2 when x is irrational
[Cale] ailndx: sorry about that... yes, in fact it does.
[ailndx] would be interesting to hear more about that
[Cale] ailndx: The derivative is defined as a particular limit, and there are definitions of
       the integral which use limits, though the one I like best uses another sort of limiting process
       (involving that least upper bound property)
[Cale] One important thing to note about limits
[Cale] It can be that the limit as x -> a of f(x) is *not* equal to f(a)
[Cale] For example, consider the function f such that f(0) = 1, and f(x) = 0 if x is not 0
[Cale] the limit as x -> 0 of f(x) is in fact 0
[Cale] even though f(0) = 1
[Cale] If it happens that the limit as x -> a of f(x) = f(a), we say that f is continuous at a.
[Cale] If f is continuous at a for all points a, we say that f is continuous.
[Cale] Lots of the functions which show up in physics, and which are easy to define with
       expressions are continuous.
[Cale] But discontinuous functions are not hard to find.
[Cale] In fact, it's quite possible to have functions which are discontinuous everywhere.
[Cale] For example, the function f such that f(x) = 1 if x is rational, and f(x) = 0 if x is irrational.
[Cale] You can check that none of the limits as x -> a even exist.
[Cale] Calculus is really about building up a sense of the ways in which functions can fail to be "nice".
[Cale] Not being continuous is the first one of those.
[Cale] Anyway, I'm starting to get a bit rambly.
[Cale] Perhaps we'll stop here?
[nawa] thanks cale
[Cale] You're quite welcome.
[medfly] :)
[Nichevo] cheers :)
[Cale] There are two ways you can go from the material I just presented.
[Cale] You can decide to go downward, and construct the real numbers. Look up "Dedekind cuts"
       for one way to do that.
[Cale] You can also build upward, and prove the properties of limits, continuous functions,
       and eventually the derivative and differentiable functions.
[ailndx] Cale: is it hard to prove the "h-defintion" of derivatives?
[Cale] That it's equivalent to the x -> a definition?
[Cale] not so hard.
[ailndx] f'(a) = lim_h->0 (f(a+h)-f(a))/h
[TRWBW] if you show composition of continuous function is continuous, then
        you can do the substitution x=a+h
[TRWBW] well don't *need* that, but you could use that
[nawa] i suddenly feel like taking a course on measure theory
[ailndx] ok
[ailndx] thx Cale