We have :
x^2+xy+y^2=3 and
y^2+yz+z^2=16
A=xy+yz+zx
Find the maximum value of
A.
Find x, y and z when A=max value.
(Remember the category)
First, express x and z in terms of y.
Let s and t be sign variables (equal to 1 or -1), since square roots can be positive or negative.
x = (-y/2) + s*sqrt[3 - (3*y^2/4)]
z = (-y/2) + t*sqrt[16 - (3*y^2/4)]
Now A can be expressed in terms of y and some sign variables.
A = ((-y/2) + s*sqrt[3 - (3*y^2/4)])*((-y/2) + t*sqrt[16 - (3*y^2/4)]) + y*((-y/2) + s*sqrt[3 - (3*y^2/4)]) + y*((-y/2) + t*sqrt[16 - (3*y^2/4)])
After some algebra:
A = (1/4)*(-3*y^2 + y*s*sqrt[12 - 3*y^2] + y*t*sqrt[64 - 3*y^2] + s*t*sqrt[12 - 3*y^2]*sqrt[64 - 3*y^2])
The function A is defined as long as the square roots are real which means 12 - 3*y^2 >= 0 and 64 - 3*y^2 >= 0. From this, A is defined for 2 >= y >= -2.
The maximum value of A occurs at y = 2, y = -2, or some local maximum. Now its time for some calculus.
dA/dy = (1/4)*( -6*y + s*sqrt[12 - 3*y^2] + t*sqrt[64 - 3*y^2] + y*(-6*s*y)/(2*sqrt[12 - 3*y^2]) + y*(-6*t*y)/(2*sqrt[64 - 3*y^2]) + s*sqrt[12 - 3*y^2]*(-6*t*y)/(2*sqrt[64 - 3*y^2]) + t*sqrt[64 - 3*y^2]*(-6*s*y)/(2*sqrt[12 - 3*y^2]) ) = 0