Finding two numbers given their sum and their product
Which two numbers when added together yield $16$, and when multiplied together yield $55$.
I know the $x$ and $y$ are $5$ and $11$ but I wanted to see if I could algebraically solve it, and found I couldn't.
In $x+y=16$, I know $x=16/y$ but when I plug it back in I get something like $16/y + y = 16$, then I multiply the left side by $16$ to get $2y=256$ and then ultimately $y=128$. Am I doing something wrong?
$\endgroup$ 49 Answers
$\begingroup$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)$.
$\endgroup$ 3 $\begingroup$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.
$\endgroup$ 1 $\begingroup$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.)
$\endgroup$ $\begingroup$The average of $x$ and $y$ is $16/2 = 8$, their product is $xy = 55$therefore:
$x, y = 8\pm\sqrt{8^2-55}\\= 8\pm \sqrt9\\ = 8 \pm 3\\\implies x, y = 11, 5$
by: GeorgeB reference: Vedic Book
$\endgroup$ 2 $\begingroup$If $x+y=16$ and $xy=55$, then, since $\dfrac{x+y}{2}=8$, we can let $x = 8-z$ and $y=8+z$ and it won't hurt to suppose that $z$ is positive..
Then
\begin{align} xy &= 55 \\ (8-z)(8+z) &= 55 \\ 64 - z^2 &= 55 \\ z^2 &= 9 \\ z &= 3 \\ x &= 8-3 = 5 \\ y &= 8+3 = 11 \end{align}
$\endgroup$ $\begingroup$let the sum be S and the product be P
you can get the two numbers x and y using the following formulas:
$$ x = \frac{S + \sqrt{S^2 - 4P}}{2} $$
$$ y = \frac{S - \sqrt{S^2 - 4P}}{2} $$
I've done the math just like above
$\endgroup$ $\begingroup$My favorite way
Square the sum to get $S^2=a^2+2ab+b^2$.
Get the squared difference $D^2=a^2-2ab+b^2=S^2-4P$ by deducting four times the product.
Then $a,b=\dfrac{S\pm D}2$.
$\endgroup$ 1 $\begingroup$should be
x = (S + ((S^2 - 4P)^(1/2)))/2
y = (S - ((S^2 - 4P)^(1/2)))/2
i.e. raising to the power of a half is taking the square root. raising to the power of -2 is the reciprocal of the square.
$\endgroup$ 1 $\begingroup$Given $$ x + y = 16 \tag{1} $$
and $$ x \cdot y = 55. \tag{2} $$
We can use the identity: $$ ( x-y)^2 = ( x+y)^2 - 4 \cdot x \cdot y \tag{3} $$to get$$ x - y = \sqrt{256 - 4 \cdot 55} = \sqrt{36} = \pm \, 6. \tag{4} $$
Finding half sum and half difference of equations (1) and (4) gives us
$$ (x,y) = (11,5) , \, (5,11) \tag{5} $$
$\endgroup$