We define $$f(x)=\frac{1}{\sqrt{(x+1/2)^2+y^2+z^2}}$$ and find the maximum and minimum values of $f$ such that $$x^2+y^2+z^2=1$$
Here is what I have so far:
$f(x)$ approaches a maximum as $1/f(x)$ approaches a minimum and vice versa also $1/(f(x))^2$ does the same. So we define a new function $h(x)=1/(f(x))^2=(x+1/2)^2+y^2+z^2$ (side question: is it possible to shift $h(x)$ so it is simply $x^2+y^2+z^2$? or is this invalid?)
So we define the Lagrangian as $$L=((x+1/2)^2+y^2+z^2)+\lambda(x^2+y^2+z^2-1)$$
Then we get the following after taking partial derivatives:
$$L_x=2x+1+2\lambda x=0\\L_y=2y(1+\lambda)=0 \\ L_z=2z(1+\lambda)=0\\L_\lambda=x^2+y^2+z^2-1=0$$
But from here I am stuck, do we want to solve for $x,y,z,\lambda$? And how do we proceed from there if that is the case?
You have to solve the four equations simultaneously for $\lambda, x, y, z$. The second equation gives either $\lambda=-1$ or $y=0$. But if $\lambda=-1$ then the first equation becomes $1=0$. Therefore $y=0$, and similarly $z=0$ from the third equation. The fourth equation then gives $x^2=1$, so either $x=1$ or $x=-1$.
You can verify that $x=\pm1$ and $y=z=0$ are the values where $h(x,y,z)$ attains its max and min by using @lab bhattacharjee's hint: Given the constraint $x^2+y^2+z^2=1$, the function $h$ reduces to $x+\frac54$, which attains its max and min under that constraint when $x=\pm1$.