# Thread: Finding two numbers using their difference and their percentages of their sum

1. ## Finding two numbers using their difference and their percentages of their sum

I know I've studied this before, but for whatever reason I can't figure it out. I want to find two positive numbers. What I know is the difference between them and the percentages of their sum that they represent. I've been tinkering around and I came up with a formula that finds some relation, but doesn't get me to solve for those two numbers. Here's what I've been toying around with:

H = D + S(1 - P)

Where:
H = the higher number
D = the difference of the two numbers
S = the sum of the two numbers
P = the higher number's percentage of the sum of the two numbers

I feel like I'm on the wrong track by going about it this way, but what I've been trying to do with this is get all possible D's and P's on one side and H's and S's on the other. I can't seem to make that happen without creating duplicate variables that I can't formulate out. I start going all over the place like this:

H = D + S(1 - P)
H - D = S(1 - P)
(H - D)/(1 - P) = S
(H - D)/S = 1 - P
H/S - D/S = 1 - P
H/S = (1 - P) + D/S (has H and S on one side, but duplicates S on the other)

Like I said, I'm probably going about this all wrong, but I would like a start in the right direction.

2. let the two numbers be $\displaystyle x$ and $\displaystyle y$ such that $\displaystyle x > y$

first, you know the difference ... $\displaystyle d = x - y$

second, you know the percentage the higher number is of the sum ... $\displaystyle p = \frac{x}{x+y}$ , where $\displaystyle p$ is the percentage represented as a decimal.

solve for $\displaystyle y$ in the difference equation ... $\displaystyle y = x - d$

substitute $\displaystyle (x - d)$ into the percentage equation for $\displaystyle y$ ...

$\displaystyle p = \frac{x}{x+(x-d)} = \frac{x}{2x-d}$

solve for $\displaystyle x$ ...

$\displaystyle p(2x-d) = x$

$\displaystyle 2px - pd = x$

$\displaystyle 2px - x = pd$

$\displaystyle x(2p - 1) = pd$

$\displaystyle x = \frac{pd}{2p-1}$

use $\displaystyle y = x - d$ to determine $\displaystyle y$

3. Of course! Differences, sums, and percentages are just representations of math problems one step deeper. I should have known. And knowing x gives me y. Thank you!

4. Originally Posted by Khavanon
Of course! Differences, sums, and percentages are just representations of math problems one step deeper. I should have known. And knowing x gives me y.
Yep. You have to find H (high number) and L (low number).
You're given D (difference) and P (percentage of H to sum)

H = PD / (2P - 1)
L = H - D