What you have here are two equations:
x+y=5 [1]
xy=6 [2]
To solve for x and y , you should rearrange one of the equations for one of the variables x or y . Choose equation [1] to rearrange for y , because it is easy to do so.
y=5−x [3]
Now, substitute this expression into equation [2]:
x(5−x)=6
Now use this equation to solve for x . Firstly expand the parentheses:
5x−x2=6
Rearrange the terms so that they are all on one side of the equation:
x2−5x+6=0
What you have here is a quadratic equation. There are many ways to solve a quadratic equation but I will choose the easiest method for this problem.
Factorise the quadratic expression on the left-hand side of the equation by using the product-sum method (or by decomposition):
(x−2)(x−3)=0
The null factor law gives x=2 or x=3 as the solution.
Now, substitute x=2 or x=3 into equation [3] to get the value of y:
when x=2 , then y=5−2=3
when x=3 , then y=5−3=2
Therefore, there are two solutions to these simultaneous equations, which are: (2,3) and (3,2) ■ By inspection, you should be able to see that two numbers whose sum is 5 and whose product is 6 are 2 and 3. It could be that x=2 and y=3, or that x=3 and y=2.
But, one could also solve algebraically by isolating either the x or y in the equation x+y=5, and substituting into the other equation. In that case, x=5–y, so
(5–y)•y=6
5y–y^2=6. Since this is quadratic, get zero on one side and then factor.
y^2–5y+6=0
(y–3)(y–2)=0
y=3 or y=2 Substituting back into the equation x+y=5,
If y=3, x+3=5 so x=2
If y=2, x+2=5, so y=3