you can model company A with one equation.
that equation would be:
y = .85*x
y is the sale price.
x is the retail price.
you cannot model company B with one equation.
at least i haven't been able to.
it requires programmed logic and 2 equations to handle it.
the first equation does not apply any discount up to 20 dollars.
the second equation applies 20% discount if the value of the order is greater than 20 dollars.
the question then remains as to whether the discount is applied to the whole order or just to the part of the order that is greater than 20 dollars.
i'll assume the 20% discount only applies to the amount over the 20 dollars spent.
the equation for company B would be:
if the retail price is less than or equal to 20 dollars than:
y = x
if the retail price is greater than 20 dollars, then:
y = .80 * (x-20) + 20
here's a small table of the difference in cost to the customer.
retail price company A sale price company B sale price
0 0 0
20 17 20
40 34 36
60 51 52
80 68 68
100 85 84
looks like the cut-over point is when the retail price is 80 dollars.
we can find the cut-over price by formula.
for company A, S = .85x
for company B, S = .80(x-20) + 20
make .85x = .80(x-20) + 20 and you'll find the cut-over point.
expand this equation to get:
.85x = .80*x - .8*20 + 20 which becomes:
.85x = .80x - 16 + 20 which becomes:
.85x = .80x + 4
subtract .80x from both sides of the equation to get:
.05x = 4
divide both sides of the equation by .05 to get:
x = 4/.05
simplify this to get:
x = 80
that's the cut-over point when company B discount becomes better than company A discount.