FST Exponential Functions

255 days ago by mpaul

Suppose a piece of paper is \frac{1}{500} inch thick.

Suppose you tear it in half and stack the halves.

The height of your stack would be \frac{2}{500} inches thick, right?

Suppose you tear it in half and stack the halves 50 times?  How high will the stack be?

  1. 1 foot
  2. 10 feet
  3. 1 mile
  4. 10 miles
  5. past the moon

Here's a little program that will spell out step by step the resulting heights:

height = 1/500 for tear in [0..50]: print 'tears:',tear,'-->', miles = floor(height/12/5280) feet = floor(height/12 - miles*5280) inches = height - 12*(feet+5280*miles) if miles > 0: print miles,'miles', if feet > 0: print feet,'feet', if inches > 0: if inches > 1: print floor(inches), print inches-floor(inches),'inches' height = 2*height 
       

So, if the moon is roughly 250,000 miles away, ...

We can also write an exponential function h(x) that will calculate the height of the stack after n tears:

h(x) = (1/500)*2^x show(h) 
       
height = h(50) height.n(digits = 5) 
       
miles = floor(height/12/5280) feet = floor(height/12 - 5280*miles) inches = height - 5280*miles - 12*feet miles,feet,inches.n(digits = 5) 
       

Exponential Functions

Exponential functions have the form f(x) = a \cdot b^x.

The coefficient a represents an initial amount, such as the thickness of our piece of paper, and b represents a growth factor.

b > 1 represents exponential growth, and 0 < b < 1 represents exponential decay.  b = 1 would simply produce a constant value.

@interact def exponential(a=1,b=e, min = -2, max = 2): f(x) = a*b^x show(plot(f,min, max)) 
       

Click to the left again to hide and once more to show the dynamic interactive window