4.3 Modeling Exponential Data

Example 4.7

Important information:  
(1) the contaminant in seeping into the water at 64 mg/l
(2) the water well where the samples are being tested at starts out at 0 mg/l of contamination

The data is given as follows, note that the second row is the contaminant level difference.  At the start, there is no contamination in the well being monitored, so the difference is 64 mg/l.  After that, the contaminant is picked up

({{Time in months, 0, 1, 2, 3, 4, 5}, {Contaminant level difference, 64, 45.44, 32.26, 22.91, 16.26, 11.55}})

Part 1

From the graph of the data below, it is most definitely possible that the data is exponential (decay) in nature!

WellData = {{0,64},{1,45.44},{2,32.26},{3,22.91},{4,16.26},{5,11.55}};

ListPlot[WellData, AxesLabel->{"time (months)", "contaminant diff (mg/l)"}]

Part 2

RatioWellData =Table[{StringForm[" `` to `` ", WellData[[i]][[1]],WellData[[i+1]][[1]]],WellData[[i+1]][[2]]/WellData[[i]][[2]]},{i,1,Length[WellData]-1}]

TableForm[RatioWellData,TableHeadings->{None,{"Time Increment","Ratios of D"}}]

Part 3

Since we already know the decay rate (the base) to be a=0.71, and we know (Subscript[P, 0])= 64 mg/l, we have solved for the constants unknown in P(t) = (Subscript[P, 0])(a^t)= 64*(0.71^t) .

WellDiff[t_]:=64*(0.71^t)

Part 4

So the function from Part 3 is for the difference in the contamination level.  So to find the contamination level in the actual well, we need to subtract from 64 the function in Part 3.

WellLevel[t_]:=64-WellDiff[t]

WellLevel[t]

Part 5

To determine when the level reaches 57 mg/l, we can simply set the function from Part 4 equal to 57 and solve for t. We do so and find that the level reaches 57 mg/l in approximately 6.46 months.

NSolve[WellLevel[t]==57,t,Reals]

Plot[{WellLevel[t],57,64},{t,0,20},AxesLabel->{"time (months)", "contaminant diff (mg/l)"}]

Example 4.8

We are given that the temperature of a freezer is 6F and we are making ice. The temperature difference between the water and the freezer is measured each minute:

({{Time in minutes, 0, 1, 2, 3, 4, 5}, {Temperature difference, 69.0, 66.3, 63.7, 61.2, 58.8, 56.5}})

IceCubeData = {{0,69.0},{1,66.3},{2,63.7},{3,61.2},{4,58.8},{5,56.5}}

Part 1

We apply the same process as in the previous data to determine if the data is exponential in nature, and the ratio of successive temperatures yields a rather constant value of a=0.96, and this it is exponential.

RatioIceCubeData =Table[{StringForm[" `` to `` ", IceCubeData [[i]][[1]],IceCubeData [[i+1]][[1]]],IceCubeData[[i+1]][[2]]/IceCubeData[[i]][[2]]},{i,1,Length[IceCubeData]-1}]

TableForm[RatioIceCubeData,TableHeadings->{None,{"Time Increment","Ratios of D"}}]

Part 2

We already have the exponential decay factor of a = 0.96, and the initial temperature is (Subscript[T, 0])= 69 F, so the formula is (Subscript[T, diff])(t) = (Subscript[T, 0])(a^t) = 69*(0.96^t).

(Subscript[T, diff])[t_]:=69*(0.96^t)

Part 3

Now we want the actual formula of the water in the ice cube tray itself using the difference formula from Part 2.  We know that the formula from Part 2 is the difference between the temperature of the water and the temperature of the freezer, i.e. (Subscript[T, diff])(t) = (Subscript[T, water])(t)-6 F.  Thus

(Subscript[T, water])[t_]:=(Subscript[T, diff])[t]+6

To put a subscript on something, use ctrl+(Subscript[underscore, like this!])

(Subscript[T, water])[t]

Part 4

Now we want to know when the water will get to a freezing temperature of 32 F. We do this by setting (Subscript[T, water])(t) = 32 and solving for t.  Since t is measured in minutes, we see that the answer is approximately t=24 minutes after being put into the freezer will the water get to 32 F.

NSolve[(Subscript[T, water])[t]==32.0,t,Reals]

Example 4.9

Alright, time for a little CSI or NCIS or whichever crime show you like to watch.  At 6:00 PM a body is discovered in a building whose ambient temperature is 72 F.  Assuming the body started at a temperature of 98.6 F, we have gathered the following data about the temperature difference between the body and the room starting at 6:00 PM.

({{t = hours since 6:00 PM, 0, 2, 4, 6, 8}, {D = temperature difference, 12.02, 8.08, 5.44, 3.65, 2.45}})

Part 1

DBodyData = {{0,12.02},{2,8.08},{4,5.44},{6,3.65},{8,2.45}}

RatioDBodyData =Table[{StringForm["From `` to `` ", DBodyData [[i]][[1]],DBodyData[[i+1]][[1]]],DBodyData[[i+1]][[2]]/DBodyData[[i]][[2]]},{i,1,Length[DBodyData]-1}]

TableForm[RatioDBodyData,TableHeadings->{None,{"Time Increment","Ratios of D"}}]

From the table above, clearly this data is exponential in nature.

Part 2

Using as reference, Exercise 7 from Section 4.1, we need to find the decay factor in terms of degrees F per hour.  But the data is given in terms of 2 hour increments.  So we need to find a base b such that a = 0.67 = (b^2).  Thus b = (a^(1/2)) = (0.67^(1/2))= 0.82.   So now, as with the previous examples, we know the exponential decay factor b= 0.82 and the initial temperature difference (Subscript[T, 0])= 12.02, so (Subscript[T, diff])(t) = 12.02*(0.82^t).

Sqrt[0.67]

(Subscript[T, diff])[t_]:=12.02*(0.82^t)

Part 3

To find the temperature of the body, note that (Subscript[T, diff])(t) = (Subscript[T, body])(t) - 72F, so:

(Subscript[T, body])[t_]:=(Subscript[T, diff])[t]+72

(Subscript[T, body])[t]

Part 4

To solve for the time of death, we need to set (Subscript[T, body])(t) = 98.6 F. Note this should result in a negative value for t.

NSolve[(Subscript[T, body])[t]==98.6,t,Reals]

So the answer from above is -4 hours -- thus approximately 4 hours before 6:00 PM, which would be 2:00 PM.

Exercise 6

You guys are actually most likely old enough to remember Fukushima... On March 11th, 2011 after an earthquake and a tsunami, iodine-131 leaked from the nuclear power plant in Fukushima.  The following table gives the amount of iodine-131 (in becquerels per kilogram) remaining in a sample taken nearly 60 miles away t days after being first observed:

({{time (days), amount of iodine-131 (Bq/kg)}, {0, 54.00}, {1, 49.52}, {2, 45.41}, {3, 41.64}, {4, 38.18}})

Note that 54 Bq/kg is 27 times the allowable government limit.

IodineData = {{0,54.00},{1,49.52},{2,45.41},{3,41.64},{4,38.18}}

Part a.

RatioIodineData =Table[{StringForm["From `` to `` ", IodineData[[i]][[1]],IodineData[[i+1]][[1]]],DBodyData[[i+1]][[2]]/DBodyData[[i]][[2]]},{i,1,Length[IodineData]-1}]

TableForm[RatioIodineData,TableHeadings->{None,{"Time Increment","Ratios of D"}}]

From the ratio data above, the data appears to be exponential, with exponential decay factor a = 0.67.

Part b.

The formula is given by Io(t) = (Subscript[I, 0])(a^t)= 54.00*(0.67^t) since the data is measured in successive days.

Io[t_]:=54.00*(0.67^t)

Part c.

So it appears that after 8.23 days, the levels will be below the required 2 Bq/kg.  However, we need to round this.  The text says to round to closest day, which would be 8 days.  However, we should use 9 days, right?

NSolve[Io[t]==2.0,t,Reals]

Exercise 11

We have the following investment table on a savings account:

({{Time (months), Savings Balance}, {0, $1750.00}, {1, $1771.00}, {2, $1792.25}, {3, $1813.76}, {4, $1835.52}, {5, $1857.55}})

SavingsData = {{0,1750.00},{1,1771.00},{2,1792.25},{3,1813.76},{4,1835.52},{5,1857.55}}

Part a.

The amount of money invested is the amount at 0 months, which is $1750.00

Part b.

RatioSavingsData =Table[{StringForm["From `` to `` ", SavingsData[[i]][[1]],SavingsData[[i+1]][[1]]],SavingsData[[i+1]][[2]]/SavingsData[[i]][[2]]},{i,1,Length[SavingsData]-1}]

The model, using the ratio data above, is A(t) = 1750.00*(1.012^t), where t is measured in months.

A[t_]:=1750*(1.012^t)

Part c.

The monthly interest rate is 1.2% since a = 1.012 = 1.000 + 0.012 above.

Part d.

The yearly interest rate needs to satisfy the equation (1.012^12) = (b^1).  Thus, the APR appears to be 15.39% from the computation below.

(1.012^12)

Part e.

So here we want to calculate the amount after 18 years, which is 18*12 months. This gives the amount to be $23015.90.

A[18*12]

Part f.

To double in value, we simply solve 2*A(0) = A(t) for t.

A[0]

NSolve[2*A[0]==A[t],t,Reals]

A[58]

A[59]

A[2*58]

A[2*58+1]

A[2*58+58]

After 58.11 months (or 4 years and 10 months approximately) the initial investment has doubled.  The same time will be needed to double again, which is the whole point of exponential growth!