Y
Y
yaoleynikov2019-07-18 17:24:58
Mathematics
yaoleynikov, 2019-07-18 17:24:58

How to write a discount formula depending on the quantity of goods?

A - a certain amount of "goods of the same price" from 1 to infinity.
B - the price of the goods which is unchanged.
B - discount depending on the quantity.
= the result should be such that the discount is proportional to the price.
There should never be a 100% discount.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2019-07-18
@sergiks

The first option: the discount grows linearly from 0% to the maximum discount, say 50%, which occurs if you take 70 units of the product, and does not grow further. Google the equation of a line passing through two points.
Second option: use sigmoid (S-plot)y = 1 / (e^x + 1)
5d30899121998751229032.png

R
Rsa97, 2019-07-18
@Rsa97

Easily.
discount = 101% * product quantity

the discount was proportional to the price
Observed by multiplying by the quantity of goods.
Should never be 100% off
Observed, there is either no discount, or it is more than 100%, but never equal to 100%.
And yes, there is enough school arithmetic here, higher mathematics is useless here.

G
Griboks, 2019-07-19
@Griboks

from 1 to infinity.

discount=factor*infinity = infinity>100%
Your problem has no solution. Change the condition so that it can be solved.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question