# A function $f$ such that the limit of $f(x^2)$ exists but not $f(x)$.

I want to show a function $f$ such that $\displaystyle\lim_{x\to x_0}f(x^2)\in\mathbb{R}$ but $\displaystyle\lim_{x\to x_0}f(x)$ doesn't exist.

I only need a suggest of such a function $f$. I can't find an example of this.

Any hint? Thanks.

• take any function $f(x)$ that is continuous at $x=x_0^2$ and has a jump at $x = x_0$ – Petite Etincelle Oct 17 '14 at 13:31
• And if $x_o$ is infinite :)? – mvggz Oct 17 '14 at 13:32

Let $f(x) = \begin{cases} -1,&x < 0,\\1,& x \geq 0, \end{cases}$ with $x_0 = 0$.