Given two real numbers $p$ and $q$, we study the following system of equations with variables $x,y \in \mathbb{R}$:
\begin{align*} x^2+py+q&=0,\\
y^2+px+q&=0.
\end{align*}Determine the number of distinct solutions $(x,y)$ in terms of $p$ and $q$.
Tintarn wrote:
Given two real numbers $p$ and $q$, we study the following system of equations with variables $x,y \in \mathbb{R}$:
\begin{align*} x^2+py+q&=0,\\
y^2+px+q&=0.
\end{align*}Determine the number of distinct solutions $(x,y)$ in terms of $p$ and $q$.
Subtracting, we get the equivalent system :
$x^2+py+q=0$ and $(x-y)(x+y-p)=0$
And so :
($x=y$ and $x^2+px+q=0$) or ($y=p-x$ and $x^2-px+p^2+q=0$)
The two discriminants are $p^2-4q$ and $-3p^2-4q$
If $p^2-4q<0$ : no solution
If $p^2-4q=0$ : one solution (the case where $p=q=0$ implies each equation has one solution, but the same)
If $p^2-4q>0>-3p^2-4q$ : two solutions
If $p^2-4q>0=-3p^2-4q$ : two solutions (first equation has two solutions and second has one which is also solution of the first)
If $-3p^2-4q>0$: four solutions (both equation have two solutions and it is easy to check that all these solutions are distinct)