Multivariable Piecewise function with interval defined by the variables I am wondering how you analyse and take the partial derivatives of a multivariable piecewise functions where the intervals are defined by the variables
Something like
f(x,y)= $\left\{ \begin{array}
             (f(x) &   if  & x>h(y) \\
             \\ g(x) &  if & x\leq h(y)\\
             \end{array}
   \right.$
How would you take the partial derivative of f(x,y) in y?
 A: Fix $x$ and $y$. If $x < h(y)$ then for $|t|$ small enough $x+t < h(y)$ hence $\frac{F(x+t,y)-F(x,y)}{t} = \frac{g(x+t)-g(x)}{t}$ hence taking limits of both sides $\frac{\partial F}{\partial x} = \frac{dg}{dx}$. Same thing for $x>h(y)$, $\frac{\partial F}{\partial x} = \frac{df}{dx}$ . If $x=h(y)$  the derivative may not be defined depending on how $g$ relates to $f$, but suppose the derivative does indeed exist at $x=h(y)$ (this will be the case if $f$ and $g$ are connected to each other "smoothly" along the curve $x=h(y)$) and you are interested in calculating it then you can indeed just take $g'(x)$, this is because if the derivative exists at all then the limit $\lim \limits_{t \to 0} \frac{F(x+t,y)-F(x,y)}{t} $ should converge to one value regardless whether $t$ approaches from above or below, since we know that this limit equals $g'(x)$ if it approaches from below then it should equal to $g'(x)$ if this limit exists. You also do the same thing with partial derivatives with respect to $y$. You fix $x,y$ then see if $h(y)>x$ or $h(y)<x$ and calculate accordingly.
