MultivariatePowerSeries/Copy - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : MultivariatePowerSeries/Copy

MultivariatePowerSeries

  

Copy

  

Copy a power series or univariate polynomial over power series

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

Copy(p)

Copy(u)

Parameters

p

-

power series generated by this package

u

-

univariate polynomial over power series generated by this package

Description

• 

Copy(p) returns a copy of p. If p is subsequently modified (for example by computing extra coefficients, or modifying the display style), these changes are not reflected in p, and vice versa.  Note that p and its copy may share ancestors, that is, power series from which p was computed.

• 

Copy(u) returns a copy of u, constructed from copies of the coefficients of u. The coefficients of u and its copy may share ancestors.

• 

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:

We create two power series, a and b.

aInversePowerSeries1+xy:

bInversePowerSeriesy2x+1:

The power series c keeps a record of a and b as its ancestors.

ca+b

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

(1)

dCopyc

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

(2)

We can set the display styles for c and d independently. We ensure that enough terms are computed to show the difference.

SetDisplayStylec,precision=7

precision=7

(3)

SetDisplayStyled,precision=4

precision=4

(4)

UpdatePrecisionc,7:UpdatePrecisiond,7:

c

PowⅇrSⅇrⅈⅇs of 11+xy+1y2x+1 : 2+y+2x22xy+3x2y5y2x+y3+2x44x3y+3x2y24xy3+2y4+5x4y14x3y2+10x2y32xy4+y5+2x66x5y+10x4y220x3y3+21x2y46xy5+7x6y27x5y2+35x4y325x3y4+21x2y511xy6+y7+

(5)

d

PowⅇrSⅇrⅈⅇs of 11+xy+1y2x+1 : 2+y+2x22xy+3x2y5y2x+y3+2x44x3y+3x2y24xy3+2y4+

(6)

The power series d is a copy of c, however, they share a and b, therefore when more terms of c are computed, the precision of a and b will be updated too. Consequently, the computation of new terms of d must be cheaper as it does not involve computing the coefficients of a and b.

gc:

CodeTools:-UsageHomogeneousPartc,500:

memory used=143.48MiB, alloc change=115.65MiB, cpu time=2.41s, real time=2.23s, gc time=408.37ms

Precisiona

500

(7)

Precisionb

500

(8)

Precisionc

500

(9)

Precisiond

7

(10)

gc:

CodeTools:-UsageHomogeneousPartd,500:

memory used=6.70MiB, alloc change=0 bytes, cpu time=45.00ms, real time=46.00ms, gc time=0ns

Precisiond

500

(11)

Compatibility

• 

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

• 

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

See Also

HomogeneousPart

Inverse

PowerSeries

Precision

Truncate