Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can someone help me find an example where $\lim\limits_{x\to0}f(x^{2})$ exists but $\lim\limits_{x\to0}f(x)$ does not.


share|cite|improve this question
up vote 5 down vote accepted

The way to approach the problem is to ask yourself in what way squares of non-zero real numbers are different from arbitrary non-zero real numbers. The most obvious thing is the algebraic sign: $x$ can be either positive or negative, but $x^2$ cannot be negative. Moreover, $x=0$ is the point at which this difference shows up. Thus, we want a function that is essentially

$$f(x)=\text{algebraic sign of }x\;.$$

One such function, defined on $\Bbb R\setminus\{0\}$, is the one given in Michael Albanese’s answer: $f(x)=\dfrac{x}{|x|}$. Another is the signum function,

$$\operatorname{sgn}(x)=\begin{cases}-1,&\text{if }x<0\\0,&\text{if }x=0\\1,&\text{if }x>0\;.\end{cases}$$

share|cite|improve this answer
thanks for the extension – mathnoob Oct 11 '12 at 5:19
@mathnoob: You’re welcome. – Brian M. Scott Oct 11 '12 at 5:21
It might be worth noting that these are the same function, apart from how $f(0)$ is defined...? – Steven Stadnicki Jun 3 '14 at 23:58

How about $f: \mathbb{R}\setminus\{0\} \to \mathbb{R}$ given by $f(x) = \frac{x}{|x|}$? Look at the one-sided limits to see that $\displaystyle\lim_{x \to 0}f(x)$ does not exist. Now $$f(x^2) = \frac{x^2}{|x^2|} = \frac{x^2}{x^2} = 1$$ so $\displaystyle\lim_{x\to 0} f(x^2) = \lim_{x\to 0} 1 = 1$.

share|cite|improve this answer
What's wrong with just $f(x)=|x|, \ f(x^2)=|x^2|=x^2$? – Alex Oct 11 '12 at 4:54
@Alex: $\displaystyle\lim_{x\to 0}|x|$ exists (in particular, it is $0$). – Michael Albanese Oct 11 '12 at 4:56
Oops, sorry , I thought it was the derivative. – Alex Oct 11 '12 at 4:59
thanks for the example – mathnoob Oct 11 '12 at 5:19
@mathnoob: No problem. – Michael Albanese Oct 11 '12 at 5:22

Most general example: Let $g\colon[0,\infty)\to\mathbb R$ be continuous at $0$ and $h\colon(-\infty,0)\to\mathbb R$ arbitrary (especially, you can easily find $h$ such that $\lim_{x\to 0^-} h(x)$ does not exist or, if it exists, differs from $g(0)$). Then defining $f\colon \mathbb R\setminus\{0\}\to\mathbb R$ as $$f(x)=\begin{cases}g(x)&\text{if }x>0\\h(x)&\text{if }x<0\end{cases}$$ you find that $\lim_{x\to0} f(x^2)=\lim_{x\to0} g(x^2)=g(0)$, whereas $\lim_{x\to0} f(x)$ does not exist: If it existed, it would have to be equal to both $\lim_{x\to 0^-} h(x)$ and $\lim_{x\to 0^+} g(x)$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.