Let's say I have this expression $v^2 + x^2 - 2xv\gamma$, in which $\gamma$ is a constant. I want to find values for $v$ and $x$ to minimize the expression.
Sounds easy: just differentiate and set the result to zero. However, differentiating with respect to $v$ yields different results compared to differentiating w.r.t $x$.
$\partial/\partial v \rightarrow 2v -2x \gamma = 0 \rightarrow v = x\gamma$
$\partial/\partial x \rightarrow 2x -2v \gamma = 0 \rightarrow x = v\gamma$
Why is there a difference? Like, the first equation implies that this function hits an extremum when $v = x \gamma$. The value of the expression at that extremum is now $\gamma^2 x^2 + x^2 - 2x^2 \gamma^2 = x^2 - x^2 \gamma^2$. On the other hand, the second equation implies that this function hits an extremum when $v = x / \gamma$, and that the value at the extremum is actually $x^2/\gamma^2 - x^2$. The two expressions are plainly different (unless $\gamma = \pm 1$).
How do I interpret this discrepancy? What exactly are the two equations $v = x\gamma$ and $x = v \gamma$? What is the true value of the expression at the extremum?
In general, if $f(v,x)$ achieves local extremum, then $\nabla f(x,y) = (\partial_vf,\partial_x f)$ must be zero vector. So, the partial derivatives that you calculated both need to be set to $0$ to find candidates for local extrema. In particular:
$$v = \gamma x,\ x = \gamma v \implies (1-\gamma^2) x = 0,\ (1-\gamma^2) v = 0.$$
We need to look at different cases.
In this case our function becomes $f(v,x) = v^2+x^2 \mp 2 vx = (v\mp x)^2\geq 0$ and $0$ is achieved whenever $v = \pm x$.
We can now divide by $1-\gamma^2$ so the only candidate for local extremum is $v = x = 0$. However, we don't know if this is local minimum, maximum or saddle point. To find out we can calculate the Hessian matrix
$$ H_f(v,x) = \begin{pmatrix} \partial_{vv}f & \partial_{xv}f\\ \partial_{vx}f & \partial_{xx}f\\ \end{pmatrix} = \begin{pmatrix} 2 & -2\gamma\\ -2\gamma & 2\\ \end{pmatrix}.$$
We are interested in definiteness of this matrix. We can calculate eigenvalues to be $\lambda = 2\pm 2\gamma$.
In the case when $\gamma^2 < 1$, both eigenvalues are positive and thus the matrix is positive definite, and at the point $v = x = 0$ we have local minimum.
In the case when $\gamma^2 > 1$, the eigenvalues are of opposite signs so $v = x = 0$ is a saddle point. Indeed, if you set $v = \gamma x$, you get $f(v,x) = (1-\gamma^2) x^2$ which will tend to $-\infty$ when $x\to \infty$. On the other hand, setting $v = -\gamma x$ gives us $f(v,x) = (1+3\gamma^2) x^2$ which tends to $\infty$ when $x\to\infty$.