deriv.mpoly: Compute partial derivatives of a multivariate polynomial.

View source: R/deriv.mpoly.R

deriv.mpolyR Documentation

Compute partial derivatives of a multivariate polynomial.

Description

This is a deriv method for mpoly objects. It does not call the stats::deriv().

Usage

## S3 method for class 'mpoly'
deriv(expr, var, ..., bring_power_down = TRUE)

Arguments

expr

an object of class mpoly

var

character - the partial derivative desired

...

any additional arguments

bring_power_down

if FALSE, x^n -> x^(n-1), not n x^(n-1)

Value

An object of class mpoly or mpolyList.

Examples

p <- mp("x y + y z + z^2")
deriv(p, "x")
deriv(p, "y")
deriv(p, "z")
deriv(p, "t")
deriv(p, c("x","y","z"))

is.mpoly(deriv(p, "x"))
is.mpolyList( deriv(p, c("x","y","z")) )

p <- mp("x^5")
deriv(p, "x")
deriv(p, "x", bring_power_down = FALSE)


dkahle/mpoly documentation built on July 27, 2023, 11:44 p.m.