spray (version 1.0-6)

# deriv: Partial differentiation of spray objects

## Description

Partial differentiation of spray objects interpreted as multivariate polynomials

## Usage

# S3 method for spray
deriv(expr, i , derivative = 1, ...)
aderiv(S,orders)

## Arguments

expr

A spray object, interpreted as a multivariate polynomial

i

Dimension to differentiate with respect to

derivative

How many times to differentiate

...

Further arguments, currently ignored

S

spray object

orders

The orders of the differentials

## Value

Both functions return a spray object.

## Details

Function deriv.spray() is the method for generic spray(); if S is a spray object, then spray(S,i,n) returns $$\partial^n S/\partial x_i^n = S^{\left(x_i,\ldots,x_i\right)}$$.

Function aderiv() is the generalized derivative; if S is a spray of arity 3, then aderiv(S,c(i,j,k)) returns $$\frac{\partial^{i+j+k} S}{\partial x_1^i\partial x_2^j\partial x_3^k}$$.

asum

## Examples

# NOT RUN {

deriv(S,1)
deriv(S,2,2)

# differentiation is invariant under order:

# Leibniz's rule:

S1*deriv(S2,1) + deriv(S1,1)*S2 == deriv(S1*S2,1)

# Generalized Leibniz: