Maximum of a 3-variable quadratic function subject to a quadratic constraint

64 Views Asked by At

Find the maximum of the quadratic function,

$ f(x, y, z) = 4 x^2 - 3 y^2 + z^2 + xy - 2 xz + 3 yz + x - y + 3 z + 5 $

for $x, y, z \in \Bbb{R}$ subject to

$ 8 x^2 + 4 y^2 + 2 z^2 + 2 xy + xz - y z + 2 x + 5y + z - 100 = 0 $

My attempt:

Define the vector $r = [x, y, z]^T$, then the function can be expressed as

$f(r) = r^T Q r + r^T b + c $

And the constraint as

$ C(r) = r^T P r + r^T a + d = 0 $

Define the Lagrange function as follows

$ g(r) = f(r) + \lambda C(r) $

Then the partial derivatives will give

$ \nabla_r g(r) = 2 Q r + b + \lambda ( 2 P r + a ) = 0 $

and

$ C(r) = 0 $

The first equation gives us

$ 2 Q r + b = - \lambda (2 P r + a ) $

This is a vector equation with three components. The scalar $\lambda$ can be eliminated by dividing out these components, so we will have after cross multiplication,

$ \bigg( 2 Q r + b \bigg)_x \bigg( 2 P r + a \bigg)_y = \bigg( 2 Q r + b \bigg)_y \bigg( 2 P r + a \bigg)_x \hspace{15pt} (1)$

and

$ \bigg( 2 Q r + b \bigg)_x \bigg( 2 P r + a \bigg)_z = \bigg( 2 Q r + b \bigg)_z \bigg( 2 P r + a \bigg)_x \hspace{15pt} (2)$

In addition, we have

$r^T P r + r^T a + d = 0 \hspace{15pt} (3)$

Equations $(1),(2),(3)$ are three quadratic equations in three unknowns $x, y, z$.

Solving by any means, generates the possible solutions which can maxima, minima, or saddle points. Evaluating the function at the each point, will indicate the point at which the maximum occurs.

Applying the above method, I got $8$ solutions to the system of $3$ quadratic equations $(1),(2),(3)$ in the three variables $x,y,z$, out of which, after comparing the function values, I found that the maximum occurs at

$ x = -2.2224997 , \\y = 1.4013066 , \\z = 6.0018442 $

and the value of the maximum is

$f_{max} = 118.065963 $

Any comments on the above method, and the numerical results is highly appreciated, as well as alternative solutions. Thank you all.