MultivariatePowerSeries
Copy
Copy a power series or univariate polynomial over power series
Calling Sequence
Parameters
Description
Examples
Compatibility
Copy(p)
Copy(u)
p
-
power series generated by this package
u
univariate polynomial over power series generated by this package
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.
with⁡MultivariatePowerSeries:
We create two power series, a and b.
a≔Inverse⁡PowerSeries⁡1+x−y:
b≔Inverse⁡PowerSeries⁡y2−x+1:
The power series c keeps a record of a and b as its ancestors.
c≔a+b
c≔PowⅇrSⅇrⅈⅇs of 11+x−y+1y2−x+1 : 2+…
d≔Copy⁡c
d≔PowⅇrSⅇrⅈⅇs of 11+x−y+1y2−x+1 : 2+…
We can set the display styles for c and d independently. We ensure that enough terms are computed to show the difference.
SetDisplayStyle⁡c,precision=7
precision=7
SetDisplayStyle⁡d,precision=4
precision=4
UpdatePrecision⁡c,7:UpdatePrecision⁡d,7:
c
PowⅇrSⅇrⅈⅇs of 11+x−y+1y2−x+1 : 2+y+2⁢x2−2⁢x⁢y+3⁢x2⁢y−5⁢y2⁢x+y3+2⁢x4−4⁢x3⁢y+3⁢x2⁢y2−4⁢x⁢y3+2⁢y4+5⁢x4⁢y−14⁢x3⁢y2+10⁢x2⁢y3−2⁢x⁢y4+y5+2⁢x6−6⁢x5⁢y+10⁢x4⁢y2−20⁢x3⁢y3+21⁢x2⁢y4−6⁢x⁢y5+7⁢x6⁢y−27⁢x5⁢y2+35⁢x4⁢y3−25⁢x3⁢y4+21⁢x2⁢y5−11⁢x⁢y6+y7+…
d
PowⅇrSⅇrⅈⅇs of 11+x−y+1y2−x+1 : 2+y+2⁢x2−2⁢x⁢y+3⁢x2⁢y−5⁢y2⁢x+y3+2⁢x4−4⁢x3⁢y+3⁢x2⁢y2−4⁢x⁢y3+2⁢y4+…
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:-Usage⁡HomogeneousPart⁡c,500:
memory used=143.48MiB, alloc change=115.65MiB, cpu time=2.41s, real time=2.23s, gc time=408.37ms
Precision⁡a
500
Precision⁡b
Precision⁡c
Precision⁡d
7
CodeTools:-Usage⁡HomogeneousPart⁡d,500:
memory used=6.70MiB, alloc change=0 bytes, cpu time=45.00ms, real time=46.00ms, gc time=0ns
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
Download Help Document
What kind of issue would you like to report? (Optional)