時間序列︰生成函數《二》

雖然今天我們還是可以像歐拉一樣自由的操作生成函數︰

Power series

Main article: Power series

A power series is a series of the form

  \sum _{n=0}^{\infty }a_{n}(x-c)^{n}.

The Taylor series at a point c of a function is a power series that, in many cases, converges to the function in a neighborhood of c. For example, the series

  \sum _{n=0}^{\infty }{\frac {x^{n}}{n!}}

is the Taylor series of  e^{x} at the origin and converges to it for every x.

Unless it converges only at x=c, such a series converges on a certain open disc of convergence centered at the point c in the complex plane, and may also converge at some of the points of the boundary of the disc. The radius of this disc is known as the radius of convergence, and can in principle be determined from the asymptotics of the coefficients an. The convergence is uniform on closed and bounded (that is, compact) subsets of the interior of the disc of convergence: to wit, it is uniformly convergent on compact sets.

Historically, mathematicians such as Leonhard Euler operated liberally with infinite series, even if they were not convergent. When calculus was put on a sound and correct foundation in the nineteenth century, rigorous proofs of the convergence of series were always required. However, the formal operation with non-convergent series has been retained in rings of formal power series which are studied in abstract algebra. Formal power series are also used in combinatorics to describe and study sequences that are otherwise difficult to handle; this is the method of generating functions.

 

不管它是收斂與否︰

Introduction

A formal power series can be loosely thought of as an object that is like a polynomial, but with infinitely many terms. Alternatively, for those familiar with power series (or Taylor series), one may think of a formal power series as a power series in which we ignore questions of convergence by not assuming that the variable X denotes any numerical value (not even an unknown value). For example, consider the series

A = 1 - 3X + 5X^2 - 7X^3 + 9X^4 - 11X^5 + \cdots.

If we studied this as a power series, its properties would include, for example, that its radius of convergence is 1. However, as a formal power series, we may ignore this completely; all that is relevant is the sequence of coefficients [1, −3, 5, −7, 9, −11, …]. In other words, a formal power series is an object that just records a sequence of coefficients. It is perfectly acceptable to consider a formal power series with the factorials [1, 1, 2, 6, 24, 120, 720, 5040, … ] as coefficients, even though the corresponding power series diverges for any nonzero value of X.

Arithmetic on formal power series is carried out by simply pretending that the series are polynomials. For example, if

B = 2X + 4X^3 + 6X^5 + \cdots,

then we add A and B term by term:

A + B = 1 - X + 5X^2 - 3X^3 + 9X^4 - 5X^5 + \cdots.

We can multiply formal power series, again just by treating them as polynomials (see in particular Cauchy product):

AB = 2X - 6X^2 + 14X^3 - 26X^4 + 44X^5 + \cdots.

Notice that each coefficient in the product AB only depends on a finite number of coefficients of A and B. For example, the X5 term is given by

44X^5 = (1\times 6X^5) + (5X^2 \times 4X^3) + (9X^4 \times 2X).

For this reason, one may multiply formal power series without worrying about the usual questions of absolute, conditional and uniform convergence which arise in dealing with power series in the setting of analysis.

Once we have defined multiplication for formal power series, we can define multiplicative inverses as follows. The multiplicative inverse of a formal power series A is a formal power series C such that AC = 1, provided that such a formal power series exists. It turns out that if A has a multiplicative inverse, it is unique, and we denote it by A−1. Now we can define division of formal power series by defining B/A to be the product BA−1, provided that the inverse of A exists. For example, one can use the definition of multiplication above to verify the familiar formula

\frac{1}{1 + X} = 1 - X + X^2 - X^3 + X^4 - X^5 + \cdots.

An important operation on formal power series is coefficient extraction. In its most basic form, the coefficient extraction operator for a formal power series in one variable extracts the coefficient of  {\displaystyle [X^{n}]}, and is written e.g.  {\displaystyle [X^{n}]A}, so that  {\displaystyle [X^{2}]A=5} and  {\displaystyle [X^{5}]A=-11}. Other examples include

  </span

Similarly, many other operations that are carried out on polynomials can be extended to the formal power series setting, as explained below.

 

就算如波例亞所說,它是個裝序列的『袋子』,知道這個『袋子』的『抽象構造』也有很多的好處︰

The ring of formal power series

The set of all formal power series in X with coefficients in a commutative ring R form another ring that is written R[[X]], and called the ring of formal power series in the variable X over R.

Definition of the formal power series ring

One can characterize  R[[X]] abstractly as the completion of the polynomial ring  R[X] equipped with a particular metric. This automatically gives  R[[X]] the structure of a topological ring (and even of a complete metric space). But the general construction of a completion of a metric space is more involved than what is needed here, and would make formal power series seem more complicated than they are. It is possible to describe  R[[X]] more explicitly, and define the ring structure and topological structure separately, as follows.

Ring structure

As a set,  R[[X]] can be constructed as the set  {\displaystyle R^{\mathbb {N} }} of all infinite sequences of elements of  R, indexed by the natural numbers (taken to include 0). Designating a sequence whose term at index  n is  a_{n} by  (a_{n}), one defines addition of two such sequences by

  (a_n)_{n\in\N} + (b_n)_{n\in\N} = \left( a_n + b_n \right)_{n\in\N}

and multiplication by

  (a_n)_{n\in\N} \times (b_n)_{n\in\N} = \left( \sum_{k=0}^n a_k b_{n-k} \right)_{n\in\N}.

This type of product is called the Cauchy product of the two sequences of coefficients, and is a sort of discrete convolution. With these operations,  {\displaystyle R^{\mathbb {N} }} becomes a commutative ring with zero element  {\displaystyle (0,0,0,\cdots )} and multiplicative identity  {\displaystyle (1,0,0,\cdots )}.

The product is in fact the same one used to define the product of polynomials in one indeterminate, which suggests using a similar notation. One embeds  R[[X]] by sending any (constant)  a \in R to the sequence  {\displaystyle (a,0,0,\cdots )} and designates the sequence  {\displaystyle (0,1,0,0,\cdots )} by  X; then using the above definitions every sequence with only finitely many nonzero terms can be expressed in terms of these special elements as  {\displaystyle (a_{0},a_{1},a_{2},\cdots ,a_{n},0,0,\ldots )=a_{0}+a_{1}X+\cdots +a_{n}X^{n}=\sum _{i=0}^{n}a_{i}X^{i};}

these are precisely the polynomials in  X. Given this, it is quite natural and convenient to designate a general sequence  (a_n)_{n\in\N} by the formal expression \textstyle\sum_{i\in\N}a_i X^i, even though the latter is not an expression formed by the operations of addition and multiplication defined above (from which only finite sums can be constructed). This notational convention allows reformulation the above definitions as

  \textstyle \left(\sum_{i\in\N} a_i X^i\right)+\left(\sum_{i\in\N} b_i X^i\right) = \sum_{i\in\N}(a_i+b_i) X^i

and  \textstyle \left(\sum_{i\in\N} a_i X^i\right) \times \left(\sum_{i\in\N} b_i X^i\right) = \sum_{n\in\N} \left(\sum_{k=0}^n a_k b_{n-k}\right) X^n.

which is quite convenient, but one must be aware of the distinction between formal summation (a mere convention) and actual addition.

Topological structure

Having stipulated conventionally that

  (a_0, a_1, a_2, a_3, \ldots) = \sum_{i=0}^\infty a_i X^i, \qquad (1)

one would like to interpret the right hand side as a well-defined infinite summation. To that end, a notion of convergence in  {\displaystyle R^{\mathbb {N} }} is defined and a topology on  {\displaystyle R^{\mathbb {N} }} is constructed. There are several equivalent ways to define the desired topology.

  • We may give  {\displaystyle R^{\mathbb {N} }} the product topology, where each copy of  R is given the discrete topology.
  • We may give  {\displaystyle R^{\mathbb {N} }} the I-adic topology, where  {\displaystyle I=(X)} is the ideal generated by  X, which consists of all sequences whose first term  a_{0} is zero.
  • The desired topology could also be derived from the following metric. The distance between distinct sequences (an) and (bn) in RN, is defined to be
  {\displaystyle d((a_{n}),(b_{n}))=2^{-k}},
where  k is the smallest natural number such that  {\displaystyle a_{k}\neq b_{k}}; the distance between two equal sequences is of course zero.

Informally, two sequences  \{a_{n}\} and  \{b_{n}\} become closer and closer if and only if more and more of their terms agree exactly. Formally, the sequence of partial sums of some infinite summation converges if for every fixed power of  X the coefficient stabilizes: there is a point beyond which all further partial sums have the same coefficient. This is clearly the case for the right hand side of (1), regardless of the values  a_{n}, since inclusion of the term for  i=n gives the last (and in fact only) change to the coefficient of  X^{n}. It is also obvious that the limit of the sequence of partial sums is equal to the left hand side.

This topological structure, together with the ring operations described above, form a topological ring. This is called the ring of formal power series over  R and is denoted by  R[[X]]. The topology has the useful property that an infinite summation converges if and only if the sequence of its terms converges to 0, which just means that any fixed power of  X occurs in only finitely many terms.

The topological structure allows much more flexible use of infinite summations. For instance the rule for multiplication can be restated simply as

  \textstyle \left(\sum_{i\in\N} a_i X^i\right) \times \left(\sum_{i\in\N} b_i X^i\right) = \sum_{i,j\in\N} a_i b_j X^{i+j},

since only finitely many terms on the right affect any fixed  X^{n}. Infinite products are also defined by the topological structure; it can be seen that an infinite product converges if and only if the sequence of its factors converges to 1.

………

 

不單祇為了邏輯上之嚴謹,還為著明確合理的『代數運算』法則︰

Operations on formal power series

One can perform algebraic operations on power series to generate new power series.[1][2] Besides the ring structure operations defined above, we have the following.

Power series raised to powers

If n is a natural number we have

   \left( \sum_{k=0}^\infty a_k X^k \right)^n = \sum_{m=0}^\infty c_m X^m,

where

   c_0 = a_0^n, \quad c_m = \frac{1}{m a_0} \sum_{k=1}^m (kn - m+k) a_{k} c_{m-k},

for m ≥ 1. (This formula can only be used if m and a0 are invertible in the ring of scalars.)

In the case of formal power series with complex coefficients, the complex powers are well defined at least for series f with constant term equal to 1. In this case, fα can be defined either by composition with the binomial series (1+x)α, or by composition with the exponential and the logarithmic series, fα := exp(αlog(f)), or as the solution of the differential equation f(fα)′ = αfαf′ with constant term 1, the three definitions being equivalent. The rules of calculus (fα)β = fαβ and fαgα = (fg)α easily follow.

Inverting series

The series

  A = \sum_{n=0}^\infty a_n X^n

in  R[[X]] is invertible in  R[[X]] if and only if its constant coefficient  a_{0} is invertible in  R. This condition is necessary, for the following reason: if we suppose that  A has an inverse  {\displaystyle B=b_{0}+b_{1}x+\cdots } then the constant term  a_{0}b_{0} of  A\cdot B is the constant term of the identity series, i.e., it is 1. This condition is also sufficient; we may compute the coefficients of the inverse series  B via the explicit recursive formula

  </span

An important special case is that the geometric series formula is valid in  {\displaystyle K[[X]]}:

  (1 - X)^{-1} = \sum_{n=0}^\infty X^n.

If  {\displaystyle R=K} is a field, then a series is invertible if and only if the constant term is non-zero, i.e., if and only if the series is not divisible by  X. This says that {\displaystyle K[[X]]} is a discrete valuation ring with uniformizing parameter  X.

Dividing series

The computation of a quotient  {\displaystyle f/g=h}

   \frac{\sum_{n=0}^\infty b_n X^n }{\sum_{n=0}^\infty a_n X^n } =\sum_{n=0}^\infty c_n X^n,

assuming the denominator is invertible (that is,  a_{0} is invertible in the ring of scalars), can be performed as a product  f and the inverse of  g, or directly equating the coefficients in  {\displaystyle f=gh}:

c_n = \frac{1}{a_0}\left(b_n - \sum_{k=1}^n a_k c_{n-k}\right).

Extracting coefficients

The coefficient extraction operator applied to a formal power series

  f(X) = \sum_{n=0}^\infty a_n X^n

in X is written

   \left[ X^m \right] f(X)

and extracts the coefficient of Xm, so that

   \left[ X^m \right] f(X) = \left[ X^m \right] \sum_{n=0}^\infty a_n X^n = a_m.

Composition of series

Given formal power series

  f(X) = \sum_{n=1}^\infty a_n X^n = a_1 X + a_2 X^2 + \cdots
  g(X) = \sum_{n=0}^\infty b_n X^n = b_0 + b_1 X + b_2 X^2 + \cdots,

one may form the composition

  g(f(X)) = \sum_{n=0}^\infty b_n (f(X))^n = \sum_{n=0}^\infty c_n X^n,

where the coefficients cn are determined by “expanding out” the powers of f(X):

  c_n:=\sum_{k\in\N, \vert j\vert=n} b_k a_{j_1} a_{j_2} \cdots a_{j_k}.

Here the sum is extended over all (k, j) with k in N and  j\in\N_+^k with  |j|:=j_1+\cdots+j_k=n.

A more explicit description of these coefficients is provided by Faà di Bruno’s formula, at least in the case where the coefficient ring is a field of characteristic 0.

A point here is that this operation is only valid when  f(X) has no constant term, so that each  c_{n} depends on only a finite number of coefficients of  f(X) and  g(X). In other word the series for  {\displaystyle g(f(X))} converges in the topology of  R[[X]].

Example

Assume that the ring  R has characteristic 0. If we denote by  {\displaystyle \exp(X)} the formal power series

  \exp(X) = 1 + X + \frac{X^2}{2!} + \frac{X^3}{3!} + \frac{X^4}{4!} + \cdots,

then the expression

\exp(\exp(X) - 1) = 1 + X + X^2 + \frac{5X^3}6 + \frac{5X^4}8 + \cdots

makes perfect sense as a formal power series. However, the statement  \exp(\exp(X)) = e \exp(\exp(X) - 1) = e + eX + eX^2 + \frac{5eX^3}{6} + \cdots

is not a valid application of the composition operation for formal power series. Rather, it is confusing the notions of convergence in  R[[X]] and convergence in  R; indeed, the ring  R may not even contain any number  e with the appropriate properties.

Composition inverse

Whenever a formal series  \textstyle f(X)=\sum_k f_k X^k \in R[[X]] has f0 = 0 and f1 being an invertible element of R, there exists a series  \textstyle g(X)=\sum_k g_k X^k that is the composition inverse of  f, meaning that composing  f with  g gives the series representing the identity function (whose first coefficient is 1 and all other coefficients are zero). The coefficients of  g may be found recursively by using the above formula for the coefficients of a composition, equating them with those of the composition identity X (that is 1 at degree 1 and 0 at every degree greater than 1) . In the case when the coefficient ring is a field of characteristic 0, the Lagrange inversion formula provides a powerful tool to compute the coefficients of g, as well as the coefficients of the (multiplicative) powers of g.

Formal differentiation of series

Given a formal power series

f = \sum_{n\geq 0} a_n X^n

in R[[X]], we define its formal derivative, denoted Df or f′, by

   Df = \sum_{n \geq 1} a_n n X^{n-1}.

The symbol D is called the formal differentiation operator. The motivation behind this definition is that it simply mimics term-by-term differentiation of a polynomial.

This operation is Rlinear:

  D(af + bg) = a \cdot Df + b \cdot Dg

for any a, b in R and any f, g in R[[X]]. Additionally, the formal derivative has many of the properties of the usual derivative of calculus. For example, the product rule is valid:

  D(fg) = f \cdot (Dg) + (Df) \cdot g,

and the chain rule works as well:

  D(f\circ g ) = \left( Df\circ g\right) \cdot Dg,

whenever the appropriate compositions of series are defined (see above under composition of series).

Thus, in these respects formal power series behave like Taylor series. Indeed, for the f defined above, we find that

(D^k f)(0) = k! a_k,

where Dk denotes the kth formal derivative (that is, the result of formally differentiating k times).

 

當然最好親自動手紙筆練習,熟練後何仿看看 Sympy 之

Formal Power Series

Methods for computing and manipulating Formal Power Series.

class sympy.series.formal.FormalPowerSeries
Represents Formal Power Series of a function.

No computation is performed. This class should only to be used to represent a series. No checks are performed.

For computing a series use fps().

 

,讓電腦代勞的吧!