Give an example about limits: $\lim\limits_{x\to0}f(x^{2})$ exists but $\lim\limits_{x\to0}f(x)$ does not.

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.

Thanks.

-

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}$$

-
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$.

-
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)$.

-