Context:
I'm brushing up on some Analysis and currently going the exercises in M. Spivak's Calculus book, specifically chapter 5 on limits. Everything was going fine until I came across this question. I've been thinking about it for some time with no luck.
Question: "Give an example where $\lim_{x\to{}0}{f(x^2)}$ exists, but $\lim_{x\to{}0}{f(x)}$ does not."
My attempts:
A previous question showed that $\lim_{x\to{}0}{f(x^3)}=\lim_{x\to{}0}{f(x)}$, which I believe works because we can find the third root of any real number (which was useful in the epsilon - delta proof for it). Which makes me believe the above fails because we can't square root negative reals. This lead me to play around with functions involving $\sqrt{x}$ and utilising its 'undefinedness' on the negatives.
I started with $f(x)=\sqrt{x-1}$ which clearly has an undefined limit at $0$. But this is of course no different (considering the limit at $0$ that is) to $f(x^2)$.
Any hints? I feel as though I'm overlooking something so simple.