<s>[INST] How to bring elliptical equation $2x^2+2y^2+3xy-x-y=0$ into canonical form I have this ellipse: $$2x^2+2y^2+3xy-x-y=0$$
Canonical form is $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$$
How can I bring my ellipse to that canonical form? It seems like I need some substitution.
 [/INST] I tried to look for a good way to substitute something but failed miserably ...
So instead I tried the following :
Firstly I found the centre of the ellipse by solving the equations :
$$\frac{\delta f}{\delta x} = 0  \ and \ \frac{\delta f}{\delta y} = 0$$
So the centre came out to be ($\frac{1}{7}$,$\frac{1}{7}$)
The major and minor axes will pass through this point so let the slope of the line with acute angle to the x-axis be m. (m>0)
One of the axes : $(y-\frac{1}{7})=m(x-\frac{1}{7})$
Subsequently the other axis is : $(y-\frac{1}{7})=-\frac{1}{m}(x-\frac{1}{7})$
Rearrange these equations a bit
Now the canonical form of ellipse can be rewritten as :
$$\frac{(distance \  from \ an \ axis )^2}{a^2} +\frac{(distance \  from \ other \ axis )^2}{b^2} = 1$$
The distance of a point(x,y) from a line $y=mx +c$ is given by $\frac{|y-mx-c|}{\sqrt{m^2+1}}$
So write the equations of assumed axes as $y=mx+c$ and fill them in the above equation
$$\frac{(y-mx-\frac{1}{7}+\frac{m}{7})^2}{(1+m^2)a^2}+\frac{(my+x+\frac{1}{7}-\frac{m}{7})^2}{(1+m^2)b^2}=1$$
Now simply compare coefficients of obtained equation and given equation. The coefficients of x and y are equal in given equation, so let us just do that in our equation.
$$\frac{m^2}{(1+m^2)a^2} + \frac{1}{(1+m^2)b^2} = \frac{1}{(1+m^2)a^2} + \frac{m^2}{(1+m^2)b^2}$$
$$\frac{m^2 -1}{(1+m^2)a^2} = \frac{m^2 -1}{(1+m^2)b^2}$$
So either $m=\pm 1$ or $a=\pm b$
We can eaisilly discard the possibility of $a=\pm b$ as the would mean it is a circle, but in the given equation coefficient of $xy$ is 3 (which must be $0$ for it to be a circle)
Also notice how for m=1 , the equation will have non-zero constant term; so only possible value is 1
Now plug in the value of m as -1 and again compare coefficients
Compare coefficients of $xy$:
$$-\frac{1}{b^2}+\frac{1}{a^2} = 3..........(1)$$
Compare coefficients of $x^2$:
$$\frac{1}{a^2}+\frac{1}{b^2}=4..........(2)$$
solve (1) and (2) to get $\frac{1}{a^2}$ and $\frac{1}{b^2}$;plug in the obtained values in the equation to get the required equation in canonical form.
$$\frac{7(y+x-\frac{2}{7})^2}{4} +\frac{(x-y+\frac{2}{7})^2}{4} = 1$$
</s>