Add - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


MultivariatePowerSeries

  

Add

  

add multivariate power series or multivariate Puiseux series or univariate polynomials over power series or over Puiseux series

 

Calling Sequence

Parameters

Description

Examples

References

Compatibility

Calling Sequence

p1 + p2

Add(P)

Add(P, coefopt)

u1 + u2

Add(U)

s1 + s2

Add(S)

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 or over Puiseux 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 or over Puiseux series generated by this package which have the same main variable, power series generated by this package, polynomials, or complex constants

s1, s2

-

Puiseux series generated by this package with compatible order, univariate polynomials over power series generated by this package which have the same main variable, power series generated by this package or polynomials

S

-

sequence of Puiseux series generated by this package with compatible order, univariate polynomial over power series or over Puiseux series generated by this package which have the same main variable, power series generated by this package, or polynomials or constants.

Description

• 

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

• 

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

• 

The calling sequence 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.

• 

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

• 

The calling sequence 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.

• 

s1 + s2 returns the sum of the terms s1 and s2 as long as their Puiseux series orders are compatible. The result is a Puiseux series.

• 

Two variable orders are compatible if, whenever two variables occur in both orders, they occur in the same order. For example, x,y,z and t,x,z,w are compatible, because the only variables that occur in both orders are x and z, and x occurs before z in both orders.

• 

The calling sequence Add(S) returns the sum of the entries of S as long as this is possible. They are converted to Puiseux series. If this is not possible, an error is raised.

• 

When using the MultivariatePowerSeries package, do not assign anything to the variables occurring in the power series, Puiseux series, and univariate polynomials over these 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, (in MultivariatePowerSeries:-Add) 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).

dPowerSeriesd&rarr;ifelsed&equals;0&comma;0&comma;zxd1d1&excl;&comma;variables&equals;x&comma;z

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

(9)

f&plus;d

Error, (in MultivariatePowerSeries:-Add) 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.

ePowerSeriesd&rarr;ifelsed&equals;0&comma;0&comma;zxd1d1&excl;&comma;analytic&equals;z&ExponentialE;x

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

(10)

f&plus;e

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

(11)

Create three Puiseux series.

s1PuiseuxSeriesPowerSeries11&plus;u&comma;u&equals;x13y2&comma;x&equals;3&comma;y&equals;4

s1Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of x31+y2x13y4 : x3y4+

(12)

s2PuiseuxSeries2&plus;2u&plus;v&comma;u&equals;x12y&comma;v&equals;y&comma;x&equals;3&comma;y&equals;2

s2Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 2+2yx+2yx3y2 : 2x3y2+2x52y3+2y3x3

(13)

s3PuiseuxSeriesPowerSeries11&plus;uv&comma;y&comma;x&comma;u&comma;v&comma;1&comma;0&comma;1&comma;12

s3Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 1y2x+1 : 1+

(14)

We add s1 and s2.

s1&plus;s2

Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 11+y2x13+2+++2yy6x3y4 : x3y4+

(15)

We add a polynomial to s1.

s1&plus;1&plus;xy

Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 11+y2x13+xy+1y4x3x3y4 : x3y4+

(16)

We can add s1 and the power series a. The result is a Puiseux series.

s1&plus;a

Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 11+y2x13+y41xyx3x3y4 : x3y4+

(17)

We can also add s1 and the univariate polynomial over power series f. The result is again a Puiseux series.

s1&plus;f

Puⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s of 11+y2x13++y4x3x3y4 : x3y4+

(18)

We get an error if we try to add s1 and s3, since the orders x&comma;y and y&comma;x are not compatible.

s1&plus;s3

Error, the order of Puiseux series [x, y] and [y, x] are not compatible

We can use the command GetPuiseuxSeriesOrder to obtain the Puiseux series order of s1 and s3.

GetPuiseuxSeriesOrders1

x&comma;y

(19)

GetPuiseuxSeriesOrders3

y&comma;x

(20)

Finally, we create a univariate polynomial over power series from a list of Puiseux series.

uUnivariatePolynomialOverPuiseuxSeriesPuiseuxSeries1&comma;PuiseuxSeries0&comma;PuiseuxSeriesx&comma;x&equals;x13&comma;PuiseuxSeriesy&comma;y&equals;y12&comma;PuiseuxSeriesx&plus;y1&plus;x&plus;y&comma;x&equals;xy12&comma;y&equals;xy1&comma;z

uUnⅈvarⅈat&ExponentialE;PolynomⅈalOv&ExponentialE;rPuⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s: 1+0z+x13z2+yz3+0+z4

(21)

Now we add u to f.

u&plus;f

Unⅈvarⅈat&ExponentialE;PolynomⅈalOv&ExponentialE;rPuⅈs&ExponentialE;uxS&ExponentialE;rⅈ&ExponentialE;s: 1+0+z+0+z2+0+z3+0+z4

(22)

References

  

Monforte, A.A., & Kauers, M. "Formal Laurent series in several variables." Expositiones Mathematicae. Vol. 31 No. 4 (2013): 350-367.

Compatibility

• 

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

• 

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

• 

The MultivariatePowerSeries[Add] command was updated in Maple 2023.

• 

The s1, s2 and S parameters were introduced in Maple 2023.

• 

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

See Also

GeometricSeries

GetPuiseuxSeriesOrder

MainVariable

PowerSeries

PuiseuxSeries

Subtract

UnivariatePolynomialOverPowerSeries