1.10 Answers to the Problem Set

General

  1. A(T) represents the total change in the resource. Thus the rate of change, P(t), is integrated: A(T)=T0P(t)dt
  1. With P(t)=P0ekt, A(T)=T0P0ektdt=(P0/k)(ekT1)
  2. The initial use rate in P0, the rate of increase is k, and the time interval ends at 1983-1973 = 10 years. Thus
P0= 6.99 * 10^9 #kg
k=0.08
T=10.0 #years


#Estimate A(T) in kg
(P0/k)*(exp(k*T)-1)
## [1] 107081638627
  1. We solve for T. The total change equals the current reserves (at t=0); thus, the parameters are
require("stats")
library(stats)

P0= 6.99 * 10^9 #kg
k=0.08
A_T= 336 * 10^9 #kg

#Using A(T)= (P0/k)*(exp(k*T)-1)
#Solve T in years
Tsolve= function(T) (P0/k)*(exp(k*T)-1) - A_T
uniroot(Tsolve, interval=c(0, 100))$root
## [1] 19.72562

2a. Check the initial conditions: N(0)=5000, W(0)=80.

N_t= function(time) 5000*exp(-0.5*time)
N_t(0)
## [1] 5000
W_t= function(time) 10000*(1-0.8*exp(-0.05*time))^3
W_t(0)
## [1] 80
#Biomass B(t)=N(t)*W(t)
#Calculate biomass at 12 months
B_t= function(time) 5000*exp(-0.5*time) * 10000* 
  (1-0.8*exp(-0.05*time))^3
B_t(12)
## [1] 21876.47
  1. Average biomass (g) for the first 12 months, ¯B(12) uses the definite integral. ¯B(12)=(1/12)120B(t)dt Substitution for B(T) gives ¯B(12)=(1/12)1205.0×107e0.5t(10.8e0.05t)3dt ¯B(12)=4.17×106120e0.5t(10.8e0.05t)3dt Integrate by parts where u=(10.8e0.05t)3 and dv=e0.5tdt 120e0.5t(10.8e0.05t)3dt

=e0.5t0.5(10.8e0.05t)3|120120e0.5t0.5(3)(10.8e0.05t)2(0.04)e0.05tdt =(0.00496)(0.177)+0.016+0.24120e0.55t(10.8e0.05t)2dt Integrate by parts again with u=(10.8e0.05t)2 and dv=e0.55tdt An intermediate stage is (two steps skipped), with the left side included, 120e0.5t(10.8e0.05t)3dt=0.0324+0.0349120e0.60t(10.8e0.05t)dt =0.0324+0.0349120e0.60t0.8e0.65tdt=0.0324+0.0349(0.4353)=0.0476

#Biomass B(t)=N(t)*W(t)

#Calculate average biomass (g) for the first 12 months
(4.17*10^6)*(0.0476)
## [1] 198492
B_t= function(time){5000 * exp(-0.5 * time) * 10000 * 
  (1 - 0.8 * exp(-0.05 * time))^3}

#Initial biomass in g
B_t(0)
## [1] 4e+05
#Plot the graph of biomass over time. 
plot(0:12, B_t(0:12)/10^3, ylab="Production (kg)", 
     xlab= "Time (months)", type='l')

3a. The rate of change of N is a decrease (i.e. negative) and proportional to N. For k>0, we have dNdt=kN.

  1. Separate variables dNN=kdt dNN=kdt lnN=kt+C, C = integration constant N=ekteC But N(0)=N0. Thus N(0)=N0=e0eC=eC and the solution is N(t)=N0ekt.

  2. Substitute into the solution equation. N(t1)=N0ekt10.5N0=N0ekt1ln(0.5)=kt1t1=(ln(0.5))/k=(ln2)/k

  3. Let N(t) be the number of C14 atoms in the wood. Then N(t)/N0=0.87. The half life of 5568 gives (ln2)/k=5568, k=(ln2)/5568=0.0001245. The equation for N(t) then gives N(t)/N0=ekt0.87=exp(0.0001245t)ln(0.87)=0.0001245tt=1119years

  1. a is the amplitude (half the total change in tidal height); b is 2π/p where p=period=2|ThighTlow|; and Th is the phase shift or lag. The simple cosine function begins at t=0 so the lag is the time of high tide. Ha is the vertical shift.
#first interval
h_h= 2.47
h_l= -0.82
time_h= 4+35/60
time_l= 11+40/60

#second interval
h_h= 2.77
h_l= -0.82
time_h= 19+40/60
time_l= 11+40/60
  
a= (h_h-h_l)/2
p= 2*abs(time_h-time_l)
b=2*pi/p
time_h= time_h #phase lag, time of high tide
Ha= (h_h+h_l)/2

a; p; b; time_h; Ha
## [1] 1.795
## [1] 16
## [1] 0.3926991
## [1] 19.66667
## [1] 0.975
H=function(a,b,time, time_h, Ha) a*cos(b*(time-time_h))+Ha
plot(1:24, H(a=a,b=b,time=1:24, time_h=time_h, Ha=Ha), type='l', 
     xlab="Tide height (m)", ylab="Time (hours)")

b. ¯H= average height, first interval = 7.24 hours. ¯H=17.2411.824.58acos(bTbTh)+Hadt=17.24(a/b)(sin(11.82b4.58b)sin(4.58b4.58b))+17.24(Ha)(11.824.58)=a7.24b(sin(7.24(2π/2(7.24)))0)+Ha=Ha, since sinπ=0.

For the two intervals combined, we must weight the average height in each interval by the length of the time interval. ¯H=115.0919.674.58H(t)dt=115.0911.824.58H(t)dt+115.0919.6711.82H(t)dt=7.2415.0917.2411.824.58H(t)dt+7.8515.0917.8519.6711.82H(t)dt=7.2415.09¯H1+7.8515.09¯H2

  1. We need the times of day when the 0.0 tide level is reached. The easiest way is to invert the function H(t) for each subinterval. H=acos(b(TTh))+Ha(HHa)/a=cos(b(TTh))cos1((HHa)/a)=b(TTh)(1/b)cos1((HHa)/a)+Th=T Now substitute the appropriate constants and 0 for H.
#first interval
h_h= 2.47
h_l= -0.82
time_h= 4+35/60
time_l= 11+40/60

#second interval
h_h= 2.77
h_l= -0.82
time_h= 19+40/60
time_l= 11+40/60
  
a= (h_h-h_l)/2
p= 2*abs(time_h-time_l)
b=2*pi/p
time_h= time_h #phase lag, time of high tide
Ha= (h_h+h_l)/2

H=0

#Estimate T
(1/b)*acos((H-Ha)/a)+time_h
## [1] 25.12889

This answer is obviously wrong since the 0.0 height must be attained sometime between low tide (11.82 hours) and the next high tide (19.67 hours). The fallacy is in treating the “arcos x” as an inverse function. It is one-to-one only when the domain of “cos x” is restricted to [0,π]; i.e., arcos x always has [0,π] as its range. Thus the first term is 10.400cos1(0.975/1.795) correctly tells how far the maximum (Th) is from the desired time T, but now whether T lies above or below Th. With the second subinterval, T is obviously below Th and hence we subtract from Th:

19.67-1/0.400*acos(-0.975/1.795)
## [1] 14.30747

EB=ni=12[Axi+Byi]E=ni=1[Axi+Byi]2EA=ni=1[Axi+Byi]xi Set equal to zero: ni=12[Axi+Byi]xi=0ni=1[Axi+Byi]xi=0EB=ni=12[Axi+Byi]

Equate to 0 and divide by 2: ni=1[Axi+Byi]=0 Thus we have two equations which are linear in A and B. This is more easily seen if we rework them. From (1.30)

A(ni=1x2i)+B(ni=1xi)(ni=1xiyi)=0

And (1.31) becomes A(ni=1x2i)+nB(ni=1yi)=0

  1. Eq. (1.32) is: A(1353.25)+B(65.90)(3750.50)=0 Eq. (1.33) is: A(65.90)+5B(268.50)=0

We solve for A and B.

B=(268.5065.90A)/5A=(3750.5065.90B)/(1353.25)=2.7712.615+0.642A=0.156+0.642A

Thus

A=0.156/(10.642)=0.436B=(268.5065.90(0.436))/5=47.95

To prove that these values for A, B do give a minimum sum of squares, we must show that, for A = 0.44, B = 47.95,

  1. f/A=f/B=0
  2. (2f/A2)(2f/B2)(2f/AB)2>0
  3. 2f/A2>0,

where f is the sum of squares f=i(yiAxiB)2 We have f/A=2i(yiAxiB)xif/B=2i(yiAxiB)

Since A, B were calculated by setting these derivatives to zero, we do not need to check (i). 2f/A2=2ix2i,2f/B2=2n2f/AB=2ixi

Substituting into (ii) gives (2ix2i)(2n)4(ixi)2=20ix2i4(ixi)2 =20(1353.25)4(65.90)2 =9693.76>0 Note that (iii) is obviously satisfied so we have a minimum for f.

  1. Begin with y=AxeBx Divide by x to isolate the exponential function. y/x=AeBx Now take logarithms of both sides. ln(y/x)=lnA+Bx Thus, in the form h=f+gx, we have h=ln(y/x)f=lnAg=B

The transformed table is below.

x h
3.0 2.565
5.3 2.340
9.6 1.790
18.0 1.204
30.0 0.642

The least squares calculations give the transformed equation

h=2.6420.071x

and thus

y=14.041xe0.071x

  1. The following graph 1.20 compares the least squares line and exponential curve of parts (a) and (b) with the data and the exponential curve in the text eqn. (1.12). The fit of eqn. (1.12) seems superior to that of the curve from (b). However, the fit of

h=2.6420.071x

to the transformed data is quite good, as shown by figure 1.21. Thus we conclude that a good least squares fit to transformed data does not necessarily imply a good curve fit to the original data.

Comparison of fitted growth functions.

Figure 1.20: Comparison of fitted growth functions.

Least squares line of transformed data.

Figure 1.21: Least squares line of transformed data.