A seemingly impossible task, help sought

greedylobster

New member
Joined
Sep 17, 2022
Messages
4
Hello all, this is rather embarrassing and the answer is simple, but it's been a long time since I did maths.
I'm trying to write a formula that would allow to "process"a number.
This is how it works:
there is a number, say 50

within that 50, values 1-10 are multiplied by 100
values 11-20, are multiplied by 50
anything above 20 (i.e. 21 and over), multiplied by 20 with the final answer being the sum of the three

Example:

5
5 x 100 = 500

15
10 x 100 = 1000
5 x 50 = 250
1000 + 250 = 1250

20
10 x 100 = 1000
10 x 50 = 500
1000 + 500 = 1500

25
10 X 100 = 1000
10 x 50 = 500
5 x 20 = 100
1000 + 500 + 100 = 2600

is it possible to have a "universal" formula that would cover the process?

I'd be greatful for any help/ direction...
 
First, yes it is possible to write a formula, but it is not going to be simple.

Second, your text and example do not seem to match

Values 1-10 are multiplied by 100.

When I read that, I thought you meant that if n is 5, then

[math]s = 100 \times 1 + 100 \times 2 + 100 \times 3 + 100 \times 4 + 100 \times 5 \implies\\ s = 100 \times (1 + 2 + 3 + 4 + 5) \implies \\ s = 100 \times 15 \implies \\ s = 1500.[/math]
But in your example, if n is 5, you get [imath]s = 5 \times 100 = 500.[/imath]

Please give the COMPLETE AND EXACT wording of the problem. What is the source or context of the problem?
 
First, yes it is possible to write a formula, but it is not going to be simple.

Second, your text and example do not seem to match

Values 1-10 are multiplied by 100.

When I read that, I thought you meant that if n is 5, then

[math]s = 100 \times 1 + 100 \times 2 + 100 \times 3 + 100 \times 4 + 100 \times 5 \implies\\ s = 100 \times (1 + 2 + 3 + 4 + 5) \implies \\ s = 100 \times 15 \implies \\ s = 1500.[/math]
But in your example, if n is 5, you get [imath]s = 5 \times 100 = 500.[/imath]

Please give the COMPLETE AND EXACT wording of the problem. What is the source or context of the problem?
Hi JeffM, thanks for your reply and points.

It is essentially amount of fluid required by average human organism per 24h.
- for first 10kg of weight it is 100mL for every 1kg
- for the second 10kg it is 50mL for every 1kg
- for every 1kg over 20kg it is 20mL for every 1kg

then, you sum up the numbers up and have daily requirement

EXAMPLE:
if the weight of the human being is 5kg, they would require 500mL of fluid every 24h
5kg x 100mL = 500mL

if the weight is 15kg, then the requirement will be 1,250mL
1,000mL for the first 10kg (10kg x 100mL = 1000mL) plus 50mL for every 1kg over 10kg (5kg x 50mL = 250mL)

for a human weighing 25kg, the 24h requirement is 1600mL
1,000mL for the first 10kg (10kg x 100mL = 1000mL), plus 500mL for the second 20kg, i.e. 50mL for every 1kg over 10kg (10kg x 50mL = 500mL),
plus, 100mL for 5kg over 20kg body weight, i.e. 20mL for every 1kg 20kg (5kg x 20mL = 100mL)

then we sum up 1,000mL + 500mL + 100mL = 1,600mL

respectively, for a person weighing 47kg the numbers would be as follows:
1st 10kg x 1000mL = 1,000mL
2nd 10kg x 50mL = 500mL
the remaining 27kg 27kg x 20mL = 540mL
1,000mL + 500mL + 540mL = 2,040mL/24h

I hope this makes more/ better sense

thanks again for your time
 
Do you mean that the number of values between 1 and 10 ? At least this is the way your examples seem to interpret your text.
thanks, blamocur,
yes your reading is correct
- for any value between 1 and 10, the multiplier is 100
- for any value between 11 and 20, the multiplier is 50
- for any number over 21, the multiplier is 20
lastly one just sums up the results

thanks again for your reply
 
You already know the formula in words. The technical term for it is a “piece-wise function.” The formula in mathematical notation is

[math] \text {If } 0 \le n \le 10, \text { then } s = 100 \times n;\\ \text {If } 10 < n \le 20, \text { then } s = 1000 + \{50 \times (n - 10)\}; \text { and}\\ \text {If } n > 20, \text { then } s = 1500 + \{20 \times (n - 20)\}, \text { where} \\ n = \text {the weight in kilograms and } s = \text { the fluid required in milliliters}. [/math]
 
Last edited:
You already know the formula in words. The technical term for it is a “piece-wise function.” The formula in mathematical notation is

[math] \text {If } 0 \le n \le 10, \text { then } s = 100 \times n;\\ \text {If } 10 < n \le 20, \text { then } s = 1000 + \{50 \times (n - 10)\}; \text { and}\\ \text {If } n > 20, \text { then } s = 1500 + \{20 \times (n - 20)\}, \text { where} \\ n = \text {the weight in kilograms and } s = \text { the fluid required in milliliters}. [/math]
How nice and simple, thanks very much JeffM, just putting things together, if your brain thinks in different categories is not always as effortless.
Thanks heaps again!
 
How nice and simple, thanks very much JeffM, just putting things together, if your brain thinks in different categories is not always as effortless.
Thanks heaps again!
It is not so much different categories. Math notation is a language. If you can express a quantitive idea in English, it can be expressed in mathematical notation if you know that language’s vocabulary and grammar. The advantages of expressing the idea in mathematical notation are (1) mathematical notation, as an artificial language, contains many fewer ambiguities than a natural language like English, and (2) an idea fully expressed in mathematical notation is understood by anyone trained mathematically, no matter what his or her native language may be.
 
Top