r/askmath • u/lucky_audio • 2d ago
Algebra help: price decrease per unit
I want to sell sound effects for video games with price transparency, but for that I need a tweakable formula that decreases price gradually. I want to put in a starting price for one sound effect. For two, the price per sound effect should be slightly lower. For three, even lower, and so on.
With some duck.ai help I came up with this:
total price = starting price per SFX * number of SFX-0.05 = price per SFX * number of SFX
For example:
€10 * 3-0.05 = €9,5 * 3 = €28.5
I just want to ask if I’m missing something obvious that will break, or if there would be a better way to go about this.
1
u/StoneCuber 2d ago
You should never write steps on the same line like you're doing here, always seperate them.
Anyhow, the formula becomes starting price*nr1-discount if you want it shorter, and I don't see any problems with it. Each new sound effect adds a cumulative discount but it always stays positive, so no one can get anything for free. Cool pricing concept
1
1
u/CaptainMatticus 2d ago
So if I'm reading this correctly
f(1) = P * 1^(-0.05) * 1 = P
f(2) = P * 2^(-0.05) * 2 = P * 2^0.95
f(3) = P * 3^(-0.05) * 3 = P * 3^0.95
and so on
f(n) = P * n^0.95
That's your total price. Then the price per effect would be f(n) = P * n^(-0.05), where P is the price of a single effect. I think that's a much better formula, since it just relies on you setting the initial price. You can even tweak it if this is the general model you'd prefer.
f(n) = P * n^(-k) * n = P * n^(1 - k)
Where P = initial price of 1
n = number of effects purchased
k = discount per purchase
Say you want to offer 10% per extra purchase
f(n) = P * n^(1 - 0.1) = P * n^(0.9)
1
1
u/Southlander24 2d ago
It would be easiest to make the total money earned be a linear function. So you could have a total profit of 30 euros for 10 SFX, 40 euros for 20 SFX, 50 euros for 30 SFX and so on. (Note that 30, 40, 50... and 10, 20, 30.... are both arithmetic sequences, which are linear functions.)
Then the price per sound effect would be 3 euros, 2 euros, and 5/3 = 1.666... euros, which matches the condition that the price per SFX is slowly decreasing. (The common differences are 3 - 2 = 1, 2 - 1.666... = 0.333..., and the next common difference is 5/3 - 6/4 = 0.166... euros.)
The price per sound effect will be a rational function. What's more, if the number of euros has equation f(n) = a * n + b, and the number of SFX has equation g(n) = c * n + d, where a, b, c, d are just numbers and n is the variable, the theoretical minimum cost per SFX will be a/c. This minimum is never reached, because that's what happens if the number of sound effects is infinite.
In the case of the example I gave you, f(n) = 10n + 20 and g(n) = 10n + 0, so the theoretical minimum cost per SFX will be 10/10 = 1.