Calculus for Biologists Lab Math 1180-002 Spring 2012

advertisement
Calculus for Biologists Lab
Math 1180-002
Spring 2012
Assignment #1 - Newton’s Law of Cooling
Report due date: Tuesday, January 17, 2012 at 9 a.m.
1. Answer any ? bold ? Lab 1 questions here.
2. Include plot1 from the lab. What happens to H(t) as t gets larger? How do you think these solutions would change
if the initial condition were H(0) = 20 instead? What effect does α have on these solutions?
3. Consider the two differential equations we explored in class:
how small versus larger values of α affect dH
dt in either case.
dH
dt
= α(A − H) and
dH
dt
= α(A(t) − H). Describe
4. Include plot2 from Lab 1. For which α does the temperature of the object most closely track the ambient
temperature? Why does this make sense given your previous answer?
5. You will need to create a new script in R for this problem. As in the lab, suppose that the ambient temperature
oscillates with period T according to
2πt
.
A(t) = 30.0 + cos
T
For the differential equation dH
dt = α(A(t) − H), define α = 1 and T = 4 for now. Don’t forget to use ‘period’
instead of T in your code. Choose four different T values ranging from 1 to 10 and write them to the vector Tvalues
in your script.
Tvalues = c(first,second,third,fourth)
Then copy and paste the following lines of code into your script.
## define ambient temperature A(t)
A = function(t) 30 + cos(2*pi*t/period)
## define solution H(t)
H = function(t) 30 + ((alpha*period)^2*cos(2*pi*t/period) +
2*alpha*pi*T*sin(2*pi*t/period) - (alpha* period)^2*exp(-alpha*t))/
((alpha*period)^2 + 4*pi^2)
## plot some stuff
par(mfrow=c(2,2))
for (j in 1:length(Tvalues)){
t = seq(0,5*Tvalues[j],length=1000)
period = Tvalues[j]
plot(t,A(t),type="l",col="black",ann=F)
lines(t,H(t),col="deepskyblue")
title(xlab="t",ylab="A(t), H(t)",main=paste("T=",period))
}
Save the resulting figure and include it in your assignment. For which of your chosen T values does the temperature
of the object most closely track the ambient temperature? Why do you think this is? Pay close attention to the
range of times t for each of the plots in your figure (they should not be the same).
6. Now explore how α will change these results. Choose larger values of α and re-run the code from the previous
problem. You do not need to save these plots. What differences do you notice in each of your four plots as you
continue to increase α?
7. If you placed an object that cooled very slowly in an environment with an oscillating temperature, how well would
you expect the object’s temperature to track the ambient temperature if the frequency of oscillations were fast?
? Save your report as a .pdf file and upload it to Blackboard. Do not include your script.
1 of 1
Download