# Using a grid table to estimate a limit

Consider finding the limit of $f(x)=(x^2-4)/(x-2)$ as $x\to 2$.

f[x_] := (x^2 - 4)/(x - 2);

I'm looking for some easy ways for my Calc I students (next semester) to approximate the limit of this function as x approaches two. I know about Limit[f[x],x->2], but my first interest is creating a table of values that indicates an estimate of the limit. I have a couple approaches for approaching two from the right.

First:

data = Table[{x, f[x]}, {x, {2.1, 2.01, 2.001, 2.0001, 2.00001}}];
PrependTo[data, {"x", "f(x)"}];
Grid[data,
Alignment -> Left,
Frame -> All]

Second:

data = Table[{2. + 10^(-n), f[2. + 10^(-n)]}, {n, 1, 5}];
PrependTo[data, {"x", "f(x)"}];
Grid[data,
Alignment -> Left,
Frame -> All]

Anybody have some cuter, easier suggestions?

• For {2.1, 2.01, 2.001, 2.0001, 2.00001} you can do 2. + PowerRange[10^-1, 10^-5, 0.1]. – march Dec 11 '15 at 6:00