
Last chance! 50% off unlimited learning
Sale ends in
Computes the Taylor series for functions, expressions or characters.
taylor(f, var = "x", order = 1, accuracy = 2, stepsize = NULL)
function, expression or character
character. The variables of f
.
the order of the Taylor approximation.
accuracy degree for numerical derivatives.
finite differences stepsize for numerical derivatives. Auto-optimized by default.
list with components
the Taylor series.
the approximation order.
data.frame containing the variables, coefficients and degrees of each term in the Taylor series.
# NOT RUN {
# univariate taylor series
taylor('exp(x)', var = 'x', order = 3)
# univariate taylor series of arbitrary functions
taylor(function(x) exp(x), var = 'x', order = 3)
# multivariate taylor series
taylor('sin(x*y)', var = c('x','y'), order = 6)
# multivariate taylor series of arbitrary functions
taylor(function(x,y) sin(x*y), var = c('x','y'), order = 6)
# }
Run the code above in your browser using DataLab