A computable worksheet explaining
A computable worksheet on continuity
Barrie Cooper
In this worksheet, we will try to understand the , definition of continuity at a point .
Definition A function is continuous if .
A definition in mathematics is a qualification - we can only call the function continuous if it passes the test specified in the definition. In this case, the test has a mixture of quantifiers and it can sometimes be tricky to understand how these relate to what needs to be proved to show that the test is passed or failed.
I like to think of and as defining the rules and moves of a game that you want to win. The (for all) quantifier represents your opponent's move - you don't get any say in this, except you are told the name of the object that your opponent picks. The (there exists) quantifier represents your move - you must expressly indicate your choice, which might depend on the previous moves in the game, but cannot depend on future moves as they haven't happened yet. The final part represents the condition that must be satisfied for you to win the game, in this case, if is within of , then must be within of - you win the game if you can show this condition holds based on the previous moves in the game.
That might sound a little abstract, but let's look at a specific example. Suppose that I want to prove that the function defined by is continuous. Then according to the definition, I must prove that I'm going to take you through the thought process and then write down the clean mathematical proof afterwards. Let's think about this as a game. My opponent starts by picking the point on which we need to focus our efforts. It might be or , we don't get to know anything other than it is a real number called . It is then my opponent's turn again! My opponent gives me a tolerance which tells me how close ultimately the value has to be to (we will get to the later). As with , I don't know if is something huge like 1000 or something tiny like - I just know that it is a postive real number called . Whatever it is, I need to find a strategy that will win the game. The next move in the game is mine: I need to choose a . To work out what that needs to be, I need to study the next part of the game - I must anticipate my opponent's every possible move and make sure that no matter what he does next, I still win.
After I choose (and I haven't done so yet, I'm just looking ahead to see what the rules for the next part of the game are), then my opponent gives me a real number . Note that whatever I choose can depend on the and the I am given (because my opponent made those moves before I have to pick ), but it cannot depend on the I am given later (because I must pick before my opponent picks ) - it is in that sense that I need to choose a that caters for any possible move by my opponent when they pick .
I'm still reading the rules of the game at this point: I need to know the final condition that needs to be satisfied for me to win, once my opponent has chosen and and then I've chosen and then my opponent has chosen . Well, the final condition is that if then , which I read as if is within of , then must be within of . I control , which means I get to control how close must be to ; I need to use this to control how close is to , and in particular I must make sure that it is within the tolerance I was given by my opponent. This is where we now need to do some calculation: Note that whenever , then I have just derived the inequality Provided, I choose so that , then I win the game. I could now do some algebra to work out what would do, but don't forget that I get to choose , so I can put other constraints on to make my life easier. In particular, I am going to decide that . I can simplify my bound even further now: So, in fact, provided I choose so that and , then I win the game. Well that's easy ... I'm going to insist that . Note that my choice of does depend on and - which is ok because they are moves my opponent makes before I have to choose - but it is important that my choice of does not depend on - which is a move my opponent makes after I have chosen .
Finally, the infuriating thing about mathematics is that mathematicians would not write that as a proof - to a professional mathematician it is just too long and unnecessary an explanation and doesn't cut to the heart of the matter. With direct proofs like this, the statement we are trying to prove tells us the structure of the proof as follows: whenever you see the quantifier , you write Let ... in the proof; whenever you see the quantifier , you write Choose ... in the proof; and then you show the final condition must hold.
Our statement we need to prove is so the template for our proof must be as follows:
"Let . Let . Choose . Let . Now, if we have ."
We could have written out that template before we did any calculations, in fact, because so far we've not included any of that stuff. All that remains is for us to fill in the blanks ...
Proposition The function defined by is continuous.
Proof
Let . Let . Choose . Let . Now, if we have
Note that we had to do lots of thinking and calculations on a bit of scrap paper before we could write down that proof, but that concise two-line proof is the generally accepted way in which mathematics is written (and it is beautiful!).
A coded example
To help get your head round what is happening in these proofs, I've coded up a simple example using SageMath below. All the elements of the code can be changed, so feel free to fiddle with it to your heart's content! Note that if you are playing the game properly, then your choice of should be written in terms of the variables and , rather than being hard-coded as a number. Experiment with different functions and remember that you are looking to write as a function of and in such a way that if is within of , then is within of . If you understand that, then you understand proofs of continuity!