Finding two numbers given their sum and their product

Our two equations are: $$x + y = 16 \tag{1}$$ $$xy = 55\tag{2}$$

Rewriting equation (1) in terms of just $y =$ something, we get:

$$y = 16-x$$

Substituting this into equation (2) leaves us: $$x(16-x) = 55$$ $$16x-x^2=55 \implies x = 5 \ \ \text{or} \ \ 11$$

which can be easily seen by factoring or using the quadratic formula. It follows that $y=11|x=5$ and $y=5|x=11$.

Thus your solutions in terms of $(x,y)$ are $(5,11)$ and $(11,5)$.


We are trying to solve the system of equations $x+y=16$, $xy=55$. Here are a couple of systematic approaches that work in general.

Approach $1$: We will use the identity $(x+y)^2-4xy=(x-y)^2$. In our case, we have $(x+y)^2=256$, $4xy=220$, so $(x-y)^2=36$, giving $x-y=\pm 6$.

Using $x+y=16$, $x-y=6$, we get by adding that $2x=22$, and therefore $x=11$. It follows that $y=5$.

The possibility $x+y=16$, $x-y=-6$ gives nothing new. Adding, we get $2x=10$, so $x=5$, and therefore $y=11$.

Approach $2$: From $x+y=16$, we get $y=16-x$. Substitute for $y$ in $xy=55$. We get $x(16-x)=55$. Simplification gives $x^2-16x+55=0$. The quadratic factors as $(x-5)(x-11)$, so our equation becomes $(x-5)(x-11)=0$, which has the solutions $x=5$ and $x=11$.

But we cannot necessarily rely on there being such a straightforward factorization. So in general after we get to the stage $x^2-16x+55=0$, we would use the Quadratic Formula. We get $$x=\frac{16\pm\sqrt{(-16)^2-4(55)}}{2}.$$
Compute. We get the solutions $x=5$ and $x=11$. The corresponding $y$ are now easy to find from $x+y=16$.

Remarks: $1,$ Recall that the Quadratic Formula says that if $a\ne 0$, then the solutions of the quadratic equation $ax^2+bx+c=0$ are given by $$x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}.$$

Your approach was along reasonable lines, but things went wrong in the details. From $xy=55$ we get $x=\frac{55}{y}$. Substituting in the formula $x+y=16$, we get $$\frac{55}{y}+y=16.$$ A reasonable strategy is to multiply through by $y$, getting $55+y^2=16y$, or equivalently $y^2-16y+55=0$. Now we have reached a quadratic equation which is basically the same as the one we reached above.

$2.$ The first approach that we used (presented as an algorithm, and stripped of algebraic notation) goes back to Neo-Babylonian times. The "standard" problem was to find the dimensions of a door, given its perimeter and area.


Here is another method: suppose you are told that two numbers, $x$ and $y$, have a certain sum $x+y=S$, and a certain product $xy=P$. How to find $S$ and $P$?

We can use the fact that we know how to solve quadratic equations. Notice that $$(t-x)(t-y) = t^2 - (x+y)t + xy = t^2 - St + P.$$

That means that $x$ and $y$ are precisely the solutions to $$t^2 - St + P = 0.$$

In your specific case, $S=16$ and $P=55$. So we want to find the solutions to $$t^2 - 16t + 55 = 0.$$

The quadratic formula gives $$t = \frac{16 \pm\sqrt{256 - 220}}{2} = 8 \pm\frac{1}{2}\sqrt{36} = 8\pm\frac{6}{2} = \left\{\begin{array}{l} 11\\ 5 \end{array}\right.$$ So the two numbers are $5$ and $11$.

(Of course, we often solve quadratic equations $t^2 + at + b=0$ by figuring out by eyeballing two numbers whose product is $b$ and whose sum is $-a$, but we can always use the quadratic formula to take the guessing out of it.)