taylor: Taylor expansion

View source: R/calculus.R

taylorR Documentation

Taylor expansion

Description

Taylor expansion

Usage

taylor(f, x0 = 0, n = 6)

Arguments

f

Function to be expanded

x0

Point to expand around

n

Order of remainder term

See Also

drop_remainder()

Examples

if (has_sympy()) {
  def_sym(x)
  f <- cos(x)
  ft_with_O <- taylor(f, x0 = 0, n = 4+1)
  ft_with_O
  ft_with_O |> drop_remainder() |> as_expr()
}


r-cas/caracas documentation built on Feb. 28, 2025, 3:39 p.m.