# Solving a non-zero quadratic equation of two variables

I have a problem where I am to find the intersection between the two curves $$\begin{cases} x^2 - y^2 = 3 \\ xy = 2, \end{cases}$$ which I can easily see that the two points $\pm(2,1)$ are the real solutions to this problem, but I don't know how to solve for this systematically. I tried two approaches to solve for it as a quadratic equation:

approach 1 (insert the second equation in the first):

$$4x^2 - 4y^2 + 4xy = 20 \Leftrightarrow (2x + y)^2 - 5y^2 = 20 \Leftrightarrow x=\dfrac{\pm\sqrt{5y^2 + 20} - y}{2}$$

approach 2 (substitute $y$ for $x$):

$$x=\frac{2}{y} \Rightarrow x^2 - \frac{4}{x^2} = 3 \Leftrightarrow x^4 - 3x^2 - 4 = 0$$

But I don't know how to continue from here. I found this math.stackexchange question where they solve a similar equation using these two approaches, but they don't end up with a constant under the root since they have $0$ on the right-hand side. Also, since that equation don't have any real solutions, I don't get how to apply it to this equation.

How do I solve this kind of equation systematically? (not 100% sure what type of the equation it is)

## Edits:

Corrected substitution from incorrectly substituting $y$ for $y$. I had arrived at this step earlier, but I still don't know how to solve the equation.

• How exactly did you get $x^2-\frac{4}{y^2}=3$?
– 5xum
May 15, 2018 at 7:50
• Oh... I incorrectly substituted $y$ for $x$. May 15, 2018 at 7:53

Multiply the first equation by $x^2$ and substitute $xy$ from the second:

$$x^4-x^2y^2-3x^2=x^4-4-3x^2=0.$$

This is a biquadratic equation, which gives the roots $x^2=4$ and $x^2=-1$. If you are only interested in the real solutions,

$$x=\pm2,y=\frac2x.$$

• Yup, this is the step I didn't do correctly! May 15, 2018 at 11:05

$$\begin{cases} x^2 - y^2 = 3 \\ xy = 2, \end{cases}$$

Substitution is as follows, you substitute $y$ in first equation with it's value according to second equation so in this case. $$x^2-\frac4{x^2}=3$$ That is $y=2/x$ according to second equation. Substitution should always lead to reduction in number of variables.

Solving $x^2-\frac4{x^2}=3$ for $x$ yields $$x^4 -3x^2-4=0.$$ This equation has two real solutions $x=2$ and $x=-2$ (there are also two complex solutions at $x=i$ and $x=-i$). Plugging $x= \pm 2$ into the initial equations yields $y=\pm 1$. Likewise, you can obtain the complex solutions of $y$ by plugging $x=\pm i$ into the initial equations which yields $y=\pm 2i$.

• This still doesn't show how the values are solved for. It's just as easy to see in the original equations. "substitution should always lead to reduction in number of variables" is a good point 'though! May 15, 2018 at 8:04
• Values are solved for using methods used to solve quadratic equations. Here it is assumed that you know how to solve quadratics. May 15, 2018 at 8:07
• I am confident at solving many quadratics, but I believe that approach 1 in my question shows that I don't know how to solve that kind of quadratic equation systematically. May 15, 2018 at 8:10
• @BCI4evry1: I'm not sure what you were trying to do in approach 1 but approach 2 gives you a quadratic in $x^2$. Or alternatively you can substitute $z=x^2$ to get a more traditional looking quadratic that you can solve. May 15, 2018 at 10:23
• I'm not sure anymore what I was referring to in my last comment. What you say about approach 2 is correct, and is the step I couldn't figure out. May 16, 2018 at 17:06

An idea for you:

Multiply second equation by two: $\;2xy=4\;$ , and subtract it from first equation, getting:

$$x^2-2xy-(y^2-1)=0$$

The solution to this quadratic in $\;x\;$ is:

$$\Delta=4y^2+4y^2-4=4(2y^2-1)\implies x_{1,2}=y\pm\sqrt{2y^2-1}$$

and now substitute in first equation, say:

$$\overbrace{y^2\pm2y\sqrt{2y^2-1}+2y^2-1}^{=x^2}-y^2=3\implies y^2\pm y\sqrt{2y^2-1}=2\implies$$

$$y^4-4y^2+4=2y^4-y^2\implies y^4+3y^2-4=0\iff (y^2+4)(y^2-1)=0\implies$$

$$y=\pm1\implies x=\pm1\pm\sqrt{2-1}=\pm1\pm1$$

and since the solutions $\;(x,y)\;$ must have the same sign and both are clearly different from zero, we finally get the candidates:

$$(2,1)\,,\,\,(-2,-1)$$

Finally, check whether the above two really are solutions (since we squared stuff here...)

• This is a little more tedious isn't it. Are there situations when this might be preferred over substitution. May 15, 2018 at 8:08
• Well, more tedious than what? The OP wrote he substituted at once and messed up and etc. I just tried to offer her/him an option to work out things a little differently at the beginning... May 15, 2018 at 8:10
• I meant in this particular situation the method you have shown looks more tedious than substitution. I was asking if there are some cases that you know of when this might be easier to do than substitution. May 15, 2018 at 8:13
• This is substitution, its just that rather than substitute $x=y/2$ we are calculating a much more complicated way of expressing x in terms of y and susbtituting that instead. I have to say though I think if the OP had trouble substituting $x=y/2$ then thinking they are going to do the above without any mistakes seems... optimistic? May 15, 2018 at 10:27
• @Chris I don't know if that's optimistic or not: that's up to the OP. The OP showed a way when substituting is the first step, and I showed a different way when substituting arrives later and, imo, an easier way. The OP has now two ways to approach this problem: let us let her/him decide which one fits him'her better. May 15, 2018 at 10:32

Your second approach would have been my choice as well. Once you've found that $$x^4-3x^2-4=0,$$ you can solve this as a quadratic in $x$ to find that $x^2=-1$ or $x^2=4$, as others have explained.

Your first approach is also fine, though your choice of substitution is not. You can see that $$y^2=x^2-3,$$ and squaring the second equation yields $$4=x^2y^2=x^2(x^2-3)=x^4-3x^2,$$ leading to the same equation for $x$ as your first approach.

You made a mistake during calculation. What you should have done during substitution is to get the value $x=\frac2y$ from the second equation and substitute $x$ with that value in the first equation which should result in

$$\left(\frac{2}{y}\right)^2 - y^2=3$$ which is an equation that is easy to solve.

• I don't think it is easy to solve systematically. It is easy to see the solutions, but I'm asking for the systematic approach to this. May 15, 2018 at 8:07
• @BCI4evry1 It's easy to solve if you introduce the correct substitution.
– 5xum
May 15, 2018 at 8:14
• Care to show how? May 15, 2018 at 8:15
• @BCI4evry1 I think just telling you that you should introduce a new variable should be enough. It's time for you to put some effort into solving the equation. The substitution (and some algebraic manipulation) should lead you to a quadrativ equation.
– 5xum
May 15, 2018 at 8:16
– 5xum
May 15, 2018 at 8:37

Once you get to $x^4-3x^2-4=0$, it follows quite easily. You can factor this as $(x^2-4)(x^2+1)$, or if you want to do it more systematically, you can do a substitution $u= x^2$. Then you have $u^2-3u-4=0$ and now you can apply the quadratic formula to solve for $u$.

• That should be $(x^2 - 4)(x^2 + 1)$. But it is also the answer Servaes gave hours ago. May 15, 2018 at 17:28
• @PaulSinclair The OP asked for "systematic" solution. The quadratic formula is more systematic than factoring. May 15, 2018 at 18:01

Another approach, based on (complex) completing of the square. Notice that if the first equation would have the term $x^2+y^2$, it would be much easier because then by taking the sum and the difference of the two equation, you would get squares. But the minus sign in front of the $y$ is ''wrong'', so let's change it using complex numbers! $$(x+iy)^2=x^2-y^2+2ixy=3+4i$$ $$(x-iy)^2=x^2-y^2-2ixy=3-4i$$ Write the numbers in the polar form, $$(x+iy)^2=5 e^{i\phi}$$ $$(x-iy)^2=5 e^{-i\phi}$$ Here $\phi$ is such that $\tan(\phi)=4/3$. So, take the square roots: $$x+iy=\sqrt{5} e^{i\phi/2}$$ $$x-iy=\sqrt{5} e^{-i\phi/2}$$ Take the sum and the difference: $$x=\sqrt{5} \frac{e^{i\phi/2}+e^{-i\phi/2}}{2}$$ $$y=\sqrt{5} \frac{e^{i\phi/2}-e^{-i\phi/2}}{2i}$$ Remember the complex equations for sine and cosine: $$x=\sqrt{5} \cos(\phi/2)$$ $$y=\sqrt{5} \sin(\phi/2)$$

To find $\cos(\phi/2)$ (thanks to hints from Michael Seifert in the comments): It is easy to see that $\cos(\phi)=3/5$. The double-angle formula for cosine says: $$\cos(\phi)=2 \cos^2(\phi/2)-1$$ so $$\cos(\phi/2)=\pm \sqrt{\frac{\cos(\phi)+1}{2}}=\pm \frac{2}{\sqrt{5}}$$ And likewise $\sin(\phi/2)=\pm\frac{1}{\sqrt{5}}$.

Altogether, this leads to the solution given by others! This might not be the easiest method to discover, especially not the last step, but I always like it if complex numbers are used to solve a problem in the reals.

• If $\tan \phi = 4/3$, then $\phi$ forms one angle of a 3-4-5 triangle. This implies that $\sin \phi = 4/5$ and $\cos \phi = 3/5$. You can then use the equations $\cos \phi = 2 \cos^2 (\phi/2) - 1 = 1 - \sin^2(\phi/2)$ to find $\cos (\phi/2)$ and $\sin (\phi/2)$. May 15, 2018 at 20:57
• Suddenly, a new world of possibilities for completing the square opens up. I've never seen this before. Neat answer! May 16, 2018 at 17:55
– user193810
May 16, 2018 at 18:19

If you only need to find real solutions, here is an approach using trigonometry:

The equation is equivalent to $z^{2} = 3+4i$ where $z=x+yi$. Hence, there exists two solutions $z=\pm (3+4i)^{1/2}$. Using a polar coordinate, if $z=re^{i\theta}$, we should have $$r= \sqrt{|3+4i|} = \sqrt{5}, \quad \cos 2\theta = \frac{3}{5},\quad \sin 2\theta = \frac{4}{5}$$ From this, we have $$\tan 2\theta = \frac{4}{3} = \frac{2\tan\theta}{1-\tan^{2}\theta}, \quad \tan\theta = \frac{1}{2}$$ and $$z = \pm \sqrt{5}(\cos\theta + i\sin \theta) = \pm (2+i),$$ which gives two solutions $\pm(2, 1)$.

With symmetric functions:

First it's enough to determine $x^2$ and $y^2$ since

$$\begin{cases} x^2-y^2=3\\ xy=2 \end{cases}\iff\begin{cases} x^2-y^2=3\\x^2y^2=4&\text{and x, y have the same sign.} \end{cases}$$ So we set $X=x^2$,$\;Y=y^2$. We have to solve the system $\;\begin{cases} X-Y=3,\\ XY=4,\end{cases}$ in positive numbers.

This system implies $\; (X+Y)^2=(X-Y)^2+4XY=9+16=25$ , so we obtain the system $$\begin{cases} X+Y=5,\\ XY=4,\end{cases}\iff \begin{gathered}\{X,Y\}\;\text{ are the (positive) solutions of the quadratic equation }\\[1ex] T^2-5T+4=0 \end{gathered}$$ Now the solutions of this equation are $\{1,4\}$, and we have $X=Y+3>Y$, so the solution are $x^2=X=4,\;y^2=Y=1$, whence $$(x,y)=(2,1)\;\text{or}\;(x,y)=(-2,-1).$$

I thought about removing the constant terms.

$$2x^2-2y^2 = 6 = 3xy$$

$$2x^2 - 3xy -2y^2 = 0$$

$$(2x+y)(x-2y) = 0$$

$$\text{y = -2x or y=\frac 12x}$$

Substituting into $xy=2$, I get

$$\text{(x,y)\in \{(i,-2i), (-i,2i), (-2,-1),(2,1) \}}$$