Algebra · real student question

Solve the system x² + y² + xy = 7 and x + y + xy = 5.

Question

Solve the system

{x2+y2+xy=7x+y+xy=5\begin{cases}x^{2}+y^{2}+xy=7\\x+y+xy=5\end{cases}

Step-by-step solution

  1. Introduce the elementary symmetric quantities. Both equations are symmetric in xx and yy, so set

    s=x+y,p=xys=x+y,\qquad p=xy

    Using x2+y2=s22px^{2}+y^{2}=s^{2}-2p, the first equation becomes

    s22p+p=s2p=7s^{2}-2p+p=s^{2}-p=7

    and the second is simply s+p=5s+p=5.

  2. Solve the small system in s and p. From the second, p=5sp=5-s; substituting into the first:

    s2(5s)=7s2+s12=0(s+4)(s3)=0s^{2}-(5-s)=7\quad\Longrightarrow\quad s^{2}+s-12=0\quad\Longrightarrow\quad (s+4)(s-3)=0

    so s=3s=3 or s=4s=-4.

  3. Test the branch s = 3. Then p=53=2p=5-3=2, and x,yx,y are the roots of

    t2st+p=t23t+2=0(t1)(t2)=0t^{2}-st+p=t^{2}-3t+2=0\quad\Longrightarrow\quad (t-1)(t-2)=0

    giving {x,y}={1,2}\{x,y\}=\{1,2\}.

  4. Test the branch s = −4. Then p=5(4)=9p=5-(-4)=9, and x,yx,y would be the roots of

    t2+4t+9=0t^{2}+4t+9=0

    whose discriminant is 1636=20<016-36=-20<0. This branch yields no real solutions and must be discarded — checking s24ps^{2}\ge 4p is the standard test for whether a symmetric pair is realisable over the reals.

  5. State the solutions.

    (x,y)=(1,2) or (2,1)\boxed{(x,y)=(1,2)\ \text{or}\ (2,1)}

  6. Verify. For (1,2)(1,2): 1+4+2=71+4+2=7 ✓ and 1+2+2=51+2+2=5 ✓. The pair (2,1)(2,1) works identically because the system is symmetric — which also explains why the solutions come in swapped pairs rather than singly.

Answer

(x,y)=(1,2) or (2,1)(x,y)=(1,2)\ \text{or}\ (2,1)

Need to solve a different problem like this? Open the solver →