Module: sage.rings.power_series_ring_element
Author: William Stein
Module-level Functions
x) |
Class: PowerSeries
self, parent, prec, [is_gen=False]) |
Functions: add_bigoh,
base_ring,
common_prec,
copy,
degree,
derivative,
exp,
is_gen,
list,
O,
padded_list,
prec,
truncate,
unit_part,
V,
valuation
self, prec) |
Returns the power series of precision at most prec got by
adding
prec
to f, where q is the variable.
self, prec) |
Return this series plus
prec
. Does not change
self.
self, n) |
Return list of coefficients of self up to (but not include
).
Includes 0's in the list on the right so that the list has
length
.
sage: R.<q> = PowerSeriesRing(QQ) sage: f = 1 - 17*q + 13*q^2 + 10*q^4 + O(q^7) sage: f.list() [1, -17, 13, 0, 10] sage: f.padded_list(7) [1, -17, 13, 0, 10, 0, 0] sage: f.padded_list(10) [1, -17, 13, 0, 10, 0, 0, 0, 0, 0] sage: f.padded_list(3) [1, -17, 13]
self) |
The precision of
is by definition
.
self, [prec=Infinity]) |
The polynomial obtained from power series by truncation.
self) |
Suppose self factors as
with
nonzero. Then this function returns
.
self, n) |
If
, then this function returns
.
Special Functions: __add__,
__call__,
__div__,
__getitem__,
__getslice__,
__invert__,
__mod__,
__mul__,
__pow__,
__radd__,
__rdiv__,
__setitem__,
__sub__,
_cmp_,
_im_gens_,
_latex_,
_mul_,
_repr_
self) |
Inverse of the power series, which we assume to have nonzero constant term so that the inverse is again a power series.
sage: R = PowerSeriesRing(RationalField(), 'q') sage: q = R.gen() sage: 1/(1+q + O(q**2)) 1 - q + O(q^2) sage: 1/(1+q) 1 - q + q^2 - q^3 + q^4 - q^5 + q^6 - q^7 + q^8 - q^9 + q^10 - q^11 + q^12 - q^13 + q^14 - q^15 + q^16 - q^17 + q^18 - q^19 + O(q^20) sage: prec = R.default_prec(); prec 20 sage: R.set_default_prec(5) sage: 1/(1+q) 1 - q + q^2 - q^3 + q^4 + O(q^5)
sage: R.<q> = QQ[['q']] sage: R.set_default_prec(5) sage: f = 1 + q + q^2 + O(q^50) sage: f/10 1/10 + 1/10*q + 1/10*q^2 + O(q^50) sage: f/(10+q) 1/10 + 9/100*q + 91/1000*q^2 - 91/10000*q^3 + 91/100000*q^4 + O(q^5)
self, right) |
Comparison of self and right.
We say two approximate power series are equal, if they agree
for all coefficients up to the *minimum* of the precisions of
each. Thus, e.g.,
is equal to
.
This is how PARI defines equality of power series, but not how
MAGMA defines equality. (MAGMA would declare f and g
unequal.) I side with PARI, because even if
,
we don't really know whether f equals g, since we don't know
the coefficients of
.
Class: PowerSeries_generic_dense
self, parent, [f=False], [prec=True], [check=Infinity], [is_gen=0]) |
sage: R, q = PowerSeriesRing(C, 'q').objgen() sage: R Power Series Ring in q over Complex Field with 53 bits of precision sage: loads(q.dumps()) == q True
Functions: copy,
derivative,
integral,
laurent_series,
list,
reversion
self) |
The integral of this power series with 0 constant term.
self) |
Return the reversion of f, i.e., the series g such that g(f(x)) = x.
sage: x = PowerSeriesRing(RationalField()).gen() sage: f = 2*x + 3*x**2 - x**4 + O(x**5) sage: g = f.reversion() sage: g 1/2*x - 3/8*x^2 + 9/16*x^3 - 131/128*x^4 + O(x^5) sage: f(g) x + O(x^5) sage: g(f) x + O(x^5)
Special Functions: __add__,
__call__,
__getitem__,
__getslice__,
__iter__,
__neg__,
__setitem__,
__sub__,
_mul_,
_pari_
self, right) |
sage: x = PowerSeriesRing(ZZ).gen() sage: f = x^4 + O(x^5); f x^4 + O(x^5) sage: g = x^2 + O(x^3); g x^2 + O(x^3) sage: f+g x^2 + O(x^3)
See About this document... for information on suggesting changes.