This problem seems to require algebra with fractions. This is basic high school (or even middle school?) stuff, but embarrassingly, I seem to have forgot it.
Background
I own a small business and was trying to calculate what kind of discounts I would offer if I wanted to achieve a desired profit margin.
I'm calculating profit margin in this way:
Original price: 200 (p) Cost to complete service: 80 (c) Discount: 20 (d) Profit margin (m) = (p-d-c) / (p-d) = .555 (55.5%)
I put together a spreadsheet trying to figure the different discounts that I'd need in order to achieve a desired profit margin. This means I need to solve for d, unfortunately, I completely forgot how to isolate d in this circumstance (fraction with arithmetic on the top and bottom).
Question
How do you solve for d in:
(p-d-c) / (p-d) = m (m is for profit margin)
First, multiply on both sides by the denominator to eliminate the fraction: $$p-d-c = m(p-d) = mp - md$$
Then move all the terms containing $d$ to one side, and everything else to the other side: $$md - d = mp -p + c$$
Now factor out the $d$. $$(m-1)d = mp - p + c$$
Finally, divide by the factor to get an expression for $d$. $$d = \frac{mp - p + c}{m-1}$$