2. Find the maximum value of the quantity $x^{2}+y^{2}+z^{2}$, given that

$$
x^{2}+y^{2}+z^{2}=3 x+8 y+z
$$
# Solution

## 1st Method

Introduce a Cartesian coordinate system and consider an arbitrary vector $\mathbf{a}$ with coordinates $(x, y, z)$ and a fixed vector $\mathbf{c}$ with coordinates $(3, 8, 1)$. Then, the left side of the condition represents the square of the length of vector $\mathbf{a}$, and the right side represents the dot product of vectors $\mathbf{a}$ and $\mathbf{c}$:

$$
|\mathbf{a}|^{2}=(\mathbf{a}, \mathbf{c})
$$

By estimating the dot product through the lengths of the multipliers, we get

$$
|\mathbf{a}|^{2} \leq|\mathbf{a}| \cdot|\mathbf{c}| \Leftrightarrow|\mathbf{a}| \leq|\mathbf{c}|
$$

As is known, equality is possible and is achieved when the vectors lie on the same line. Therefore, the maximum value will be achieved, for example, when $\mathbf{a}=\mathbf{c}$.

Substituting the values, we get $3^{2}+8^{2}+1^{2}=74$.

## 2nd Method

Transform the condition by isolating complete squares.

$$
x^{2}+y^{2}+z^{2}=3 x+8 y+z \quad \Leftrightarrow \quad\left(x-\frac{3}{2}\right)^{2}+(y-4)^{2}+\left(z-\frac{1}{2}\right)^{2}=\frac{74}{4}
$$

Thus, the points of the given set lie on a sphere with center at the point $\left(\frac{3}{2}, 4, \frac{1}{2}\right)$. Points with a fixed value of the quantity $x^{2}+y^{2}+z^{2}$ also lie on a sphere (with center at the origin), so the desired point will be the point of tangency of the obtained sphere internally with the sphere $x^{2}+y^{2}=$ Const. This point of tangency, in turn, lies on the diameter connecting the centers of the spheres, so it remains to substitute $y=\frac{8}{3} x, z=\frac{1}{3} x$ into the condition.

$$
\left(x-\frac{3}{2}\right)^{2}+\left(\frac{8}{3} x-4\right)^{2}+\left(\frac{1}{3} x-\frac{1}{2}\right)^{2}=\frac{74}{4} \quad \Leftrightarrow \quad \frac{74}{9}\left(x-\frac{3}{2}\right)^{2}=\frac{74}{4},
$$

from which $x=0$ or $x=3$.

The first value gives a zero sum of squares. For the second value, we get $y=\frac{8}{3} \cdot 3=8, z=\frac{1}{3} \cdot 3=1$, from which $x^{2}+y^{2}+z^{2}=9+64+1=74$.

Answer: 74.