# If limit of f is L and limit of g is M, then limit of g composed f is M?

by SebastianLinde   Last Updated November 08, 2018 23:20 PM

Problem:

Find examples of functions $$f$$ and $$g$$ defined on $$\mathbb{R}$$ with $$\lim\limits_{x\to a}f(x) = L$$, $$\lim\limits_{y\to L}g(y) = M$$, and $$\lim\limits_{x\to a} g(f(x))\neq M$$.

I have tried various combinations like $$f(x) = x$$ and $$g(y) = y^2$$, $$f(x) = b$$ and $$g(y) = y^2$$, and so on. I have even tried with some trigonometric functions with no luck. I am wondering what characteristic am I trying to "break" so that the conditions do not hold. Also, since $$f$$ and $$g$$ have to be defined on $$\mathbb{R}$$, does that mean that something like $$\frac{1}{x}=f(x)$$ is not a valid example since it is not defined at $$x=0$$?