Copy a power series or univariate polynomial over power series
power series generated by this package
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.
We create two power series, a and b.
The power series c keeps a record of a and b as its ancestors.
c≔PowⅇrSⅇrⅈⅇs of 11+x−y+1y2−x+1 : 2+…
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.
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+…
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.
memory used=143.48MiB, alloc change=115.65MiB, cpu time=2.41s, real time=2.23s, gc time=408.37ms
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.
Download Help Document
What kind of issue would you like to report? (Optional)