taylor

0th

Percentile

Taylor Series

Computes the Taylor series for functions, expressions or characters.

Usage
taylor(f, var = "x", order = 1, accuracy = 2, stepsize = NULL)
Arguments
f

function, expression or character

var

character. The variables of f.

order

the order of the Taylor approximation.

accuracy

accuracy degree for numerical derivatives.

stepsize

finite differences stepsize for numerical derivatives. Auto-optimized by default.

Value

list with components

f

the Taylor series.

order

the approximation order.

terms

data.frame containing the variables, coefficients and degrees of each term in the Taylor series.

Aliases
  • taylor
Examples
# 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)

# }
Documentation reproduced from package calculus, version 0.1.0, License: GPL-3

Community examples

Looks like there are no examples yet.