# How to solve the system of equations $x^2-5xy+6y^2=0$ and $x^2+y^2=45$

So I was again scrolling through Youtube when I came across this video by Cipher proposing the system of equations

$$\color{white}{f(x)=} \begin{cases} x^2-5xy+6y^2&=0 \\ x^2+y^2&=45 \end{cases}$$

which I thought that I might be able to solve. Here is my attempt at solving the system of equations:$$x^2+y^2-45=x^2-5xy+6y^2$$$$y^2-45=-5xy+6y^2$$$$-5y^2-45=-5xy$$$$5y^2+45=5xy$$$$y^2+9=xy$$$$\frac{y^2+9}{y}=x$$$$\frac{y^4+18y^2+81}{y^2}+y^2-45=\frac{y^4+18y^2+81}{y^2}-\frac{5y^5+90y^3+485y}{y^2}+6y^2$$$$2y^4-27y^2=-5y^5+7y^4+90y^3+18y^2+485y$$$$-5y^5+5y^4+90y^3-9y^2+485y=0$$$$y^4-y^3-18y^2-1.8y-81=0$$Solving for all roots of this quartic equation gets us:$$\text{Real roots: }y=-4.22813\text{, }5.15294$$$$\text{Complex root: }y=0.037595\pm1.92778i$$And plugging all four of these solutions into the equation $$x^2+y^2=45$$ gets us$$x=\pm5.20797\text{, }\pm4.29502\text{, }\pm6.97962\pm0.00103838i$$Which means the $$4$$ solutions to the system of equations

$$\color{white}{f(x)=} \begin{cases} x^2-5xy+6y^2&=0 \\ x^2+y^2&=45 \end{cases}$$

are$$(\pm5.20797,-4.22813)\text{, }(\pm4.29502,5.15294)\text{, and }(\pm6.97962\pm0.00103838i,0.037595\pm1.92778i)$$

My question

Is my solution correct, or what could I do to attain the correct solution/attain it more easily?

• No, we have $(x,y)=(6,3), (-6,-3)$ as obvious solution, too. Commented May 5, 2023 at 19:51
• A person downvoted all answers to this question. Maybe also the question. Why? Commented May 6, 2023 at 13:10
• @user376343 Apparently, it needs "clarification" according to the current close vote that is placed. The problem is clear as is though. Commented May 9, 2023 at 23:11

We have $$x^2-5xy+6y^2=\color{blue}{x^2+y^2}-5xy+5y^2=\color{blue}{45}-5xy+5y^2=0.$$

So we can write $$9-xy+y^2=0$$ and solve the equation for $$y$$ in terms of $$x$$: $$y=\frac{x\pm\sqrt{x^2-36}}{2}.\tag1$$

Now, for which $$x$$ values will we produce a corresponding $$y$$ value? We have $$x^2-5xy+6y^2=(x-3y)(x-2y)=0\implies x=3y\ \text{or}\ x=2y.$$

For $$x=2y$$, we have in $$(1)$$: $$y=\frac{2y\pm\sqrt{4y^2-36}}{2}\implies 0=\sqrt{4y^2-36}\implies y=\pm3\implies x=\pm6,$$ and for $$x=3y$$, we have in $$(1)$$: $$y=\frac{3y\pm\sqrt{9y^2-36}}{2}\implies 8y^2=36\implies y=\pm\frac3{\sqrt2}\implies x=\pm\frac9{\sqrt2}.$$

Therefore, we have four real solutions: $$(6,3), (-6,-3), \left(\frac9{\sqrt2},\frac3{\sqrt2}\right), \left(-\frac9{\sqrt2},-\frac3{\sqrt2}\right)$$.

Here's a link to the two equations plotted on the same graph.

GEOMETRIC APPROACH

Since $$x^2-5xy+6y^2=(x-2y)(x-3y),$$ the first equation is a common equation of two lines $$x-2y=0, \quad x-3y=0.$$ Each line meets the circle given by $$x^2+y^2=45$$ in two points, because the lines pass through origin and the circle is centered in origin.
It suffices to upload $$x=2y$$ or $$x=3y$$ in $$x^2+y^2=45$$ to obtain corresponding values of $$y$$ and then compute $$x.$$

Since $$xy\neq 0$$, we can use that for $$y\neq 0$$ from the first equation

$$x^2-5xy+6y^2=0 \implies \left(\frac x y\right)^2-5\,\frac x y+6=0 \implies \frac xy =2\;\lor \;\frac xy =3$$

therefore from the second one using $$x=2y\;\lor\; x=3y$$ we obtain

$$x^2+y^2=45 \implies 5y^2=45 \;\lor \;10y^2=45$$

from which we can easily conclude.

Your approach would work, but your substitution of $$\ x \ = \frac{y^2 \ + \ 9}{y} \$$ into $$\ x^2 + y^2 - 45 \ = \ 0 \$$ should have produced $$(y^4 + 18y^2 + 81) \ + \ y^4 \ - \ 45y^2 \ \ = \ \ 2y^4 \ - 27y^2 \ + \ 81$$ $$= \ \ (2y^2 - 9)·(y^2 - 9) \ \ = \ \ 0 \ \ .$$

Note that the equations $$\ x^2 - 5xy + 6y^2 \ = \ 0 \$$ and $$\ x^2 + y^2 \ = \ 45 \$$ are unaffected (invariant) by changing the signs of both $$\ x \$$ and $$\ y \ . \$$ So if a ordered pair (or "point") $$\ (x \ , \ y) \$$ is a solution to the pair of equations, so is $$\ (-x \ , \ -y) \ \ . \$$ We see this in the even symmetry of the quartic polynomial above. (This provides a hint that something is not right about the numerical results you show.)

user376343 presents one geometric approach to the system of equations ($$\ x^2 - 5xy + 6y^2 \ = \ 0 \$$ being the equation of a "degenerate" conic section). Another would be to use the symmetry of the solutions about the origin to say that any pair of solutions lie on a line $$\ y \ = \ mx \$$ through the origin. We then have $$x^2 \ - \ 5x·mx \ + \ 6·(mx)^2 \ \ = \ \ (6m^2 \ - \ 5m \ + \ 1)·x^2$$ $$= \ \ 6·\left( m \ - \ \frac13 \right)·\left( m \ - \ \frac12 \right)·x^2 \ \ = \ \ 0 \ \ .$$ [As we should expect, this is consistent with the factorization user376343 and Andrew Chin show.]

Since $$\ x \ = \ 0 \$$ does not lead to a consistent result for both equations, we only need to use the two line slopes in the equation for the circle to obtain

$$\mathbf{m \ = \ \frac13 \ \ : } \quad x^2·\left(1 \ + \ \left[\frac13 \right]^2 \right) \ \ = \ \ 45 \ \ \Rightarrow \ \ x^2 \ \ = \ \ \frac{9·45}{10}$$ $$\Rightarrow \ \ x \ = \ \pm \frac{9}{\sqrt2} \ \ , \ \ \ y \ = \ \frac13·x \ = \ \pm \frac{3}{\sqrt2} \ \ ;$$

$$\mathbf{m \ = \ \frac12 \ \ : } \quad x^2·\left(1 \ + \ \left[\frac12 \right]^2 \right) \ \ = \ \ 45 \ \ \Rightarrow \ \ x^2 \ \ = \ \ \frac{4·45}{5}$$ $$\Rightarrow \ \ x \ = \ \pm 6 \ \ , \ \ \ y \ = \ \frac12·x \ = \ \pm 3 \ \ .$$