Description of the boundary of a ball Solving an optimization problem in multiple variables, I had to examine a function
$$
f(x,y,z)=x^2+2yz
$$
defined on a ball
$$
\{ (x,y,z)\enspace|\enspace x^2+y^2+z^2\leq1 \}.
$$
The boundary is then described by the sphere $x^2+y^2+z^2=1$. According to my textbook, one can search for maxima on the boundary by rewriting $x^2+y^2+z^2=1$ as $x^2=1-y^2-z^2$, then substituting this into $f$ to obtain
$$
f(x,y,z)=1-y^2-z^2+2yz,\quad y^2+z^2\leq1
$$
Now what I don't understand is, how come we need to specify that $y^2+z^2\leq1$? The unit sphere is described by $x^2+y^2+z^2=1$ with no need to specify any restrictions on $y$ or $z$, but once we rewrite this as $x^2=1-y^2-z^2$ and plug it into the function, suddenly it becomes necessary to specify that $y^2+z^2\leq1$. Why?

Because $0 \leq x^2 = 1-y^2-z^2$.
