I have a function $h(a,b)=g(f(a,b))$ where $f(a,b)$ is a smooth, continuous, multivariate function and $g(x)$ is a piecewise function s.t. $$g(x)=\begin{cases} 1, & 0 \leq x \leq 1 \\ x, & x > 1 \end{cases} $$ How would I go about solving $\frac{\partial h(a,b)}{\partial a}$?
Edit: I also want to say that though $f(a,b)$ only depends upon two variables, the number of variables are not bounded.
The partial derivative will be piecewise as well:
$\frac{\partial h(a,b)}{\partial a}= g'(f(a,b))\frac{\partial f(a,b)}{\partial a}= 0$, by the chain rule.
If $f(a,b)$ is between 0 and 1, since $g$ is constant, and if $f(a,b)>1$, $g'=1$ and $g'(f(a,b))\frac{\partial f(a,b)}{\partial a}=\frac{\partial f(a,b)}{\partial a}$
This will be true for any smooth scalar valued function $f$ mapping into the domain of $g$.