# Mathematica returns wrong limit

I just started limits as part of my calculus class, and I have a simple limit to evaluate, $\mathop{\lim}\limits_{x \to 1}~f(x)$ . I found the limit to be 2 using the $f(x)=\mathop{\lim}\limits_{h \to 0}\frac{f(x+h)-f(x)}{h}$ method. However, upon checking my result in Mathematica (as well as Wolfram|Alpha), the result is shown as being 1. Is this a problem in Mathematica, or am I doing something wrong?

EDIT: $f(x)=x^2$

-
what is the problem? –  Yimin Feb 16 '13 at 21:31
What is $f$? In one place, you seem to be computing the limit of $f$ as $x$ goes to $1$, but in another you are computing the derivative. Could you provide more detail? –  Potato Feb 16 '13 at 21:31
Without telling us what $f$ and $x$ is, how do you expect anyone to be able to answer this question? –  mrf Feb 16 '13 at 21:33
...relative likelihood of novice making mistake versus wildly popular software with 30 year history making mistake on trivial problem? –  Jonathan Feb 16 '13 at 21:40
Maybe you want $\lim_{x\to 1} f'(x)$? –  Pedro Tamaroff Feb 16 '13 at 21:41

Well, for the function $f(x)=x^2$, we have both $$\lim_{x\to 1}\,f(x)=1\qquad\qquad \lim_{h\to 0}\,\frac{f(1+h)-f(1)}{h}=2.$$ Why would you expect them to give you the same answer?
No problem. I'm wondering now: maybe he wants $\lim\limits_{x\to 1} f'(x)$? –  Pedro Tamaroff Feb 16 '13 at 21:41
it should be $f(1+h)-f(1)$ –  i.a.m Feb 16 '13 at 21:42
f is defined at 1. Therefore $f(1)=1^2=1$
Now $f(x)\not =f'(x)=\mathop{\lim}\limits_{h \to 0}\frac{f(x+h)-f(x)}{h}$ and $f'(1)=2$