I am interested in finding local optima of an algebraic function $f(X,Y)$. Suppose, that this expression involves radicals, for example $f(X,Y)= \frac{1}{2}(X+Y)-\sqrt{XY}$. The approach in which i am interested, is as follows:
First, find a polynomial $u\in\mathbb{Q}[X,Y,T]$ such that $u(X,Y,f(X,Y))=0$.
Let $(X,Y)$ be a critical point and $T=f(X,Y)$ be a corresponding value. Then the following system of polynomial equations in $(X,Y,T)$ is satisfied: $$u=0, \quad \frac{\partial u}{\partial X} = 0,\quad \frac{\partial u}{\partial Y} = 0$$
The system above is easy to solved with well known algorithms
I encountered however, a modification of method described above in a paper "Recent Advances in Automated Theorem Proving on Inequalities" and I have problem with proving whether it is correct:
If $(X,Y)$ is critical, then $u$ and $\frac{\partial u}{\partial X}$ vanishes as well as their resultant $$Res_X \left(u,\frac{\partial u}{\partial X} \right) = 0,\quad Res_X \in \mathbb{Q}[Y,T]$$ Cancelling some of factors in order to have a multiplicity at most 1 at every factor, we get a simpler equation $$ u_1(Y,T) = 0 $$
We have $\frac{\partial u_1}{\partial Y} =0$ and a critical point. WHY?
Next, analogously, we take a derivative with respect to $y$, and we get $$Res_{y} \left(u_1,\frac{\partial u_1}{\partial Y} \right) = 0,\quad Res_{Y} \in \mathbb{Q}[T] $$ So we have an equation on $T$
The method gives the correct answer in every case I tried use them. However, I can not understand why we are allowed to take $y$-derivative in the equation obtained only for critical points?