Solve for xy in terms of a and b
Matthew Barrera
$$x^2 + xy + y^2 = a$$
$$x + y = b$$
$xy = ?$
I tried this and did this:
$xy = a - x^2 - y^2$
$xy = a - (x^2 + y^2)$
$xy = a - (x + y)(x - y)$
$xy = a - b(x - y)$
At this point I can't think of anything to do to represent the $x - y$ part in terms of $a$ and $b$.
Any help would be appreciated.
$\endgroup$ 35 Answers
$\begingroup$$b^2=(x+y)^2=x^2+2xy+y^2=a+xy$. Therefore $xy=b^2-a$.
$\endgroup$ 1 $\begingroup$We are given \begin{align}x^2+xy+y^2&=a\tag{1}\\ x+y&=b\tag{2}\end{align}
We can square the equation $(2)$ to give us \begin{align}b^2&=(x+y)^2\\ &=x^2+2xy+y^2\end{align}
Therefore, we now have \begin{align}a&=x^2+xy+y^2\tag{1}\\ b^2&=x^2+2xy+y^2\tag{3}\end{align}
We can rearrange equation $(3)$ and substitute equation $(1)$ into it to give us the answer: \begin{align}b^2&=(x^2+xy+y^2)+xy\\ b^2&=a+xy\\ xy&=b^2-a\end{align}
$\endgroup$ $\begingroup$$x^2 + xy + y^2 = a$ ....(1)
$x + y = b$
Squaring both sides,
$x^2 + y^2 + 2xy = b^2$
$x^2 + y^2 = b^2 - 2xy$
Put value of $x^2 + y^2$ in equation (1),
$b^2 - 2xy + xy = a$
$b^2 - xy = a$
$xy = b^2 - a$
$\endgroup$ $\begingroup$plugging nyour second equation $$y=b-x$$ in the first equation we get $$x^2+x(b-x)+(b-x)^2=a$$ and it follows $$x^2-bx+b^2-a=0$$ solve this quadratic equation and check the answers
$\endgroup$ $\begingroup$I like this trick: $$x^2+xy+y^2=\frac{3(x+y)^2+(x-y)^2}{4},$$ so $$(x-y)^2=4a-3b^2,$$ $$x-y=\pm\sqrt{4a-3b^2}$$ etc.
$\endgroup$ 1