Thursday, October 2, 2008

Epsilons, Deltas and Limits... Oh My!

Yes, Toto, writing proofs of limits can be as scary as the wicked witch from the east! But do not fear, with the right direction, we can squash those problems with ease.

The first step is to realize that we are proving a limit based on its definition. Suppose we need to prove the statement written in its general form:
limx → a f(x) = L
Notice that this really is saying that when x is a value close to a, the value of f(x) is close to L. The mathematical statement of this says:
"For any ε > 0, there exists a value δ > 0 so that if 0 < |x-a| < δ then |f(x)-a| < ε."

Now just because the Scarecrow is flapping in the breeze, we don't need to be afraid of this complicated looking formula. Our task is to be able to find a formula for δ in terms of ε so that once you know that the value of x is within δ of the value a (δ says how close), then the value f(x) is within ε of the value L.

To reach that fabled wizard of mathematics called a proof, we just need to follow the yellow brick road outlined below. The proof will always take a form involving four steps corresponding to the four parts of the definition:

1. For any ε > 0: We need to create a proof that works for any ε > 0. So that we have a value to work with, we start with any ε with the requirement ε > 0. So the first statement of the proof is something like, "Given ε > 0" or "Suppose ε > 0" or "Let ε > 0."

2. ... there exists δ > 0 such that: The second step is that we need to provide a recipe for how to provide δ > 0 that will make the rest of the statement true. Unfortunately, by the time we reach this step of the proof, we don't yet know what the right recipe is. Personally, I just write, "Let δ=____" and leave enough space to fill in later.

3. ... if 0 < |x-a| < δ ...: We are starting to prove an implication (if...then... statement). We are successful if we can show the conclusion is true whenever the hypothesis is true. So, to accomplish this, we assume that the hypothesis is true and see what happens. I write, "Assume 0 < |x-a| < δ."

4. ... then |f(x)-L| < ε: This is the conclusion of the implication. And this is also the hardest part of the proof. In the middle of completing the work in this proof, we will discover the recipe needed for δ. At that time, we can go back and fill in the missing pieces.

So the 4th step is the hard one. Don't be cowardly like the lion and give up; there is a method to this as well. For the polynomials that we work with, the value of |f(x)-L| will always factor into something of the form:
|f(x)-L| = |x-a| |"stuff"|
We know from step 3 that |x-a|< δ. We want |"stuff"| to be less or equal to a number, which for convenience in discussion we'll call k. Once we find that number k, then we know:
|f(x)-L| < δ k
So part of our recipe will be to make sure that δ≤ε/k. If the recipe requires no other parts, we can even just use δ=ε/k. With this knowledge, we will have found:
|f(x)-L| < δ k ≤ (ε/k)k = ε

All would be well, except that the wicked professor of the west hasn't yet told you how to find k. Let's step back a moment to the |"stuff"| factor. If you don't, I'll send my winged monkeys to bring you back :-). When we're lucky (and f(x)=mx+b), the factor is already a number. But for any other problem, there will be a formula that still involves x. In these cases, without knowing more about x, we won't know how big the extra "stuff" can become. In order to keep a handle on this "stuff" we are going to require for our recipe that δ itself never gets too large. For the simplest cases, we can require δ ≤ 1. And this means that we can take advantage of knowing that x will be between a-1 and a+1.

In a general problem, we could find the largest value for |"stuff"| using values of x between a-1 and a+1. This might take a bit of work. But for f(x) that is quadratic, "stuff" is going to be another linear looking term. We want that "stuff" to involve x-a, so use x = (x-a) + a.

For example, when a=2, the term x+1 can be rewritten x+1 = (x-2)+2+1 = (x-2)+3. The awesome Triangle Inequality then tells us:
|x+1| = |(x-2)+3| ≤ |x-2| + 3
But we know that |x-2|<δ and we required δ ≤ 1 for our recipe. So |x+1|< 4.

For another example, suppose that f(x)=x2-x, a=3, and L=6. We assume 0<|x-3|<δ and rewrite
|f(x)-L| = |x2-x-6| = |x-3||x+2|
We know |x-3|<δ and we need to find a number k so that |x+2|≤k. Since x is in "stuff", we require δ ≤ 1 and use the triangle inequality:
|x+2| = |(x-3)+3+2| ≤ |(x-3)|+5 < δ+5 ≤6
So |x+2| < 6 (This is our value k=6). Thus we also want to use δ = ε/6 in our recipe. Both requirements are taken care of by the formula δ = min(1, ε/6). So now we know
|x2-x-6| = |x+2||x-3| < 6 δ ≤ 6(ε/6) = ε

We have arrived at the emerald city of our desire and proved the limit statement
limx → 3 x2-x = 6.

But the proof needs to be in the right order:
Given ε>0.
Let δ = min(1, ε/6).
Assume 0 < |x-3| < δ. |x2-x - 6| = |x-3||x+2|
|x+2| = |x-3 + 5|
|x+2| ≤ |x-3| + 5
|x+2| < δ + 5 and δ ≤ 1 so |x+2| < 6
|x2-x-6| = |x-3||x+2| < 6δ and δ ≤ ε/6
So |x2-x-6| < ε
Thus, for all ε>0, there exists δ>0 so that if 0 < |x-3| < δ, then |(x2-x)-6| < ε.
Therefore, limx → 3 x2-x = 6

Monday, September 15, 2008

Proofs and Even/Odd Functions

Here is the second part of my chat discussion. I have edited this some, but I hope the essence of the questions and answers.

[Student]: ok, so im still iffy on how to structure proofs, ill know the assumption (obviosly) and the conclusion, but I'm unsure how to structure the premises and justify them
[Professor]: Well, basic ideas include starting the proof with your assumptions.
These are the basic statements you know are true.
[Student]: right

[Professor]: The very last line of the proof should match the conclusion. (and it shouldn't appear earlier) The hard part is what comes in between :-)
[Professor]: But seriously, usually, you take a look at your conclusion and see what type of statement it requires.

[Professor]: If it is an equation that is needed, then you can usually start with one side of the equation and then see what you can put on the other side that you know must be true. (Usually using a definition or algebra)

[Professor]: Then you see how you can use your assumptions to create a statement that leads to your conclusion.

After turning to an actual problem, we started to get into more specifics. The problem was stated as: Suppose that f1 and f2 are odd functions. Prove that f1*f2 is an even function.


[Professor]: What is given knowledge?
[Student]: f1 and f2 are both odd and g1 and g2 are even
[Professor]: What is desired? (conclusion)
[Student]: f1 * f2 is even
[Professor]: What does it mean that f1 is odd?
[Student]: that f(-x) = -f(x)
[Professor]: Make the f into f1, and correct.
[Student]: ah ok ya
[Professor]: So in the actual proof, one line would be...
f1 is an odd function
[Professor]: The next line would interpret...
f1(-x) = -f1(x) for all x in domain of f1
[Professor]: Repeat these two lines for f2.
[Professor]: So far, we have simply restated facts based on the assumptions and our knowledge of odd functions.
[Student]: and that is all stuff that is under the given part? rite
[Professor]: In the proof, it doesn't belong to a "given" part per se, but the reason on the right hand side (if in tabular form) would be that the statement was "Given"
[Professor]: So our proof now has 4 statements.

[Professor]: Now, (scratch work) look at what you need to show: f1*f2 is even. What does that mean?
[Student]: ok ya i have no idea, i feel like it would involve one of the multiplicative properties involving f1 and f2 but i dont really know where to start
[Professor]: What does it mean if I said that G is an even function? g(x) = g(-x) My name was G, so it would be G(x)=G(-x).
[Professor]: But the name could be Brian: Brian(-x)=Brian(x). Voila! I [Brian] am even.
[Professor]: f1*f2 is the name of a function. And for f1*f2 to be even, you need: f1*f2(-x) = f1*f2(x)
[Professor]: It just happens that the name looks like a formula.
[Student]: theres noit a step in between there?
[Student]: to justify how multiplying the functions is ok
[Professor]: Well, there are still steps. But we need to know what we are aiming for.
[Student]: ah
[Professor]: You know what f1 and f2 are. They are odd functions. But exactly what is this new function that we call f1*f2?
[Student]: idk f1(x) * f2(x)
[Professor]: Exactly!
[Student]: or f1(-x)
[Professor]: No
[Student]: * f2(-x)
[Student]: no ok
[Professor]: So we know f1*f2(x) = f1(x)*f2(x)
[Student]: yep
[Professor]: And it looks like you were in the middle of the thought: f1*f2(-x) = f1(-x)*f2(-x)
[Student]: ya
[Professor]: Okay, things are starting to come together.
[Student]: sort of
[Professor]: We want to show f1*f2(-x)=f1*f2(x)
[Student]: substitution?
[Professor]: Yep. Back to the proof. We need to use substitution to get our final result. But we do it one step at a time.

[Professor]: I'll type the left hand side, you type the right hand side.
[Professor]: f1*f2(-x) = ?
[Student]: f1(-x) * f2(-x)
[Professor]: Good. But f1(-x) = ? and f2(-x) = ?
[Student]: f1(x) * f2(x)
[Student]: oh
[Professor]: And finally, f1(x)*f2(x) = ?
[Student]: f1*f2(x)
[Professor]: Precisely. Putting those together, we now know f1*f2(-x) = f1*f2(x).
[Professor]: And that means ...
[Professor]: f1 * f2 is even
[Professor]: Q.E.D. :-)
[Student]: sooo i guess i then assemble all of those steps or just some of them
[Professor]: You can leave out the parts that I said belonged as scratch work.
[Professor]: There were four lines associated with the given information. Then I said "back to the proof" and there were probably four more lines. That is the proof.
[Student]: ic ok
[Student]: ugh, this is def not my fav stuff, i cant believe i haven't learned this before

In summary, here is our proof:
f1 is an odd function
f1(-x) = -f1(x) for x in domain
f2 is an odd function
f2(-x) = -f2(x) for x in domain
f1*f2(-x) = f1(-x) * f2(-x)
= (-f1(x))*(-f2(x))
= f1(x)*f2(x)
= f1*f2(x)
So f1*f2(-x) = f1*f2(x) for x in domain
f1*f2 is an even function

Now, back to the discussion. Another problem dealt with composition. That is, students were to prove: If f1 is an odd function and g1 is an even function, then g1•f1 is an even function. Here is where part of that discussion went.


[Student]: so how do the g1(f1(x)) differ, i guess proving that f1(x) is odd, and then proving then that g1(x) is odd because of f1(x)?
[Professor]: One key point is that the definition of odd or even --- f(-x) = -f(x) and g(-x)=g(x) --- is that the x is simply a place-holder and the same statement would be true regardless of what is in the place of the x.
[Professor]: So for example f(-(x+2)) = -f(x+2), where the "x" was actually the formula x+2.
[Student]: right
[Professor]: Now, be more specific on your question related to composition.
[Student]: so once i prove that f1 is even then it would be the same justification for g1
[Professor]: Careful! f1 is odd (from the given information), so you can't prove it is even.
[Student]: well, opposite justification
[Student]: I'm still not sure of the question.
[Professor]: g1 alone is known to be even. There is nothing to prove about that.
[Student]: ok
[Student]: timeout, so all id have to do is justify g1 as being even regardless of f1?
[Professor]: Why? What are your steps?
[Professor]: And what are you trying to prove?
[Student]: so its given that g1 is even and f1 is odd and we're trying to prove that g1(f1(x)) is even
[Professor]: Technically, g1•f1 is even.
[Professor]: g1(f1(x)) is a value, not a function.
[Professor]: So you need to show g1•f1(-x) = g1•f1(x).
[Student]: wait im confused
[Student]: ok
[Student]: i get it
[Student]: couldnt you just subsitute -x for f1(-x)
[Professor]: No for what you said. f1(-x) and -x are different, so they don't substitute.
[Professor]: But I don't think that is what you were thinking. Try to restate.
[Student]: you could justify g1(f1(x)) = g1(f1(x)) with g(x)=g(-x)
[Student]: -f1(x)*
[Professor]: I think you're on the right track. But be careful that you go step by step.
[Professor]: What are all the steps?
[Professor]: I'll start it off... g1•f1(-x) = ?
[Student]: thats where im confused, do you need a a step for that?
[Professor]: Yes. You must relate the function (g1•f1) to the rest of the formulas.
[Student]: g1(f1(-x))= g1(f1(x) )
[Professor]: What justifies that? The -x belongs to f1, not g1
[Student]: g1(-f1(x)) def of odd fcn
[Professor]: So don't skip that step
[Student]: so whats after that then?
[Professor]: Well, why don't you summarize the statements so far. Start again with: g1•f1(-x) = ...
[Student]: g1(f1(-x)) = g1(-f1(x)) b/c of the def of odd fcns
[Professor]: Very good. Now, what does g1 do when you have g1(-[anything])?
[Student]: g1(-x)=-g1(x) ? but that would make it odd
[Professor]: So use the fact that g1 is even. g1(-x)=?
[Student]: g1(x)
[Professor]: So g1(-U) = g1(U) or g1(-f1(x)) = g1(f1(x))
[Student]: k
[Professor]: It doesn't matter what appears.
[Professor]: g1(-[stuff]) = g1([stuff])
[Professor]: So you left off at: g1 o f1(-x) = g1(f1(-x)) = g1(-f1(x)) = ... (finish it off)
[Student]: g1(-f1(x))=g1(f1(x))
[Professor]: And how does that relate to g1•f1?
[Student]: g1(f1(x)) = even
[Professor]: not equal even. g1(f1(x)) = g1• f1(x).
[Professor]: Recall, you are working with the function g1•f1. You need to show g1•f1(-x) = g1•f1(x).
[Student]: i just got a little confused
[Student]: whats the diff between g1(f1(x)) = g1•f1(x)
[Student]: ah i c nev mind
[Professor]: same value but only g•f can be called the name of the function
[Student]: ok
[Student]: so g1•f1(x) = g1•f1(-x)
[Professor]: That would be the final line to show that g1•f1 is an even function.
[Student]: ok that makes sense

And that leads us to our second proof:
f1 is an odd function
f1(-x) = -f1(x) for x in domain
g1 is an even function
g1(-x) = g1(x) for x in domain
g1•f1(-x) = g1(f1(-x))
= g1(-f1(x))
= g1(f1(x)
= g1•f1(x)
So g1•f1(-x) = g1•f1(x) for x in domain
g1•f1 is an even function

Do you know how to do the justifications of each line now?

Domain and Codomain

I had a nice chat this afternoon with one of my students. The first topic had to do with the notation f : D→S. Here is what we said:

hi prof walton, i have a quick question
Shoot (but don't hurt me.)
haha, ok so i am under the impression that when functions
say f: x → x that means that the domain and the codomain
are the same but the ranges can be different correct?

The codomain (after arrow) lists the type of numbers
that might be values in the output, while the domain
(before arrow) lists all of the numbers that are in the
list of potential inputs. The range is the list of numbers
that actually are outputs. Is this the question?

yep, so the range is a sub"field" of the codomain rite
it lists all possibles while the range is what numbers
are in the function ?

subset instead of sub"field". Otherwise, yes.
haha ya i was lookin for that word
The cheapest answer for codomain would be simply R
(all real numbers). If the codomain is listed as something
more specific, that helps us understand the function better,
but we still might skip some of the numbers in the set.
ic, so when im looking at f and g that have the same
codomain, that then would not imply that f(g) = g(f)
because the ranges could be different?
or is
f(g) being = to g(f) relational to the domain only
Equality of functions requires that they have the same
domain and the same values at every point in that
domain.
If the domain is different, then the functions
must not be equal.
If the functions have different
values for any point, then the functions are not equal.

so d → s just means that the domain could produce
these outputs right?

That's right. The outputs must be somewhere in the
list known as S.
And the inputs only make sense if they
are in D.

but s just means possible outputs because its the codomain rite
Yes, because it is the codomain (after arrow)
rite rite rite, gotcha, this stuff is weird

Monday, September 8, 2008

Fun with Functions

Cryptography is an interesting application of functions. A cipher allows you to take text (for example) and encrypt it into a new form of information that can then be transmitted. Most children learn a particularly simple cipher that is called a substitution cipher. Such a cipher does a direct translation of letter for letter. Below is a simple example, motivated by the "stage-appearance" of the letters in the phrase "The quick brown fox jumps over the lazy dog."



Other simple ciphers include shifting the alphabet a fixed number of letters or reversing the alphabet.

If we think of encrypting a message as being a function from character sequences to new character sequences, then we might imagine applying two different encryptions one after the other. This is function composition. Or we might want to decrypt a message. This is applying the inverse function. In particular, note that for an encryption method to be useful, the inverse must exist. That is, the function must be one-to-one.

Here is a message that I constructed using the QUICKBROWN cipher (above) followed by a shift cipher where an A becomes an R. Have fun!

JLWH EL MBSJ KJ LPMGK VGLHSM ZOG DCSX TGKHL.

Wednesday, August 27, 2008

Absolute Value Inequalities

Well, perhaps I muddied the water for some of you. Sorry about that. In terms of skills, when you solve |u|<a where u is any expression and a is another expression [I thought it was for constants, but it turns out to always work], you can solve by finding the intersection (and) of the solutions to u<a and to -u<a, which we write u<a and -u<a. When you solve |u|>a, you find the union (or) of the solutions to u>a and to -u>a, which we write u>a or -u>a.

My explanation in the supplemental handout was to motivate why this works. After all, the course is not just about skills, but it is also about justification. The absolute value is a piecewise-defined function. That is, there are different rules depending on the value of the expression being worked with. The skill-based method that works for absolute value does not work for other piecewise-defined functions. But thinking about each of the "pieces" separately and joining them properly will always work.

Since the handout was a first edition, I'm curious where you found the biggest issues.

Monday, August 25, 2008

Solving Equations Graphically

So, in class today, some of you may have been wondering about the computer program that I was using. This utility is called Grapher and it is installed in any recent Mac OS computer. You'll find it in the Utilities folder within Applications.

I was wondering then whether there is a similar resource available for Windows computers as well. Doing a Google search on "Graphing Calculator" I found the following possibility: GraphCalc. I don't have immediate access to check this out, so I'd certainly welcome some comments here as to how well it works.

Now that you have something to work with (and a calculator will work as well, just a little slower), here is something interesting to notice. To solve ax=sin(x), we need to plot y=ax and y=sin(x). You also need to choose a value of a. In Grapher, you would add a New Equation (Cmd-Opt-N) like a=0.25. You now need to find where these graphs intersect.

In class, we learned that we can create new equations that have the same solutions by performing the same operation to both sides (other than division, where we worry about division by zero). So we could get a new equation like a=sin(x)/x. Now we plot y=a and y=sin(x)/x. If you add these as two new graphs instead of getting rid of the old plots, you can compare the two equations graphically. Here is the plot:
I used different colors to distinguish which intersections I was looking for.

For the original equation (ax=sin(x), shown in red), we see there are three intersections. For the new equation (a=sin(x)/x, shown in green), we only have two intersections. But those two intersections agree exactly with the original (see the highlighted intersection at the same value of x marked by circles), and the third corresponds to x=0 which disappeared because we divided both sides by x.

Calculus I -- Welcome Fall 2008

Welcome to JMU and your first semester of calculus. I'm excited this semester to be teaching calculus again. I hope that you're excited as well.

So, while I was preparing for class, I came across MIT's open courseware program. This is a pretty amazing collection of knowledge that is freely accessible. Feel free to browse it. In particular, I found a text written by Gilbert Strang that will be an outstanding parallel reference for our course this year. I'm especially impressed with how he makes the text conversational in style rather than the more typical dry style of math textbooks.

We'll be pushing through the first chapter of our official textbook very quickly as it should be a review of mathematics that you have already taken.

See you in class!