Don't even know what to call it.

Template

New member
Joined
Feb 15, 2012
Messages
3
I'm modifying some code and have come upon a mathematics problem that I can't solve.

Firstly, we have a value that is worked out as:

a = 10 + (2.5 * b)
c = 10 + (2.5 * (d + b))
e = d * (a + c) / 4

Next, there is a value we can call F. I need an equation to give the maximum value of d before e > F.

Hopefully I've made this clear enough & there's someone able and willing to help.
 
I'm modifying some code and have come upon a mathematics problem that I can't solve.

Firstly, we have a value that is worked out as:

a = 10 + (2.5 * b)
c = 10 + (2.5 * (d + b))
e = d * (a + c) / 4

Next, there is a value we can call F. I need an equation to give the maximum value of d before e > F.

Hopefully I've made this clear enough & there's someone able and willing to help.

from the equations given:

a + c = 20 + 5 * b + 2.5d

d = (a + c -5b -20 )/2.5

Since you did not put any bounds on a, b & c, we cannot put any bounda on d.
 
Hello, Khan. Thanks for your input on this.

From your response, I fear I may not have explained properly what my intentions are.

When calculating the value of e, we know the values b and d.
When working with F in a separate calculation, the goal is to determine what the value of d would have to be to get e as close as possible to F. For this, we only know F and b.

So if for example F = 25 and b = 1, the desired equation would determine that the highest possible value of d is 3 - which, if used in the first calculation, would make e = 24.375.

Thanks again.

[edit]

To try to help visualise what these calculations are for: Let's say the first one is designed to determine the price (e) of apples based on how many you already own (b) and how many you're trying to buy (d), due to the price increasing with each purchase.

The goal for the elusive second equation is to determine, with a certain amount of money (F) and already owning a certain amount of apples (b), how many apples can you buy (d) based on how their price increases according to calculation one.
 
Last edited:
That diddly did the job. I'll save this somewhere and see what I can learn from your method of working it out.

Thanks again to all who participated.
 
Top