I would like to calculate a first and second derivative and am having
problems finding a simple solution.  My syntax may be off as I am not a
mathematician, so pardon ahead of time.
data:
t<-seq(0,4, by=.1)
The function is:
H(t) = t^3-6*t^2+5*t + 30

from here I plot the curve:
plot(x,y ,xlab="x-values", ylab="f(x)", type="l")
But would like to similarly plot the curve for both the first and second
derivatives.
I can calculate the derivatives by hand but would like to get R to do this
for me.
by hand:
H'(t) = 3*t^2 - 12*t + 5
H''(t) = 6*t-12
Keith

-- 
M. Keith Cox, Ph.D.
Alaska NOAA Fisheries, National Marine Fisheries Service
Auke Bay Laboratories
17109 Pt. Lena Loop Rd.
Juneau, AK 99801
Keith.Cox@noaa.gov
marlinkcox@gmail.com
U.S. (907) 789-6603

	[[alternative HTML version deleted]]

