MultivariatePowerSeries/Add - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MultivariatePowerSeries/Add

MultivariatePowerSeries

  

Add

  

Add multivariate power series or univariate polynomials over power series

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

p1 + p2

Add(P)

Add(P, coefopt)

u1 + u2

Add(U)

Parameters

p1, p2

-

power series generated by this package, polynomials, or complex constants

P

-

sequence of power series generated by this package, polynomials, and complex constants

coefopt

-

(optional) equation of the form coefficients = C, where coefficients is a keyword and C is a list of polynomials and complex constants

u1, u2

-

univariate polynomials over power series generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants

U

-

sequence of univariate polynomial over power series generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants

Description

• 

The command p1 + p2 returns the sum of the terms p1 and p2. The result is a power series.

• 

The command Add(P) returns the sum of the terms in P.

• 

The command Add(P, coefficients = C) returns the sum of the products C[i] * P[i]. The length of the list C must be the same as the number of elements of P.

• 

The command u1 + u2 returns the sum of the terms u1 and u2. The result is a univariate polynomial over power series.

• 

The command Add(U) returns the sum of the entries of U. They are converted to univariate polynomials over power series in the same variable. If this is not possible, an error is raised. This may happen if there are univariate polynomials over power series in different variables. It can also happen if the univariate polynomials over power series all have the same main variable, say x, but one of the other arguments is a power series that is not known to be expressible as a polynomial in x. The same restrictions apply to the calling sequence u1 + u2.

• 

When using the MultivariatePowerSeries package, do not assign anything to the variables occurring in the power series and univariate polynomials over power series. If you do, you may see invalid results.

Examples

withMultivariatePowerSeries:

Create three power series.

aGeometricSeriesx,y:

bPowerSeries1+x+y+z:

cPowerSeries2xy+3z3:

Create a power series representing the sum of a and b.

a+b

PowⅇrSⅇrⅈⅇs of 11xy+1+x+y+z : 2+2x+2y+z+

(1)

Add 1 to a.

a+1

PowⅇrSⅇrⅈⅇs of 11xy+1 : 2+

(2)

Add a, b, c, and the polynomial xyz+1.

Adda,b,c,1+xyz

PowⅇrSⅇrⅈⅇs of 11xy+2+x+y+z+3z3+2xy+xyz : 3+2x+2y+z+

(3)

Compute a+5b+10c.

Adda,b,c,coefficients=1,5,10

PowⅇrSⅇrⅈⅇs of 11xy+5+5x+5y+5z+30z3+20xy : 6+6x+6y+5z+

(4)

Create a univariate polynomial over power series, given by a polynomial.

fUnivariatePolynomialOverPowerSeriesxz+yz2+xyz3,z:

Add a polynomial to f. These two calling sequences are equivalent.

f+z+3

UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 3+1+z+yz2+xyz3

(5)

Addf,z+3

UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 3+1+z+yz2+xyz3

(6)

Add a power series to f that is independent of z (and thus trivially polynomial in z).

f+GeometricSeriesx,y

UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1++xz+yz2+xyz3

(7)

Create a separate univariate polynomial over power series, and add it to f.

gUnivariatePolynomialOverPowerSeriesGeometricSeriesx,y,PowerSeries3,z:

f+g

UnⅈvarⅈatⅇPolynomⅈalOvⅇrPowⅇrSⅇrⅈⅇs: 1++3+z+yz2+xyz3

(8)

This will raise an error, because we're trying to add univariate polynomials over power series with different main variables.

hUnivariatePolynomialOverPowerSeriesGeometricSeriesx,y,PowerSeries3,w:

f+h

Error, incompatible inputs: expect UnivariatePolynomialOverPowerSeries with the same main variable, but received w <> z

This also will not work, because Maple cannot determine that d is polynomial in z (though actually it is).

dPowerSeriesdifelsed=0&comma;0&comma;zxd1d1!&comma;variables=x&comma;z

dPow&ExponentialE;rS&ExponentialE;rⅈ&ExponentialE;s: 0+

(9)

f+d

Error, attempted to convert a power series involving z to a univariate polynomial over power series in z, but it is not known to be polynomial in z

We define e in the same way as d but specify the analytic expression, and then we can successfully add it to f.

ePowerSeriesdifelsed=0&comma;0&comma;zxd1d1!&comma;analytic=zexpx

ePow&ExponentialE;rS&ExponentialE;rⅈ&ExponentialE;s of z&ExponentialE;x : 0+

(10)

f+e

Unⅈvarⅈat&ExponentialE;PolynomⅈalOv&ExponentialE;rPow&ExponentialE;rS&ExponentialE;rⅈ&ExponentialE;s: 0+1+z+yz2+xyz3

(11)

Compatibility

• 

The MultivariatePowerSeries[Add] command was introduced in Maple 2021.

• 

For more information on Maple 2021 changes, see Updates in Maple 2021.

See Also

GeometricSeries

MainVariable

PowerSeries

Subtract

UnivariatePolynomialOverPowerSeries