Finding the minimum of $v^2 + x^2 - 2xv\gamma$ 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?
 A: $v=x\gamma$ and $x=v\gamma$ give $v=v\gamma^{2}$. If $\gamma \neq \pm 1$ we get $v=0$ and $x=v\gamma =0$. If $\gamma =\pm 1$ the expression becomes $(x+v)^{2}$ or $(x-v)^{2}$. Can you minimize this?
A: We have to go over a few cases to analyze your algebraic expression.

I have included all possible cases in my answer and I want to point out that I will use only algebra.
Using the method of completing the square, we have
$$v^2 + x^2 - 2xv\gamma$$
$$x^2-x(2v\gamma)+v^2$$
$$\begin{align}(x-v\gamma)^2+v^2-v^2\gamma^2≥v^2(1-\gamma^2)\end{align}$$
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma]=v^2(1-\gamma^2), ~\text{at} ~ x=v\gamma}}}\end{align}$$
Then note that,
$$x^2 + v^2 - 2vx\gamma$$
$$v^2-v(2x\gamma)+x^2$$
$$\begin{align}(v-x\gamma)^2+x^2-x^2\gamma^2≥x^2(1-\gamma^2)\end{align}$$
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma]=x^2(1-\gamma^2),~\text{at} ~v=x\gamma. }}}\end{align}$$

Based on the $\gamma$ constant, both results can be equal:
$$v^2(1-\gamma^2)=x^2(1-\gamma^2)$$
$$\gamma =±1$$
which implies

*

*If $\gamma =1$,

$$v^2 + x^2 - 2xv\gamma=(v-x)^2≥0$$
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma]=0, \text{at} ~ v=x  ~ \text{or} ~x=v}}}\end{align}$$

*

*If $\gamma =-1$,

$$v^2 + x^2 + 2xv\gamma=(v+x)^2≥0$$
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 + 2xv\gamma]=0, \text{at} ~ v=-x ~ \text{or} ~x=-v}}}\end{align}$$

If $\gamma ≠±1$, then

*

*$|\gamma|>1$ and $x\to\infty$, then

$$\text{min}[v^2 + x^2 - 2xv\gamma] \to\ -\infty$$

*

*$|\gamma|>1$ and $v\to\infty$, then

$$\text{min}[v^2 + x^2 - 2xv\gamma] \to\ -\infty$$
This means, if $ |\gamma|>1$ , we  get
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma] = -\infty.}}}\end{align}$$


*

*If $|\gamma|<1$, then minimum value of your expression occurs at $x=0$ or $v=0$, which follows

$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma]=x^2(1-\gamma^2)=0, ~\text{at} ~x=0, |\gamma|<1 }}}\end{align}$$
$$\begin{align}\color {gold}{\boxed {\color{black}{\text{min}[v^2 + x^2 - 2xv\gamma]=v^2(1-\gamma^2)=0, ~\text{at} ~v=0, |\gamma|<1.}}}\end{align}$$
A: Differentiating with respect to either variable loses information. In Leibniz's proofs on the foundations of calculus, he makes one big assumption, and that is that he treats $\frac{dy}{dx}$ as a fraction, and so calculates $$\frac{1}{\frac{dy}{dx}} = \frac{dx}{dy}$$
at one point. This is impossible for the expression that you have given, because if one tries to solve for either $v$ or $x$, we are left with v = $\pm\sqrt{(...)}$, which contradicts the notion of a function ($1$ input, $1$ output): The expression would yield $1$ input, $2$ outputs. Without the definition of a function, we're not sure what exactly we are calculating anymore. In other words, your answer is potentially wrong due to false method (maybe correct result, I don't know), though I'm not sure how to get the right answer as of yet.
I fully admit that my paragraph may only be a partial answer to your question.
A: 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.

*

*$\gamma^2 = 1$
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$.


*$\gamma^2 \neq 1$
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$.
A: You can get similar solution with Kavi; find discriminant for v and $\gamma$:
$\Delta=v^2\gamma^2-v^2=v^2(\gamma^2-1)$
For minimum it mst be zero that is $\gamma^2=1$ or $\gamma=\pm1$. Hence minimum will be $(x-v)^2$ if $\gamma=+1$ and $(x+v)^2$ if $\gamma=-1$.
