[R] higher derivatives using deriv

alexander16 tobias.etzel at gmail.com
Tue Jan 3 20:47:29 CET 2012


Dear Spencer, Dear Ted,

thanks for your quick and detailled answers.

I should have indicated that I use the Ryacas package - for example:

library(Ryacas)
x <- Sym("x")
Simplify(deriv(x^3),x,2))

Just now I have realized that the deriv function is translated
to the Deriv function in yacas, which seems to be identical to the D
function in yacas. For instance:
deriv(sin,x) translates into Deriv(x)Sin(x) which again is equal to
D(x)Sin(x).

Now "D(x,n) expression" will give the n-th derivative with respect to x in
yacas.
Apparently sending deriv to yacas as in my example results  in
Deriv(x,2)x^3.

Thanks again for your help!
alex



--
View this message in context: http://r.789695.n4.nabble.com/higher-derivatives-using-deriv-tp4256118p4258257.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list