Suppose I have a function:
$$f(a,b)=h(a)+g(b)$$
where $a+b=1$. I'm interested in the values of $a$ and $b$ that maximize $f(a,b)$. Without substitution (e.g. by using the fact that $b=1-a$), how could I find out whether $f(a,b)$ is increasing in $a$?
My approach is as follows: since an increase in $a$ leads to a corresponding decrease in $b$, there are two effects of increasing $a$:
$$\frac{dh(a)}{da};-\frac{dg(b)}{db}$$
Such that the net effect is positive iff
$$\frac{dh(a)}{da}-\frac{dg(b)}{db}>0$$
Am I correct?
If $(a,b)$ is a feasible point then the feasible points nearby are $(a+t,b-t)$ with $|t|\ll1$, and we have $$\eqalign{f(a+t,b-t)-f(a,b)&=\bigl(h(a+t)-h(a)\bigr)+\bigl(g(b-t)-g(b)\bigr)\cr &=t\>\bigl(h'(a)-g'(b)+o(1)\bigr)\> \qquad(t\to0) .\cr}$$ If $h'(a)-g'(b)\ne0$ then we can make the RHS positive with a suitable choice of $t$, hence $f$ cannot be maximal at the point $(a,b)$. It follows that $h'(a)=g'(b)$ is a necessary condition for a (conditional) local maximum of $f$ at $(a,b)$.
The above argument identifies the conditionally stationary points. Wether we have a minimum, maximum, or neither, in such a point has to be analyzed separately, e.g., by computing second derivatives, or through "global arguments", like convexity, values at the boundary points, etc.