Example 3. Let $x, y$ satisfy $3 x^{2}+2 y^{2}=6 x$, find the maximum value of $x^{2}+y^{2}$:

Translate the text above into English, please keep the original text's line breaks and format, and output the translation result directly.
If not analyzed, from the known conditions:
$$
\begin{array}{l}
x^{2}+y^{2}=-\frac{1}{2} x^{2}+3 x \\
=-\frac{1}{2}(x-3)^{2}+\frac{9}{2},
\end{array}
$$

it would be incorrect to say that when $x=3$, $x^{2}+y^{2}$ achieves its maximum value $\frac{9}{2}$. This is because from $y^{2}=-\frac{3}{2} x^{2}+3 x \geqslant 0$, we get $0 \leqslant x \leqslant 2$.

The correct answer is: when $x=2$, $x^{2}+y^{2}$ achieves its maximum value 4.

Through geometric analysis, the error and the correct reasoning can be clearly explained: the constraint condition is transformed into
$$
(x-1)^{2}+\frac{y^{2}}{3 / 2}=1 \text{. }
$$

This is an ellipse. The maximum value we are seeking is the square of the radius of the largest circle
$$
x^{2}+y^{2}=R^{2}
$$

that has a common point with this ellipse. The point on the ellipse farthest from the origin $O(0, 0)$ is $(2,0)$, and the point $(3, y)$ is outside the ellipse.