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

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

## Method 1

Introduce a Cartesian coordinate system and consider an arbitrary vector $\mathbf{a}$ with coordinates $(x, y)$ and a fixed vector $\mathbf{c}$ with coordinates $(3, 8)$.

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})
$$

Estimating the dot product through the lengths of the factors, 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} = 73$.

## Method 2

Transform the condition by completing the square.

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

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

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

from which $x = 0$ or $x = 3$. For the second value, we get $y = \frac{8}{3} \cdot 3 = 8$, from which $x^{2} + y^{2} = 9 + 64 = 73$.

Answer: 73.