# Adding up percentages over a continuous function

• Jun 19th 2010, 01:54 AM
rainer
Adding up percentages over a continuous function
Hi,

I'm trying to figure out how to add percentages along a continuous curve--that is to say for any function f(x) where for a given x, f(x) is a percentage consumed or expended.

To make it easier to conceptualize, consider the function $f(t)=\cos{t}+1$. Say this gives us the percentage of a birthday cake eaten by a given time t over the course of three days.

$0 is the birthday on which the eating begins and $t=\pi$ is the end of the third day when the cake is finished. The curve reveals that the largest percentage of the cake is eaten on the birthday. A smaller portion eaten on the second, and just a few bites are left to consume on the third day.

Is there a function that can sum up the percentages over the time period $\pi$ so that they equal 100%?

Thanks
• Jun 19th 2010, 04:13 AM
HallsofIvy
Quote:

Originally Posted by rainer
Hi,

I'm trying to figure out how to add percentages along a continuous curve--that is to say for any function f(x) where for a given x, f(x) is a percentage consumed or expended.

To make it easier to conceptualize, consider the function $f(t)=\cos{t}+1$. Say this gives us the percentage of a birthday cake eaten by a given time t over the course of three days.

Actually, that example doesn't make a whole lot of sense. cos(t) is a decreasing function. f(0)= 2 and $f(\pi/2)= 1$. How is that "the percentage of a birthday cake eaten by a given time t"?

In any case, you "sum" a continuous function by integrating. Given a function af(t) where a is an as yet undetermined constant, you can make the "sum" equal to 100%= 1.0 "over time period $\pi$" by choosing a so that $a\int_0^\pi f(t)dt= 1.0$ or $a= \frac{1}{\int_0^\pi f(t) dt}$.

Quote:

$0 is the birthday on which the eating begins and $t=\pi$ is the end of the third day when the cake is finished. The curve reveals that the largest percentage of the cake is eaten on the birthday. A smaller portion eaten on the second, and just a few bites are left to consume on the third day.

Is there a function that can sum up the percentages over the time period $\pi$ so that they equal 100%?

Thanks
• Jun 19th 2010, 06:10 AM
rainer
Quote:

Originally Posted by HallsofIvy
Actually, that example doesn't make a whole lot of sense. cos(t) is a decreasing function. f(0)= 2 and $f(\pi/2)= 1$. How is that "the percentage of a birthday cake eaten by a given time t"?

Ah yes, forgive me. It should be at a given time t.

The problem then is this: based on piecewise measurments of "cake eaten" taken at various points during the time period 0-pi, it is found that the continuous function f(t) gives the % of cake dished up and eaten at any given time t (0<t<pi). Not the cumulative by that time. So, the fact that f(t) is decreasing just means that as time progresses smaller and smaller portions of the whole cake are being dished up and eaten.

My confusion is that the individual percentages at each time t must add up to 100%, but if you actually sum these individual percentages you get--it seems to me--way too big a number. Is the area under the curve from 0 to pi really 100%? The piecewise measurements add up to 100%, sure, but then when you are dealing with a continuous curve it had seemed to me you're adding infinitessimals which--so it had seemed to me--will give an unbounded result.

Thanks for your solution. Just to make sure I understand...

$\int_{0}^{\pi}\cos{t}+1\; dt=\pi$

So you're saying I have to set $\pi\equiv1.0 \;(or\; 100\%)$?

And given that at t=0 $f(0)=\cos{0}+1=2$, you're saying that the largest percentage of the cake dished up (call it "L") at any time t is $L=\frac{2}{\pi}=0.6366197724\;or\;63.66\%$?