How to motivate and present epsilon-delta proofs to undergraduates? This would seem to be a common question, but I am surprised not to see it already asked and answered on MO!
I am teaching an undergraduate course, and I want to teach them to construct basic epsilon-delta proofs, say, of $\lim_{x \rightarrow 3} x^2 = 9$ and $\lim_{x \rightarrow 4} x^2 \neq 17$. (Elementary, continuous functions only.) This is a serious stumbling block for many students, with good reason, and I anticipate it will be for mine as well.
Do other MO'ers have suggestions (beyond what I can find in typical calculus books) for presenting epsilon-delta for the first time? Any success stories to share?
Thank you very much! --Frank
(Background: I am teaching a discrete math course to American undergraduates who have already had a year of calculus. Whether $\epsilon-\delta$ is on topic for discrete math is perhaps questionable, but we did material on making sense of statements with lots of quantifiers, and also an introduction to techniques of proof, and so the material seemed like a natural fit. I should also mention that I intend to test the students on this material and not just expose them to it.)
 A: I'm inclined to talk about images like shooting an arrow at a target and such, but I'm sure you've heard these. The trouble is that it is very difficult to communicate why we'd want to move from the intuitive notion of limit to the modern one. Most of the arguments we'd give simply aren't convincing for students.
This will not be a popular answer, but one way around the above difficulty is to take a formalist approach and give the students a more or less mechanical way to deal with the multiple quantifiers. While doing this, students get a sense of the proper use of quantifiers and get an idea of how to "do" the proofs. After they gain some ability, they seem more willing to see how it affords clarity. My students have responded well to the treatment of basic proof found in Chapter 3 of Daniel J. Velleman's book How to Prove It: a structured approach.
Remember, in the question, the OP asked for ways to teach students to construct basic epsilon-delta proofs.
Here's an example: Prove that $lim_{x \rightarrow 0}2=2$. The students write two columns on their page a "givens" column and a "goal" column. In the goal column write the definition of the limit in question symbolically. Then show them that when they see a universal quantifier in the goal column, they can move it to the givens column as "Let $\epsilon$>0 be arbitrary." (This temporarily gets around student misunderstanding of the use of the word 'arbitrary'.) Next, they must manufacture a delta. Here you show them where the "real mathematics" takes place: do what is needed to manufacture your delta. Start with what you are trying to estimate, and work backwards. In our example we see that any positive delta will do. The important thing is that after doing your "scratchwork", you go back and write Let $\delta$ equal 3, (or whatever you picked) in the givens column, (you may explain to them the reason this is logical, or talk about it later). The point is, they have seen you discover the delta and that the proof is written in "reverse order". One can then remove the existential quantifier from the goal column. The goal is now simply to run your scratchwork in reverse until you end up with something formally identical to what appears in the goal column.
The idea is, if students can actually construct such a few proofs like this, maybe you will have a chance to discuss what happened. If it seems too miraculous or divorced from common sense, they simply won't listen.
After some experience has been gained (I do this looking at sequence limits instead of epsilon-delta) it is nice to give some informal yet precise descriptions of what a limit is. For example, a sequence $a_{n}$ of real numbers converges to a real number $L$ when for any $\epsilon>0$ all but finitely many terms of the sequence lie within $\epsilon$ of $L$. After they know how to construct proofs, trying to get students to conceptualize seems to work better.
Best of luck with this, Frank! 
A: Creating a $\epsilon-\delta$ game is really interesting. Thanks Charles Matthews! BTW, a similar strategy has been stated by Prof.Terry Tao in:Thinking and Explaining, https://mathoverflow.net/questions/38882 (version: 2011-10-12)
One other issue that usually undergrads feel elusive about in $\epsilon-\delta$ method is why is it "for every $\epsilon>0$ there exists a corresponding $\delta>0$" and not the other way round. In this context, the following simple analogy may illustrate the point: 
Assuming the discrete maths course is offered to CS students, I will consider software development analogy. In software development, there are essentially two parties. One Developer($\delta$ producer) and the other Client/User($\epsilon$ giver). 
We can ask the students which of the below models is preferred: 
Model 1: Client gives a specification and developer abides by it. That is, client demands for certain feature in her product and developer accordingly makes the product. Analogously, fix $\epsilon>0$ in the range adjust $\delta$ in the domain.
Model 2: Developer gives certain product and client should accept it however pathetic it may be. Analogously, fix $\delta>0$ and expect $\epsilon>0$ to be satisfied.
Model 1 is naturally preferred. And that is our $\epsilon-\delta$ method.
Of course, we can change the setting depending on the target students(engineers/physicists/biologists etc. ). 
A: Basic $\epsilon$-$\delta$ thinking is easy to motivate by using the concepts of input control and output error tolerance.  If $f(a)=c$, how accurately do you need to control the input (by specifying $\delta$ and requiring $|x-a|<\delta$) to guarantee you meet a given tolerance for output error ($|f(x)-c|<\epsilon$)?
Week 2 of freshman calculus is not too soon to insist US students learn to answer questions about this topic for simple examples. It's clearly a relevant skill for eventually addressing questions like ``How accurately do you need to aim a spacecraft to safely enter orbit around Mars?'' (Recall, failing to do that once cost NASA around a half-billion dollars.)
Or, for designing safety margins in engineering as Vectornaut suggests. 
The significance and usefulness of fundamental calculus concepts is often underappreciated not only by beginning students.  A graduate engineering student once explained to me his recent realization that the ``sensitivity coefficients'' used everywhere in his engineering courses were nothing but derivatives! 
A: Hi!
One of my professors back in Iran used to say everybody by heart has an intuitive understanding of "epsilon-delta" definition of limit/continuity based on the following everyday life example:
if you want to increase the amount of water coming out of a water faucet by epsilon, you 
know that there is delta that if you turn the faucet by delta you get epsilon change in the output. This I guess everybody has experienced specially adjusting water temperature in shower where usual relationship between amount of output water and how much you need to turn is 
not linear/uniform but nevertheless always continuous.
A: For some reason, students I teach always love epsilon-delta (not that they write good epsilon-delta proofs per se), and the more "wrong" I teach it, the more they enjoy it. The "wrong" thing that I like to do is to define real numbers via Cauchy sequences right at the beginning, at least in a hand-wavy way.
Calling a real number "real" is Orwellian, really- none of you have ever seen a real number. You might estimate pi to 100 or 1000 or a million places after the decimal point, but you can never write it all down- you never know precisely what it is. Even numbers like 0 and 1 are unknown as real numbers. You can write "0.00000..." until you're blue in the face, but you'll never know if the number you've written was actually zero or not, because there might be a sneaky "...000001..." coming up just around the corner to bite you.
So real numbers come with "fuzz". They're inherently "fuzz". There's no way around it. You can pretend they're points on a line, and crash face-first into Zeno's paradoxes, or you can accept their fuzziness and work with it; and I argue that calculus is none other than that "second approach".
So my "epsilon" is the fuzz. It's all those digits of "pi" (or of "zero") you never wrote down. It's the tree falling when nobody is there to hear it. It's the gap between human knowledge and universal truth. As such, it's part of what a real number is- a real number (as observed by mortal beings) comes with fuzz. A continuous function from the reals to the reals, then, has to "respect the fuzz".
Anyway, counter-intuitive though it is (perhaps), this motivation has worked wonders for me in practice. And so I keep using it, and keep getting excited about it, and it's the best part of the course, year after year.
Added: Interpreting the verb "to motivate" in another way, I always discuss the history of the ideas in some depth (I learnt it myself from wikipedia and books on the history of mathematics), and just how much people struggled to find the "right" definition, with no success, until Bernard Bolzano (primarily a Catholic priest!) finally hit upon an idea that worked in 1810. What idea were they trying to capture? Why was it so hard? How come it took 2500 years (Zeno of Elea to Bolzano) to find the right idea?
I'll also discuss the definition having been reworked and distilled by many many people- first its inventors, then mathematicians, then textbook writers, becoming more and more refined and smaller and smaller until that which is left looks to one who sees it for the first time like a small cold hard stone. It's only once you polish it (working it over in your mind, and solve problems) and shine it under a bright light (make sense for yourself of all those nested quantifiers) that you can finally see it for what it is- a diamond.
A: Epsilon-delta represents a pair of quantifiers (for all ... there exists ...). Challenge-response. The discrete mathematics take ought to be "hey, this is like a game", because if you iterate the quantification you are actually talking about a game-like structure. In other words, the teaching point is something like the transition from "if you want the answer to agree to five decimal places then you have to go far enough towards the limit", to "I know I can always respond to your challenge because I have a strategy!" Proof that a limit exists is the same as showing that there is such a strategy: but NB that the strategy is no more constructive than the proof is. 
In other words talking about limits is just discussion of existence proofs for certain kinds of low-level strategies. Roll over Weierstrass!
A: I like to relate the intuition of students that "when $x$ approaches $a$, then $f(x)$ approaches $b$" to the formal definition of limit by drawing the graph of a continuous function $f\colon \mathbb{R} \to \mathbb{R}$ and $\delta$ and $\epsilon$ intervals around $a$ and $b$ on the axes.
Then one can try to discuss and argue the order of quantifying $\epsilon - \delta$: the function comes $\epsilon$-close to $b$ if we take arguments $\delta$-close to $a$. One can also ask students about their intuition of a limit and if these are not precise enough, construct counterexamples, such as when $f$ jumps at $a$ even though it is monotonic, i.e. it "always approaches $a$" but not arbitrarily close.
I also like the explicit "game" and "worst enemy" approach already given. This especially helps in teaching students that the problem lies in small $\epsilon$'s, not large values.
A: When I'm talking to engineers, I like to motivate $\epsilon, \delta$ proofs this way...
If you feed steam into a turbine at a pressure of $p$ MPa, the turbine will generate electricity with a frequency of $f(p)$ Hz. The turbine is supposed to be putting out $120$ Hz; to get that, you have to put in steam at $24$ MPa.
Electric appliances are designed to work as long as the frequency going into them is within some tolerance $\epsilon$ of the expected frequency, $120$ Hz. If the frequency from the generator goes above $120 + \epsilon$ or below $120 - \epsilon$, users' applicances may stop working, possibly in spectacular and horrifying ways.
Your job, as an engineer, is to find a safety margin $\delta$ such that the output frequency $f(p)$ will be within $\epsilon$ of $120$ as long as the input pressure $p$ is within $\delta$ of $24$.
If the function $f$ is continuous at $24$, you can always do this, no matter how small the tolerance $\epsilon$ is. If $f$ isn't continuous at $24$, there are some tolerances which are just too small... no matter how tight you make the safety margin $\delta$, you'll never be able to guarantee that that the output frequency will be within tolerance of $120$.
A: I like the idea of using the term "neighbourhood" and the notation $f(M)$ for a function $f$ and set $M$. So we have the definition: for all neighbourhoods $N$ of $f(x)$there is a neighbourhood $M$ of $x$ such that $f(M) \subseteq N$. Then you can draw pictures of the actual sets that are being mapped.
Part of the psychological problem with an $\varepsilon$-$\delta$ proof is that these are measures of the size of the neighbourhood rather than the actual neigbourhood.  For particular proofs you need the numbers. 
This also relates to the idea that the neighbourhood definition of a topology is the most intuitive, even if you need of course to bring in the equivalent definitions in terms of open or closed sets. 
Motivated by the idea of "reverse chaining" in the psychology of learning, we used the idea of "fill-in proofs". Take a proof that the product of limits is a limit, rub out bits, and ask the students to fill in the missing bits using clues that you have left from the rest of the proof. So the structure of the proof is given. This is analogous to the way a professional works, get the structure first, then fill in the details. 
Also these exercises are very easy to mark! 
