# Maximizing a bivariate quadratic form with Lagrange's method

Maximize the generic bivariate quadratic form constrained to the unit circle.

$$\begin{array}{ll} \text{maximize} & f(x_1, x_2) := ax_1^2 + 2bx_1 x_2 + cx_2^2\\ \text{subject to} & g(x_1, x_2) := x_1^2 + x_2^2 - 1 = 0\end{array}$$

Using the standard Lagrange Method with the Lagrange multiplier $\lambda$, we have:

\begin{align*} \nabla f &= \lambda \nabla g \\ f_x &= \lambda g_x \\ f_y &= \lambda g_y \\ a x_1 + b x_2 &= \lambda x_1 \\ b x_1 + c x_2 &= \lambda x_2 \\ \end{align*}

This translates to solving for eigenvalues and eigenvectors for

\begin{align*} A &= \begin{pmatrix} a & b \\ b & c \end{pmatrix} \\ Ax &= \lambda x \\ \end{align*}

The maximum and minimum coordinates of $f(x_1, x_2)$ are the eigenvectors that are scaled to fit on the unit circle. My textbook states the following:

Show that the maximum and minimum values of $f(x_1, x_2)$ are the eigenvalues themselves.

But is it true? Can someone demonstrate that?

• Must you use Lagrange multipliers? There is an easier way. – Rodrigo de Azevedo Apr 20 '18 at 6:11
• I wasn't solving this problem for its own sake, I was trying to understand a textbook section that used that as an example to build into something else. – clay Apr 20 '18 at 16:47

Multiply the Lagrange conditions as follows: \begin{align} x_1 \times (a x_1 + b x_2 = \lambda x_1)\\ x_2 \times (b x_1 + c x_2 = \lambda x_2)\\ \end{align} and sum them up. Now use the fact that $(x_1,x_2)$ is on the unit circle and you would easily get: $f(x_1,x_2) = a x_1^2 + 2bx_1x_2 + cx_2^2 = \lambda$.

Let $x=(x_1,x_2)$ such that $x_1^2+x_2^2=1$ and

$f(x)=\max \{f(u,v):u^2+v^2=1\}$. By Lagrange there is $\lambda \in \mathbb R$ such that $Ax=\lambda x$.Hence

$\lambda= \lambda x^Tx=x^T(Ax)=f(x)$.

This problem can be easily solved without the Lagrange multipliers

Make the transformation

$$x_1 = \cos\theta\\ x_2 = \sin\theta$$

then the objective function will read

$$f(\theta) = a \cos^2\theta + 2 b \sin \theta\cos\theta + c \sin^2\theta$$

and now the stationary points are obtained by solving

$$\frac{df}{d\theta} = 2b\cos(2\theta)+(c-a)\sin(2\theta) = 0 \Rightarrow \theta = \frac{1}{2}\arctan\left(\frac{2b}{a-c}\right)$$

etc.