Composition of two-variable limits

Let $u=f(z)$ be an elementary function and $z=g(x,y)$ a two-variable elementary function. Suppose we have $g(x,y)$ is continuous at point $(a,b)$, $g(a,b)=c$, and $\lim_{z\to c}f(z)=A$. When is it true that $\lim_{(x,y)\to(a,b)}f(g(x,y))=A$? If it's not true in general, are there any counter examples?

-

The fact that $g$ is a function of two variables is totally irrelevant. Anyway, you are asking for the composition law for limits. Of course, the answer is positive is $f$ is continuous at $c$, since the composition of two continuous maps is always a continuous map. If $\lim_{z \to c} f(z)$ merely exists but $f$ is not necessarily continuous, the answer is negative, in general. The trouble comes from the fact that $g$ may be constant and equal to $c$. In this case, $f \circ g$ is constant and equal to $f(c)$ in a neighborhood of $(a,b)$, but $A$ may differ from $f(c)$. I am assuming that $f(c)$ is defined, of course.
In the question, I assume both $f$ and $g$ to be elmentary functions, therefore if $f$ is defined at $c$, it's continuous at $c$ and the question is always true. – Z.H. Apr 26 '12 at 9:40