<s>[INST] How to go from $C^2y^2+(C^2-M^2)x^2+Gx+H=0$ to an ellipse/ hiperbola? The following arrives on the context of conic sections.
(All letters denote a constant $\in \mathbb{R}$ except for $x$ and $y$).

Michael Spivak´s Calculus, arrives at
$$C^2y^2+(C^2-M^2)x^2+Gx+H=0$$
Then procedes to say that, for $\;C^2\neq M^2$, $\; C^2y^2+(C^2-M^2)x^2+Gx+H=0$ is either a ellipse or an hiperbola and that the values for $G$ and $H$ are trivial.
An ellipse and a hiperbola being objects described by the relation
$$\frac{x^2}{a^2}\pm \frac{y^2}{a^2-c^2}=k\text{,}$$
Trying to ceck this, I divided by $\;C^2(C^2-M^2)$ getting
$$\frac{x^2}{C^2}+\frac{y^2}{(C^2-M^2)}=\frac{-(Gx+h)}{C^2(C^2-M^2)}$$
My problem with this is that $\frac{-(Gx+h)}{C^2(C^2-M^2)}$ is not a constant (thus it can´t equal $k$).
I want to express $\; C^2y^2+(C^2-M^2)x^2+Gx+H=0$ on it´s ellipse/ hiperbola form.
What am I doing wrong? How could I someow get rid of $x$ on the right hand side so that its just a constant and not a function?
 [/INST] $$C^2y^2+\underbrace{(C^2-M^2)x^2+Gx}_{\text{make this a perfect square}}+H=0$$
$$\begin{align*}
(C^2-M^2)x^2+Gx&=(C^2-M^2)\left(x^2+\frac G{C^2-M^2}x+\frac{G^2}{4(C^2-M^2)^2}-\frac{G^2}{4(C^2-M^2)^2}\right)\\[1ex]
&=(C^2-M^2)\left(\left(x+\frac G{2(C^2-M^2)}\right)^2-\frac{G^2}{4(C^2-M^2)^2}\right)\\[1ex]
&=(C^2-M^2)\left(x+\frac G{2(C^2-M^2)}\right)^2-\frac{G^2}{4(C^2-M^2)}\\[1ex]
\end{align*}$$
Then the conic section has equation
$$C^2y^2+(C^2-M^2)\left(x+\frac G{2(C^2-M^2)}\right)^2=\frac{G^2}{4(C^2-M^2)}-H$$
</s>