changeVariables {symbolicQspray}R Documentation

Change of variables in a 'symbolicQspray' polynomial

Description

Replaces the variables of a symbolicQspray polynomial with some symbolicQspray polynomials. E.g. you have a polynomial P_a(x, y) and you want the polynomial P_a(x+a, y+a) (see example).

Usage

## S4 method for signature 'symbolicQspray,list'
changeVariables(x, listOfQsprays)

Arguments

x

a symbolicQspray polynomial

listOfQsprays

a list containing at least n symbolicQspray objects, or objects coercible to symbolicQspray objects, where n is the number of variables in the polynomial given in the x argument; if this list is named, their its names will be used in the show options of the result

Value

The symbolicQspray polynomial obtained by replacing the variables of the polynomial given in the x argument with the polynomials given in the listOfQsprays argument.

See Also

If you want to change the parameters of a symbolic qspray, use changeParameters. If you want to assign some values to its variables, see substituteVariables.

Examples

library(symbolicQspray)
f <- function(a, X, Y) {
  a^2 / (a + 1) * X^2*Y  +  (3*a - 2) / a * Y^2
}
a <- qlone(1)
X <- Qlone(1)
Y <- Qlone(2)
Qspray <- f(a, X, Y)
U <- X + a
V <- Y + a
changeVariables(Qspray, list(U, V)) == f(a, U, V) # should be TRUE

[Package symbolicQspray version 1.1.0 Index]