# Functions, Exponents, and Egg-Producing Hens

What is a function? One way of looking at it is as a rule that maps the elements of one set onto the elements of another. For example, given the set A = {apple, orange, pear}, and the set B = {red, orange, yellow}, the elements of A could map onto the elements of B like so:

```         apple -> red
orange -> orange
pear -> yellow
```

The arrow represents the mapping performed by the function. In this case, we might describe the function f applied to x as “get the color of x”. Thus, f(‘pear’) -> ‘yellow’.

Some of my favorite functions are exponential functions, e.g., f(x) = c^x, where c stands for some constant (it doesn’t matter which – it could be 3 or 2.96e12).

Likewise, one of my favorite constants called e. The most practical applications of e have to do with measuring growth rates.

Say for example that you farm chickens for a living. Since your chicken farm is a small one (left to you by your grandfather, perhaps?), you have only 82 chickens. As you know, chickens lay a lot of eggs, so let’s assume that roughly 75% of the eggs are harvested to sell, and your family manages to eat or give away to friends another 5%. This leaves 20% or so of your eggs which will be fertilized and eventually hatch. Assuming a roughly even distribution of male and female chicks, about 10% of the eggs you produce will become egg-laying hens themselves.

Sitting around the kitchen table in the farmhouse one night, you decide that you’d like to double the number of egg-producing hens you have now. You wonder how long it will take, so you get out your trusty calculator and compute the following table:

Year Egg-laying Hens

0 82
1 90.2
2 99.22
3 109.14
4 120.06
5 132.06
6 145.27
7 159.80

It’s not too difficult; you simply multiply your existing number of hens by ten percent and add the result to the principal. Alternatively, you can multiply the total number by 1.1 every year – either way will work, and will eventually show you that it will take about seven years to double your stock of egg-laying hens at your current rate.

What does this have to do with e? Quite a lot, actually. The formula e^rt is used (where r is the rate of change and t is the elapsed time). Since in our chicken farm example the rate of change is 10%, and it takes approximately seven years to double the number of egg-laying hens, we plug in the appropriate values for r and t and find that

e^rt = e^(0.1)(7) = e^0.7 = 2.014

The resulting value, 2.014, is then multiplied by our initial principal to yield an answer of 165.15. Our previous calculations were good enough (about 97% accurate compared to this one), but this method generalizes to other compound growth rate problems. And of course, it’s better for use in a computer program.