The equations should be solved
$ h(x,y)=x+\frac{\partial f(x,y)}{\partial x}-\text{inp}_x$, $~$$ g(x,y)=y+\frac{\partial f(x,y)}{\partial y}-\text{inp}_y $, where $\text{inp}_x$ and $\text{inp}_y$ are constant.
I tried to solve the equations by Newton-Raphson (NR) methods for root finding.
But, I couldn't solve the equations where $\frac{\partial f(x,y)}{\partial x}=0$ and/or $\frac{\partial f(x,y)}{\partial y}=0$.
For a $\frac{\partial f}{\partial x}=0$ and $\frac{\partial f}{\partial y}\neq0$ system, am I right to calculate
$h(x,y)$ as optimization problem (i.e., finding extrema point),
substituted optimized y_value into $g(x,y)$, and 3rdly solve $g(x,y)$ by NR mothods?
If I am not, please tell me how to solve the equations. Thanks in advance.