Continuity and partial derivatives How I can determine if the function $ f(x,y) =
\begin{cases}
1+x-y,  & \text{if $y\ge e^x$ } \\
-y, & \text{if $y\lt e^x$ }
\end{cases}.
$ is continuous and its first order partial derivatives, I do not see how to apply the definition of continuity and partial derivatives through the limit
 A: I don't think you need to do anything fancy here, just go thru the various parts of the problem one by one.
This is a piecewise function with two differentiable pieces (both $1+x-y$ and $-y$ are differentiable since they are polynomials). Therefore $f$ is differentiable (and thus continuous) whenever we're within the interior of either region, i.e. whenever $y < e^x$ or $y > e^x$. The only places where $f$ could possibly be discontinuous or not differentiable are on the boundary $y = e^x$.
We know that on a boundary point the only way $f$ can be continuous is if the limit from one side of the boundary equals the limit from the other side of the boundary. Since the pieces on either side are continuous functions, that means that for $f$ to be continuous at a boundary point we must have $1+x-y = -y$, which simplifies to $x=-1$. Since $y = e^x$ on the boundary, this means all points except $(-1,\ e^{-1})$ are definitely discontinuous (and thus not differentiable).
It follows pretty quickly that $f$ is not differentiable at $(-1,\ e^{-1})$ because the partial derivatives in $x$ on either side do not agree. But this does not tell us anything about whether or not it's merely continuous. However, it turns out that it is continuous because the two constituent pieces are continuous and agree at the point $(-1,\ e^{-1})$.
A: f is formed by combining g(x,y ) =1+x-y ,and h(x,y) =-y ;2 infinitely differentable functions defined on all (x,y) in the plane . by restricting g to the region above and on the curve of points (x,y) with y=e^x ,and h to the region below this curve .By taking limits in the 2 regions separately at a point P on the curve it is easy to see that f can be continuous at p exactly when g(p)=h(p) ,so if p = (x,y) we must have 1+x-y=-y and y=e^x (p is on the curve) .This means x=-1 and so also y=e^-1 . At all points of the curve other than (-1,e^-1) the function f is not continuous .
 The partial derivatives D1 (with respect x) and D2 (with respect to y) for g at any  (x,y) in the plane are 1 and -1   and for h are 0 and -1 (independent of (x,y) in this particular example). So at the point (-1,e^-1) (the only point on the curve with a chance for f to have partial derivatives )  ,we see that D1 differs for g and h (1|=0 ) but D2 agrees for g and h ( -1=-1)  By similar reasoning as for continuity we see that D1(f) (-1,e^-1) does not exist but 
D2(f) (-1,e^-1 ) = -1 . Regards Stuart M.N
