When I first delved in the world of contest math, a topic which I particularly had problems with (and still do today) was optimization. Besides memorizing various inequalities, it was also hard for me to transform such problems into a form where these inequalities can be used.
Hence I was quite anxious to solve a problem introduced to me by a friend yesterday which is as follows.
Find the maximum value of
\begin{equation} \frac{ab+bc+cd}{a^2+b^2+c^2+d^2} \end{equation}
where $(a,b,c,d)\in \mathbb R^4\setminus\{(0,0,0,0)\}$.
What I think is peculiar with this problem is the numerator, since it seems to lack "symmetry". To explain, $b$ and $c$ appear twice while $a$ and $d$ appear only once, hence their effects on the value of the expression will be different.
My friend used the arithmetic mean - geometric mean (AM-GM) inequality to solve this problem. It involved some complicated ways of seeking the appropriate coefficients which may take too long to explain, so I will just show the core of his solution.
Let $t\in \mathbb R$, where $t>1$. Using AM-GM, we obtain
\begin{align*} t^2a^2 + b^2 &\geq 2tab &\iff && ab &\leq \frac{t}{2}a^2+\frac{1}{2t}b^2\\[5pt] (t^2-1)b^2 + (t^2-1)c^2 &\geq 2(t^2-1)bc &\iff && bc &\leq \frac{1}{2}b^2 + \frac{1}{2}c^2\\[5pt] c^2 + t^2d^2 &\geq 2tcd &\iff && cd &\leq \frac{1}{2t}c^2 + \frac{t}{2}d^2 \end{align*}
Taking the sum of the inequalities in the right side, we obtain
\begin{equation} ab+bc+cd \leq \frac{t}{2}a^2+\left(\frac{1}{2t}+\frac{1}{2}\right)b^2+\left(\frac{1}{2t}+\frac{1}{2}\right)c^2+\frac{t}{2}d^2 \end{equation}
Now, if we force $t$ to satisfy $\dfrac{t}{2} = \dfrac{1}{2t}+\dfrac{1}{2}$, then the only possible value for $t$ that satisfies the imposed conditions is $t=\dfrac{1+\sqrt 5}{2}$. This would imply
\begin{equation} \frac{ab+bc+cd}{a^2+b^2+c^2+d^2} \leq\frac{1+\sqrt 5}{4} \end{equation}
This upper bound is attainable for values of $a,b,c,d$ satisfying $\left(\dfrac{1+\sqrt 5}{4}\right)a=b$, $b=c$, and $c=\left(\dfrac{1+\sqrt 5}{4}\right)d$, which follows from the equality condition of AM-GM. Hence $\boxed{\dfrac{1+\sqrt 5}{4}}$ is the maximum value.
As I have remarked before, the problem I have with olympiad-type optimization problems is the difficulty in manipulating the objective function into a suitable form to perform inequalities on. For instance, the solution I have shown above does not show the tedious reason why the coefficients are to be written in such a way as function of $t$, but it is necessary in order to use the appropriate inequality.
Hence, I sought to find another way of solving the problem. One may observe that the numerator seems to appear like a dot product. Furthermore the denominator appears to be the squared Euclidean norm of the vector $(a,b,c,d)$. It may then be fruitful to ask this question: can we view the problem in terms of linear algebra?
Let $(a,b,c,d)\in \mathbb R^4\setminus\{(0,0,0,0)\} $. Observe that we may rewrite the expression as follows.
\begin{align*} \frac{ab+bc+cd}{a^2+b^2+c^2+d^2} &= \frac{1}{2}\frac{a(b)+b(a+c)+c(b+d)+d(c)}{a^2+b^2+c^2+d^2} \\[10pt] &= \frac{1}{2} \frac{\begin{bmatrix}a &b&c&d\end{bmatrix}\cdot \begin{bmatrix}0 & 1 & 0 & 0 \\ 1 & 0 &1 & 0 \\ 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 0\end{bmatrix}\begin{bmatrix}a\\b\\c\\d \end{bmatrix}}{\begin{bmatrix}a &b&c&d\end{bmatrix}\cdot \begin{bmatrix}a\\b\\c\\d \end{bmatrix}} \end{align*}
We can therefore view the problem as follows.
Find the maximum value of
\begin{equation} \frac{1}{2}\frac{v^TMv}{v^T v} \end{equation}
where $v\in \mathbb R^4\setminus\{(0,0,0,0)\}$ and $M = \begin{bmatrix}0 & 1 & 0 & 0 \\ 1 & 0 &1 & 0 \\ 0 & 1 & 0 & 1\\ 0 & 0 & 1 & 0\end{bmatrix}$.
This restatement seems to be more complicated than the original expression. Indeed, this is not the type of solution one may expect for an olympiad-type question. However, the advantage here is that there exists a straightforward way to solve such a problem.
In general, for an arbitrary matrix, the maximum value of the expression above does not have a general formula (at least, to my knowledge). However, our matrix $M$ has a very crucial property: it is Hermitian. That is, it is its own conjugate transpose. To show this, since the matrix entries are all real, it suffices to show that the transpose of $M$ is itself.
This is important because it would mean that the quantity $\dfrac{v^TMv}{v^T v}$ is precisely the Rayleigh quotient associated with the vector $v$ and Hermitian matrix $M$. An important property of the Rayleigh quotient is that its maximum value is the largest eigenvalue of the matrix.
Therefore, the alternative solution to our problem involves finding the eigenvalues of the matrix, which is a straightforward computation.
\begin{align*} \det \begin{bmatrix}-\lambda & 1 & 0 & 0 \\ 1 & -\lambda &1 & 0 \\ 0 & 1 & -\lambda & 1\\ 0 & 0 & 1 & -\lambda\end{bmatrix} &= -\lambda \det \begin{bmatrix} -\lambda & 1 & 0 \\ 1 & -\lambda & 1\\ 0 & 1 & -\lambda \end{bmatrix}-\det \begin{bmatrix}1& 0 & 0 \\ 1 & -\lambda & 1 \\ 0 & 1 & -\lambda \end{bmatrix} \\ &= -\lambda \left(-\lambda(\lambda^2-1)-1(-\lambda )\right)-(\lambda^2-1) \\[5pt] &= \lambda^2(\lambda^2-2 )-(\lambda^2-1) \\[5pt] &= \lambda^4-3\lambda^2 +1 \\[5pt] \end{align*}
Using the quadratic formula, $\lambda^2 = \dfrac{3\pm \sqrt{5}}{2} = \left(\dfrac{1\pm\sqrt 5}{2}\right)^2$. The eigenvalues of $M$ therefore are $\dfrac{1-\sqrt 5}{2}$, $\dfrac{\sqrt 5-1}{2}$, $-\dfrac{1+\sqrt 5}{2}$, and $\dfrac{1+\sqrt 5}{2}$. The largest among these is the latter.
Hence, the maximum value of $\dfrac{1}{2}\dfrac{v^TMv}{v^T v}$ is $\dfrac{1}{2}\cdot \dfrac{1+\sqrt 5}{2}= \boxed{\dfrac{1+\sqrt 5}{4} }$, which agrees with our previous solution.
While this alternative solution gives a direct way to compute for the maximum value, it is still quite complicated to do and reliant on luck. For instance, the fact that a Hermitian matrix would appear was not really predicted. Additionally, finding the zeroes of the characteristic equation may also be difficult. Nevertheless, I still find this solution using linear algebra quite useful, and I hope you, the reader, also found this interesting.
As practice for the curious reader, I will leave the following problem for you to solve. I hope you will try out the method above in solving this problem. Thanks for reading!
Find the maximum value of
\begin{align*} \frac{y(x+z)}{x^2+y^2+z^2} \end{align*}
where $(x,y,z)\in \mathbb R^3\setminus(0,0,0)$.