Simplifying $C[(x-x_0)^2 + (y-y_0)^2 +z^2]=[(x-r_0)^2+y^2+z^2]^2$ to make it an equation of a sphere

I have an expression in terms of $$(x,y,z)$$ that is actually a sphere as per Mathematica but I am unable to bring it to the form $$(x-a)^2+(y-b)^2 +(z-c)^2=r^2$$.

Here is the equation I have. Let $$(x_o,y_0,0)$$ and $$(r_0,0,0)$$ be the two points and $$C$$ be the scaling factor/constant and $$(x,y,z)$$ is any point fulfilling a certain condition, then

$$C[(x-x_0)^2 + (y-y_0)^2 +z^2]=[(x-r_0)^2+y^2+z^2]^2$$

I am interested in finding the center and the radius of the sphere $$(x,y,z)$$.

Here is what I have from Mathematica.

• Why do you think it's a sphere? It's not. – zipirovich Apr 9 at 3:30
• This is a fourth degree equation, hence not a sphere. – user376343 Apr 9 at 9:27
• Thank you for your comments. I have added a snapshot from Mathematica. The fourth degree gives an impression as if the equation would not be of sphere but what I noticed is that higher the degree smaller the radius is. – Rabe Arshad Apr 9 at 20:48

That said, the (real) solution set of the fourth-degree equation $$\left(\;(x+1)^2+(y+2)^2+(z+3)^2+4\;\right)\cdot\left(\;(x-1)^2+(y-2)^2+(z-3)^2-4\;\right)=0$$ is a sphere, because the first factor is always non-zero and can be divided-out. Could that be happening with your equation?
Well ... If your figure were a sphere, then it should be symmetric in (at least) all the coordinate directions. It's certainly symmetric in the $$z$$ direction (since all instances of $$z$$ are even powers). What about the $$x$$ direction? Suppose we substitute some values into your $$C=2$$ case:
\begin{align} y=1, z=0 &\quad\to\quad \text{(real) } x \approx -1.3048 \text{ or } 2.8461 \quad\to\quad \text{midpoint } x \approx 0.7706 \\ y=0, z=1 &\quad\to\quad \text{(real) } x \approx -1.5955 \text{ or } 3.2574 \quad\to\quad \text{midpoint } x \approx 0.8309 \\ \end{align}
(I used Mathematica to find the solutions.) Since the midpoint $$x$$ values don't match, the solution set is not symmetric in the $$x$$ direction. This is definitely not a sphere. $$\square$$
• You could, for instance, take appropriate partial derivatives and such to find extremal $x$, $y$, $z$ values, and determine the ellipsoid that fits the bounding box. (For details on such a strategy, you should ask a separate question.) As for solving with Mathematica, I simply defined f[x_, y_, z_] := 2((x-2)^2+(y-4)^2+z^2)-((x-1)^2+y^2+z^2)^2, then entered NSolve[f[x,1,0]==0, x] and NSolve[f[x,0,1]==0, x]. – Blue Apr 9 at 22:50