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. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.