I'm trying to make a formula that converts an ellipse in general form to one in standard. My steps to derive it are as follows: $$ax^2+bx+cy^2+dx+e=0$$
Move e to the other side...
$$ax^2+bx+cy^2+dx=-e$$
"Complete the square" on both quadratics...
$$a(x+\frac{b}{2a}) + c(y+\frac{d}{2c})=\frac{b^2}{4a^2}+\frac{d^2}{4c^2}-e$$
I decided I only needed this much of the formula, as it was obvious that i would just divide the right side by the left to convert to the form $$\frac{(x^2-h)}{a^2}+\frac{(y^2-k)}{b^2}=1$$
However, when I tested it with the equation $9x^2-54x+4y^2+8y+49 = 0$
I substituted in the variables, and the left side checked out: $$9(x-3)^2 + 4(y+1)^2$$
However, when I tried to compute the right side, I got a result that neither nine nor four are factors of. $$\frac{(-54)^2}{4(9)^2} + \frac{(8)^2}{4(4)^2} - 49$$ $$\frac{2916}{324} + \frac{64}{64} - 49$$ $$9 + 1 - 49 = -39$$
As this Wolfram|Alpha query shows, I should be getting 36 on the left, but I'm getting negative 39. I can't seem to find an error in either the formula or the math.
$$a(x^2+\frac{b}{2a}x +\frac{b^2}{4a^2}) + c(y^2+\frac{d}{2c}y + \frac{d^2}{4c^2})=\color{red}{a}\frac{b^2}{4a^2}+\color{red}{c}\frac{d^2}{4c^2}-e$$
There are errors when completing the square.
First, it appears that you omitted the two red terms on the left hand side.More importantly, the terms you must add to the right hand side are missing the factors $a$ and $c$ respectively. Do you see where they came from?