Symbolic Computation of
Formal Power Series in Maxima

February 2021

Bertrand Teguia Tabuguia
This worksheet demonstrates some capacities of a new package FPS (Formal Power Series) that can be used to recover power series formulas and sometimes discover unexpected ones. The package implements symbolic algorithms from

Teguia Tabuguia, Bertrand and Koepf, Wolfram. Symbolic computation of hypergeometric type and non-holonomic power series. arXiv preprint arXiv:2102.04157. 2021 -- This paper was divided and rewritten into two parts for better descriptions of the methods:

Teguia Tabuguia, Bertrand and Koepf, Wolfram. Symbolic conversion of holonomic functions to hypergeometric type power series. To appear in the Computer Algebra issue of the journal of Programming and Computer Software.

Teguia Tabuguia, Bertrand and Koepf, Wolfram. On the representation of non-holonomic power series. To be presented at the Maple Conference 2021.

Teguia Tabuguia, Bertrand. Power Series Representations of Hypergeometric Type and Non-Holonomic Functions in Computer Algebra. Ph.D. thesis, University of Kassel, Germany. https://kobra.uni-kassel.de/handle/123456789/11598. May 2020.

The results go far beyond what Maxima's powerseries command, which uses a pattern matching approach, currently does.
 (%i1) batchload ( FPS ) ;

$\tag{%o1} C:/Users/bertr/maxima/FPS.mac$

1 Overview of the method

Consider for example f(z):=arctan(z)+cos(z).
First, the code computes a differential equation of a special type, called holonomic, satisfied by f(z). This is done in the following way.
 (%i2) f : atan ( z ) + cos ( z ) ;

$\tag{%o2} \cos{(z)}+\operatorname{atan}(z)$

 (%i3) DE : HolonomicDE ( f , F ( z ) ) ;

$\tag{%o3} \left( {{z}^{2}}+1\right) \, \left( {{z}^{4}}+8 {{z}^{2}}-1\right) \, \left( \frac{{{d}^{4}}}{d {{z}^{4}}} \operatorname{F}(z)\right) +2 z\, \left( {{z}^{4}}+14 {{z}^{2}}-11\right) \, \left( \frac{{{d}^{3}}}{d {{z}^{3}}} \operatorname{F}(z)\right) +\left( {{z}^{2}}+1\right) \, \left( {{z}^{4}}+8 {{z}^{2}}-1\right) \, \left( \frac{{{d}^{2}}}{d {{z}^{2}}} \operatorname{F}(z)\right) +2 z\, \left( {{z}^{4}}+14 {{z}^{2}}-11\right) \, \left( \frac{d}{d z} \operatorname{F}(z)\right) =0$

Second, the differential equation is converted into a recurrence equation.
 (%i4) RE : DEtoRE ( DE , F ( z ) , a [ n ] ) ;

$\tag{%o4} -\left( n+1\right) \, \left( n+2\right) \, \left( n+3\right) \, \left( n+4\right) \, {a_{n+4}}+\left( n+1\right) \, \left( n+2\right) \, \left( 7 {{n}^{2}}-29 n-1\right) \, {a_{n+2}}+n\, \left( 9 {{n}^{3}}-26 {{n}^{2}}+22 n-27\right) \, {a_n}+{a_{n-2}}\, \left( n-2\right) \, \left( {{n}^{3}}-10 {{n}^{2}}+42 n-35\right) +{a_{n-4}}\, \left( n-4\right) \, \left( n-3\right) =0$

This can also be done directly.
 (%i5) FindRE ( f , z , a [ n ] ) ;

$\tag{%o5} -\left( n+1\right) \, \left( n+2\right) \, \left( n+3\right) \, \left( n+4\right) \, {a_{n+4}}+\left( n+1\right) \, \left( n+2\right) \, \left( 7 {{n}^{2}}-29 n-1\right) \, {a_{n+2}}+n\, \left( 9 {{n}^{3}}-26 {{n}^{2}}+22 n-27\right) \, {a_n}+{a_{n-2}}\, \left( n-2\right) \, \left( {{n}^{3}}-10 {{n}^{2}}+42 n-35\right) +{a_{n-4}}\, \left( n-4\right) \, \left( n-3\right) =0$

Then the coefficient of the power series sought is computed as (m-fold hypergeometric term) solutions of the obtained RE. The algorithm used is new.
 (%i6) mfoldHyper ( RE , a [ n ] ) ;

$\tag{%o6} [[2\operatorname{,}\{\frac{{{\left( -1\right) }^{n}}}{n}\operatorname{,}\frac{{{\left( -1\right) }^{n}}}{\left( 2 n\right) \operatorname{!}}\}]]$

These are the coefficients of the even part of the expansion (There are only 2-fold hypergeometric term solutions over the rationals). For the odd part, mfoldHyper can be used as follows.
 (%i7) mfoldHyper ( RE , a [ n ] , 2 , 1 ) ;

$\tag{%o7} \{\frac{{{\left( -1\right) }^{n}}}{2 n+1}\operatorname{,}\frac{{{\left( -1\right) }^{n}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\}$

Finally a linear combination of the involved power series is sought with verification of the initial values, and we get
 (%i8) FPS ( f , z , n ) ;

$\tag{%o8} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{2 n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

At the current time, this complete approach for hypergeometric type power series is new for all computer algebra systems. The same computations can be done for series with negative and fractional powers.
 (%i9) FPS ( sin ( z ) / z ^ 8 , z , n ) ;

$\tag{%o9} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n-7}}}{\left( 2 n+1\right) \operatorname{!}}\right.}$

 (%i10) FPS ( cos ( sqrt ( z ) ) + sin ( z ^ ( 1 / 3 ) ) , z , n ) ;

$\tag{%o10} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{\frac{2 n+1}{3}}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

Apart from series related to hypergeometric type series, there is another approach used wich mainly deals with expressions that are not holonomic like log(1+sin(z)), (1+tan(z))/(1-tan(z)), etc. We find it a little inconvenient to introduce Bernoulli or Euler numbers in the expansion since it could not give full information to the user. Instead we return recursive formulas that the user can use to recover truncated series.
 (%i11) f : log ( 1 + sin ( z ) ) ;

$\tag{%o11} \log{\left( \sin{(z)}+1\right) }$

 (%i12) DE : QDE ( f , F ( z ) ) ;

$\tag{%o12} \frac{{{d}^{3}}}{d {{z}^{3}}} \operatorname{F}(z)+\left( \frac{d}{d z} \operatorname{F}(z)\right) \, \left( \frac{{{d}^{2}}}{d {{z}^{2}}} \operatorname{F}(z)\right) =0$

 (%i13) FindQRE ( f , z , a [ n ] ) ;

$\tag{%o13} \left( \sum_{k=0}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, {a_{k+2}}\, \left( n-k+1\right) \, {a_{n-k+1}}\right.}\right) +\left( n+1\right) \, \left( n+2\right) \, \left( n+3\right) \, {a_{n+3}}=0$

 (%i14) FPS ( f , z , n ) ;

$\tag{%o14} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_{n+4}}=\frac{-\left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, {A_{k+2}}\, \left( n-k+2\right) \, {A_{n-k+2}}\right.}\right) -\left( n+2\right) \, \left( n+3\right) \, {A_{n+3}}+\left( n+2\right) \, {A_{n+2}}}{\left( n+2\right) \, \left( n+3\right) \, \left( n+4\right) }\operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=0\operatorname{,}{A_1}=1\operatorname{,}{A_2}=-\frac{1}{2}\operatorname{,}{A_3}=\frac{1}{6}]]$

 (%i15) FPS ( ( 1 + tan ( z ) ) / ( 1 − tan ( z ) ) , z , n ) ;

$\tag{%o15} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_{n+3}}=\frac{2 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, {A_{k+1}}\, {A_{n-k+1}}\right.}\right) +2 \left( n+2\right) \, {A_{n+2}}+4 {A_{n+1}}}{\left( n+2\right) \, \left( n+3\right) }\operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=1\operatorname{,}{A_1}=2\operatorname{,}{A_2}=2]]$

 (%i16) QNF ( tan ( z ) , z , n ) ;

$\tag{%o16} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_{n+3}}=\frac{2 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, {A_{k+1}}\, {A_{n-k+1}}\right.}\right) +2 {A_{n+1}}}{\left( n+2\right) \, \left( n+3\right) }\operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=0\operatorname{,}{A_1}=1\operatorname{,}{A_2}=0]]$

The formulas for expressions like tan(z) and 1/(exp(z)-1) are easily related to hypergeometric type series. Therefore FPS yields
 (%i17) FPS ( tan ( z ) , z , n ) ;

$\tag{%o17} [\sum_{n=0}^{\infty }{\left. \left( \sum_{k=0}^{n}{\left. \frac{{A_k}\, {{\left( -1\right) }^{n-k}}}{\left( 2 n-2 k+1\right) \operatorname{!}}\right.}\right) \, {{z}^{2 n+1}}\right.}\operatorname{,}{A_k}=\sum_{j=1}^{k}{\left. -\frac{{{\left( -1\right) }^{j}}\, {A_{k-j}}}{\left( 2 j\right) \operatorname{!}}\right.}\operatorname{,}{A_0}=1]$

 (%i18) FPS ( 1 / ( exp ( z ) − 1 ) , z , n ) ;

$\tag{%o18} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_n}=\sum_{k=1}^{n}{\left. -\frac{{A_{n-k}}}{k\operatorname{!}}\right.}\operatorname{,}{A_0}=1]$

Note that the coefficient of the latter generates what is called Bernoulli numbers.

2 Provided commands

The reader should be able to guess the meaning of the symbols used in the syntax below. The main commands provided by the package are:
1. FPS(f,z,n): to compute power series. By default the point of expansion is zero. A different point of expansion can be given as fourth argument (FPS(f,z,n,z0)).
2. mfoldHyper(RE,a[n]): to find m-fold hypergeometric term solutions of holonomic recurrence equations, for all positive integer m. A third argument C (mfoldHyper(RE,a[n],C)) can be spefified for computations involving algebraic numbers (Complex numbers, irrational numbers, parameters).
3. HolonomicDE(f,F(z)): to compute a holonomic differential equation satisfied by a given expression.
4. QDE(f,F(z)): to compute a quadratic differential equation satisfied by a given expression.
5. NLDE(f,F(z)): to compute an algebraic differential equation satisfied by a given expression. Sometimes this is used by FPS for non-holonomic expressions.
6. FindRE(f,z,a[n]): to compute a holonomic recurrence equation satisfied by a given expression
7. FindQRE(f,z,a[n]): to compute a non-holonomic recurrence equation (from QDE) satisfied by a given expression.
8. Taylor(f,z,z0,N): to compute truncated taylor expansions of holonomic functions. This is usefull sometimes since it is faster for computing larger-order Taylor expansions.
9. QTaylor(f,z,z0,N): to compute truncated series for non holonomic expressions. However this is not efficient in general since the recurrence equations used are not linear.
10. QNF(f,z,n): direct approach to compute power series of non-holonomic expressions. This is also used by FPS(f,z,n), but can be used to see a different result for tan(z) for example.
11. CompatibleDE(DE1,DE2,F(z)): to check the compatibility of two differential equations. This can be used for holonomic expressions in general.

Some variables of the package:
1. Nmax with default value 10, is the maximum order of differential equations computed using HolonomicDE and internally in FPS.
2. QNmax with default value 21, is the analogue for non-holonomic differential equations. Note that the differential operator used in the code does not have same order with diff(f,z,d). The corresponding function is delta2diff(f,z,d).
3. NLmax with default value 30, is the analogue for the general algebraic differential equation case. The derivative operator is deltadiff(f,z,d).
4. NLDEflag with default value false, can be useful for some demonstration with some non-holonomic functions. However, this will not be presented in this worksheet.

3 Classical examples

 (%i19) FPS ( exp ( z ) , z , n ) ;

$\tag{%o19} \sum_{n=0}^{\infty }{\left. \frac{{{z}^{n}}}{n\operatorname{!}}\right.}$

 (%i20) FPS ( log ( 1 + z ) , z , n ) ;

$\tag{%o20} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n+1}}}{n+1}\right.}$

 (%i21) FPS ( 1 / ( 1 − z ) , z , n ) ;

$\tag{%o21} \sum_{n=0}^{\infty }{\left. {{z}^{n}}\right.}$

 (%i22) FPS ( cos ( z ) , z , n ) ;

$\tag{%o22} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

 (%i23) FPS ( atan ( z ) , z , n ) ;

$\tag{%o23} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{2 n+1}\right.}$

 (%i24) FPS ( atanh ( z ) , z , n ) ;

$\tag{%o24} \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n+1}}}{2 n+1}\right.}$

 (%i25) FPS ( cosh ( z ) , z , n ) ;

$\tag{%o25} \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

 (%i26) FPS ( sinh ( z ) , z , n ) ;

$\tag{%o26} \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}$

 (%i27) FPS ( cos ( z ) , z , n ) ;

$\tag{%o27} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

 (%i28) FPS ( sin ( z ) , z , n ) ;

$\tag{%o28} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}$

 (%i29) FPS ( sin ( z ) + cos ( z ) , z , n ) ;

$\tag{%o29} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$

 (%i30) FPS ( asin ( z ) , z , n ) ;

$\tag{%o30} \sum_{n=0}^{\infty }{\left. \frac{\left( 2 n\right) \operatorname{!} {{z}^{2 n+1}}}{\left( 2 n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}$

 (%i31) FPS ( asinh ( z ) , z , n ) ;

$\tag{%o31} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, \left( 2 n\right) \operatorname{!} {{z}^{2 n+1}}}{\left( 2 n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}$

 (%i32) declare ( p , constant ) $ (%i33) FPS ( 1 / ( 1 − z ) ^ p , z , n ) ; $\tag{%o33} \sum_{n=0}^{\infty }{\left. \frac{{{(p)}_n}\, {{z}^{n}}}{n\operatorname{!}}\right.}$ 4 More thoughtfull series  (%i34) FPS ( erf ( z ) , z , n ) ; $\tag{%o34} \frac{2 \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) n\operatorname{!}}\right.}}{\sqrt{\ensuremath{\pi} }}$  (%i35) FPS ( asin ( z ) ^ 2 / z ^ 2 , z , n ) ; $\tag{%o35} \sum_{n=0}^{\infty }{\left. \frac{{{4}^{n}}\, {{n\operatorname{!}}^{2}}\, {{z}^{2 n}}}{\left( n+1\right) \, \left( 2 n+1\right) \operatorname{!}}\right.}$  (%i36) FPS ( exp ( asinh ( z ) ) , z , n ) ; $\tag{%o36} \frac{\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, \left( 2 n\right) \operatorname{!} {{z}^{2 \left( n+1\right) }}}{\left( n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}}{2}+z+1$  (%i37) FPS ( exp ( asin ( z ) ) , z , n ) ; $\tag{%o37} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -\frac{\% i-1}{2}\right) }_n}\, {{\left( \frac{\% i+1}{2}\right) }_n}\, {{4}^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -\frac{\% i}{2}\right) }_n}\, {{\left( \frac{\% i}{2}\right) }_n}\, {{4}^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$  (%i38) FPS ( sqrt ( ( 1 − sqrt ( 1 − z ) ) / z ) , z , n ) ; $\tag{%o38} \frac{\sum_{n=0}^{\infty }{\left. \frac{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, {{4}^{n}}\, {{z}^{n}}}{\left( 2 n+1\right) \operatorname{!}}\right.}}{\sqrt{2}}$  (%i39) FPS ( ( z + sqrt ( 1 + z ^ 2 ) ) ^ p , z , n ) ; $\tag{%o39} p\, \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -\frac{p-1}{2}\right) }_n}\, {{\left( \frac{p+1}{2}\right) }_n}\, {{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -\frac{p}{2}\right) }_n}\, {{\left( \frac{p}{2}\right) }_n}\, {{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$  (%i40) FPS ( exp ( z ) − 2 · exp ( − z / 2 ) · cos ( sqrt ( 3 ) · z / 2 + %pi / 3 ) , z , n ) ; $\tag{%o40} 3 \sum_{n=0}^{\infty }{\left. \frac{{{z}^{3 n+1}}}{{{\left( \frac{2}{3}\right) }_n}\, {{\left( \frac{4}{3}\right) }_n}\, {{27}^{n}} n\operatorname{!}}\right.}$  (%i41) FPS ( 1 / 2 · log ( ( 1 + z ) / ( 1 − z ) ) − atan ( z ) , z , n ) ; $\tag{%o41} 2 \sum_{n=0}^{\infty }{\left. \frac{{{z}^{4 n+3}}}{4 n+3}\right.}$  (%i42) FPS ( log ( 1 + z + z ^ 2 + z ^ 3 ) , z , n ) ; $\tag{%o42} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 \left( n+1\right) }}}{n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n+1}}}{n+1}\right.}$  (%i43) FPS ( cos ( 4 · acos ( z ) ) , z , n ) ; $\tag{%o43} 8 {{z}^{4}}-8 {{z}^{2}}+1$  (%i44) FPS ( asin ( z ) + acos ( z ) , z , n ) ; $\tag{%o44} \frac{\ensuremath{\pi} }{2}$  (%i45) FPS ( atan ( ( z + p ) / ( 1 − z · p ) ) , z , n ) ; $\tag{%o45} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{2 n+1}\right.}\right) +\operatorname{atan}(p)$  (%i46) FPS ( atan ( ( z + p ) / ( 1 − z · p ) ) − atan ( z ) , z , n ) ; $\tag{%o46} \operatorname{atan}(p)$  (%i47) FPS ( sin ( 3 · acos ( z ) ) / sqrt ( 1 − z ^ 2 ) , z , n ) ; $\tag{%o47} 4 {{z}^{2}}-1$  (%i48) FPS ( 1 / ( sqrt ( 1 − 4 · z ) ) · ( ( 1 − sqrt ( 1 − 4 · z ) ) / 2 · z ) ^ 2 , z , n ) ; $\tag{%o48} 2 \sum_{n=0}^{\infty }{\left. \frac{\left( 2 n+1\right) \operatorname{!} {{z}^{n+4}}}{\left( n+2\right) \, {{n\operatorname{!}}^{2}}}\right.}$  (%i49) FPS ( sqrt ( sqrt ( 8 · z ^ 3 + 1 ) − 1 ) , z , n ) ; $\tag{%o49} 2 \sum_{n=0}^{\infty }{\left. \frac{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, {{\left( -8\right) }^{n}}\, {{4}^{n}}\, {{z}^{\frac{3 \left( 2 n+1\right) }{2}}}}{\left( 2 n+1\right) \operatorname{!}}\right.}$  (%i50) FPS ( 1 / ( z + z ^ 2 ) , z , n ) ; $\tag{%o50} \sum_{n=0}^{\infty }{\left. {{\left( -1\right) }^{n}}\, {{z}^{n-1}}\right.}$  (%i51) FPS ( cos ( z ) / z ^ 1000 , z , n ) ; $\tag{%o51} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 \left( n-500\right) }}}{\left( 2 n\right) \operatorname{!}}\right.}$  (%i52) FPS ( log ( 1 + z ) + cos ( z ) , z , n ) ; $\tag{%o52} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n+1}}}{n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$  (%i53) FPS ( cos ( z ) + z · sin ( z ) , z , n ) ; $\tag{%o53} \frac{\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 \left( n+1\right) }}}{\left( n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}}{2}+1$  (%i54) FPS ( sin ( z ) + z · cos ( z ) , z , n ) ; $\tag{%o54} \sum_{n=0}^{\infty }{\left. \frac{2 \left( n+1\right) \, {{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}$  (%i55) FPS ( log ( 1 + sqrt ( z ) + z + z ^ ( 3 / 2 ) ) , z , n ) ; $\tag{%o55} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n+1}}}{n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{\frac{n+1}{2}}}}{n+1}\right.}$  (%i56) FPS ( atan ( z ) + exp ( z ^ 2 ) , z , n ) ; $\tag{%o56} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{2 n+1}}}{2 n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n}}}{n\operatorname{!}}\right.}$  (%i57) FPS ( exp ( z ) · cos ( z ) , z , n ) ; $\tag{%o57} \left( \sum_{n=0}^{\infty }{\left. -\frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n+3}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, \left( 2 n+1\right) \, \left( 4 n+1\right) \, \left( 4 n+3\right) \, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n+1}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, \left( 4 n+1\right) \, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}$  (%i58) FPS ( exp ( z ) · sin ( z ) , z , n ) ; $\tag{%o58} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n+3}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, \left( 2 n+1\right) \, \left( 4 n+1\right) \, \left( 4 n+3\right) \, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n+1}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, \left( 4 n+1\right) \, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 \left( 2 n+1\right) }}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, \left( 2 n+1\right) \, \left( 4 n+1\right) \, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}$  (%i59) FPS ( ( cos ( z ) + sin ( z ) ) ^ 2 , z , n ) ; $\tag{%o59} 2 \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}\right) +1$  (%i60) FPS ( ( cos ( z ) + sin ( z ) ) ^ 3 , z , n ) ; $\tag{%o60} \left( \sum_{n=0}^{\infty }{\left. \frac{3 \left( {{\left( -1\right) }^{n}}+{{\left( -9\right) }^{n}}\right) \, {{z}^{2 n+1}}}{2 \left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{\left( 3 {{\left( -1\right) }^{n}}-{{\left( -9\right) }^{n}}\right) \, {{z}^{2 n}}}{2 \left( 2 n\right) \operatorname{!}}\right.}$  (%i61) FPS ( asech ( z ) , z , n ) ; $\tag{%o61} -\left( \sum_{n=0}^{\infty }{\left. \frac{{{4}^{-n-1}}\, \left( 2 n+1\right) \operatorname{!} {{z}^{2 \left( n+1\right) }}}{{{\left( n+1\right) }^{2}}\, {{n\operatorname{!}}^{2}}}\right.}\right) -\log{(z)}+\log{(2)}$  (%i62) FPS ( exp ( z ) + log ( 1 + z ) , z , n , %e ) ; $\tag{%o62} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( \% e+1\right) }^{-n-1}}\, \left( {{\left( -1\right) }^{n}}\, \left( n+1\right) \operatorname{!}+{{\left( \% e+1\right) }^{n}}\, {{\% e}^{\% e+1}} n+{{\left( \% e+1\right) }^{n}}\, {{\% e}^{\% e}} n+{{\left( \% e+1\right) }^{n}}\, {{\% e}^{\% e+1}}+{{\left( \% e+1\right) }^{n}}\, {{\% e}^{\% e}}\right) \, {{\left( z-\% e\right) }^{n+1}}}{\left( n+1\right) \, \left( n+1\right) \operatorname{!}}\right.}\right) +\log{\left( \% e+1\right) }+{{\% e}^{\% e}}$  (%i63) FPS ( sin ( z ) + exp ( z ) , z , n , %pi ) ; $\tag{%o63} {{\% e}^{\ensuremath{\pi} }}\, \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( z-\ensuremath{\pi} \right) }^{n}}}{n\operatorname{!}}\right.}\right) -\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{\left( z-\ensuremath{\pi} \right) }^{2 n+1}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}$  (%i64) FPS ( atan ( z ) , z , n , inf ) ; $\tag{%o64} \frac{\ensuremath{\pi} }{2}-\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{-2 n-1}}}{2 n+1}\right.}$  (%i65) FPS ( exp ( 1 / z ) , z , n , inf ) ; $\tag{%o65} \sum_{n=0}^{\infty }{\left. \frac{1}{n\operatorname{!} {{z}^{n}}}\right.}$  (%i66) FPS ( z · exp ( − z ) · expintegral_ei ( z ) , z , n , inf ) ; $\tag{%o66} \sum_{n=0}^{\infty }{\left. \frac{n\operatorname{!}}{{{z}^{n}}}\right.}$  (%i67) FPS ( sqrt ( %pi ) · exp ( z ) · ( 1 − erf ( sqrt ( z ) ) ) , z , n , inf ) ; $\tag{%o67} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, \left( 2 n\right) \operatorname{!} {{z}^{-n-\frac{1}{2}}}}{{{4}^{n}} n\operatorname{!}}\right.}$  (%i68) FPS ( exp ( − 1 / z ) · expintegral_ei ( 1 / z ) / z , z , n ) ; $\tag{%o68} \sum_{n=0}^{\infty }{\left. n\operatorname{!} {{z}^{n}}\right.}$  (%i69) FPS ( acos ( z ^ ( 1 / 2 ) ) + exp ( z ^ 2 ) , z , n ) ; $\tag{%o69} \left( \sum_{n=0}^{\infty }{\left. -\frac{\left( 2 n\right) \operatorname{!} {{z}^{\frac{2 n+1}{2}}}}{\left( 2 n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n}}}{n\operatorname{!}}\right.}\right) +\frac{\ensuremath{\pi} }{2}$  (%i70) FPS ( exp ( asinh ( z ^ 2 ) ) + 1 / ( 1 − z ^ ( 2 / 3 ) ) , z , n ) ; $\tag{%o70} \left( \sum_{n=0}^{\infty }{\left. -\frac{{{\left( -1\right) }^{n}}\, \left( 2 n\right) \operatorname{!} {{z}^{4 n}}}{\left( 2 n-1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. {{z}^{\frac{2 n}{3}}}\right.}\right) +{{z}^{2}}$  (%i71) FPS ( z · log ( z ) ^ 2 + asin ( z ) , z , n ) ; $\tag{%o71} \left( \sum_{n=0}^{\infty }{\left. \frac{{{4}^{-n-1}}\, \left( 2 \left( n+1\right) \right) \operatorname{!} {{z}^{2 n+3}}}{{{\left( n+1\right) }^{2}}\, \left( 2 n+3\right) \, {{n\operatorname{!}}^{2}}}\right.}\right) +z\, \left( {{\log{(z)}}^{2}}+1\right)$  (%i72) FPS ( log ( 1 + sqrt ( z ) ) + atan ( z ^ ( 1 / 3 ) ) , z , n ) ; $\tag{%o72} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{\frac{n+1}{2}}}}{n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{\sin{\left( \frac{\ensuremath{\pi} \left( n+1\right) }{2}\right) } {{z}^{\frac{n+1}{3}}}}{n+1}\right.}$  (%i73) FPS ( sin ( 2 · z ) + cos ( z ) , z , n , %pi / 2 ) ; $\tag{%o73} -\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, \left( 2 {{4}^{n}}+1\right) \, {{\left( z-\frac{\ensuremath{\pi} }{2}\right) }^{2 n+1}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}$  (%i74) FPS ( asin ( z ) · cos ( z ) , z , n ) ; $\tag{%o74} \sum_{n=0}^{\infty }{\left. \left( \sum_{k=0}^{n}{\left. \frac{\left( 2 k\right) \operatorname{!} {{\left( -1\right) }^{n-k}}}{\left( 2 k+1\right) \, {{4}^{k}}\, {{k\operatorname{!}}^{2}}\, \left( 2 \left( n-k\right) \right) \operatorname{!}}\right.}\right) \, {{z}^{2 n+1}}\right.}$  (%i75) FPS ( atan ( z ) · log ( 1 + z ^ 2 ) , z , n ) ; $\tag{%o75} \sum_{n=0}^{\infty }{\left. {{\left( -1\right) }^{n}}\, \left( \sum_{k=0}^{n}{\left. \frac{1}{\left( 2 k+1\right) \, \left( n-k+1\right) }\right.}\right) \, {{z}^{2 n+3}}\right.}$  (%i76) FPS ( log ( 1 + z ) ^ 2 , z , n ) ; $\tag{%o76} \sum_{n=0}^{\infty }{\left. {{\left( -1\right) }^{n}}\, \left( \sum_{k=0}^{n}{\left. \frac{1}{\left( k+1\right) \, \left( n-k+1\right) }\right.}\right) \, {{z}^{n+2}}\right.}$  (%i77) FPS ( exp ( z ^ ( 3 / 2 ) ) · asin ( z ^ ( 3 / 4 ) ) , z , n ) ; $\tag{%o77} \sum_{n=0}^{\infty }{\left. \left( \sum_{k=0}^{n}{\left. \frac{{{4}^{k-n}}\, \left( 2 \left( n-k\right) \right) \operatorname{!}}{k\operatorname{!} \left( 2 n-2 k+1\right) \, {{\left( n-k\right) \operatorname{!}}^{2}}}\right.}\right) \, {{z}^{\frac{6 n+3}{4}}}\right.}$  (%i78) FPS ( log ( 1 + z ) ^ 5 , z , n ) ; $\tag{%o78} [\left( \sum_{n=1}^{\infty }{\left. \sum_{k=0}^{n-1}{\left. \frac{{A_k}\, \left( 5 n-6 k\right) \, {{\left( -1\right) }^{n-k}}\, {{z}^{n+5}}}{n\, \left( n-k+1\right) }\right.}\right.}\right) +{{z}^{5}}\operatorname{,}{A_0}=1]$  (%i79) FPS ( atan ( z ) ^ 2 , z , n ) ; $\tag{%o79} \sum_{n=0}^{\infty }{\left. {{\left( -1\right) }^{n}}\, \left( \sum_{k=0}^{n}{\left. \frac{1}{\left( 2 k+1\right) \, \left( 2 n-2 k+1\right) }\right.}\right) \, {{z}^{2 n+2}}\right.}$  (%i80) FPS ( exp ( z + z ^ 2 ) , z , n ) ; $\tag{%o80} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_{n+2}}=\frac{{A_{n+1}}+2 {A_n}}{n+2}\operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=1\operatorname{,}{A_1}=1]]$  (%i81) FPS ( exp ( z ^ ( 3 / 2 ) + sqrt ( z ) ) , z , n ) ; $\tag{%o81} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{\frac{n}{2}}}\right.}\operatorname{,}{A_{n+3}}=\frac{{A_{n+2}}+3 {A_n}}{n+3}\operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=1\operatorname{,}{A_1}=1\operatorname{,}{A_2}=\frac{1}{2}]]$  (%i82) FPS ( sec ( sqrt ( z ) ) , z , n ) ; $\tag{%o82} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_n}=\sum_{k=1}^{n}{\left. -\frac{{{\left( -1\right) }^{k}}\, {A_{n-k}}}{\left( 2 k\right) \operatorname{!}}\right.}\operatorname{,}{A_0}=1]$  (%i83) FPS ( tanh ( z ) , z , n ) ; $\tag{%o83} [\sum_{n=0}^{\infty }{\left. \left( \sum_{k=0}^{n}{\left. \frac{{A_k}}{\left( 2 n-2 k+1\right) \operatorname{!}}\right.}\right) \, {{z}^{2 n+1}}\right.}\operatorname{,}{A_k}=\sum_{j=1}^{k}{\left. -\frac{{A_{k-j}}}{\left( 2 j\right) \operatorname{!}}\right.}\operatorname{,}{A_0}=1]$  (%i84) FPS ( exp ( z ) · log ( 1 + z ) , z , n ) ; $\tag{%o84} \sum_{n=0}^{\infty }{\left. \left( \sum_{k=0}^{n}{\left. \frac{{{\left( -1\right) }^{n-k}}}{k\operatorname{!} \left( n-k+1\right) }\right.}\right) \, {{z}^{n+1}}\right.}$  (%i85) FPS ( sinh ( log ( 1 + z ) ) , z , n ) ; $\tag{%o85} \left( \sum_{n=0}^{\infty }{\left. -\frac{{{\left( -1\right) }^{n}}\, {{z}^{n}}}{2}\right.}\right) +\frac{z}{2}+\frac{1}{2}$  (%i86) FPS ( cosh ( log ( 1 + z ) ) , z , n ) ; $\tag{%o86} \left( \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{z}^{n}}}{2}\right.}\right) +\frac{z}{2}+\frac{1}{2}$  (%i87) FPS ( cos ( log ( 1 + z ) ) , z , n ) ; $\tag{%o87} \sum_{n=0}^{\infty }{\left. \frac{\left( \% i {{\left( \% i+1\right) }_n} n-\% i {{\left( 1-\% i\right) }_n} n+{{\left( \% i+1\right) }_n}+{{\left( 1-\% i\right) }_n}\right) \, {{\left( -1\right) }^{n}}\, {{z}^{n}}}{2 \left( {{n}^{2}}+1\right) n\operatorname{!}}\right.}$  (%i88) FPS ( sin ( log ( 1 + z ) ) , z , n ) ; $\tag{%o88} \sum_{n=0}^{\infty }{\left. -\frac{\left( {{\left( \% i+1\right) }_{n+1}} n+{{\left( 1-\% i\right) }_{n+1}} n-\% i {{\left( \% i+1\right) }_{n+1}}+{{\left( \% i+1\right) }_{n+1}}+\% i {{\left( 1-\% i\right) }_{n+1}}+{{\left( 1-\% i\right) }_{n+1}}\right) \, {{\left( -1\right) }^{n+1}}\, {{z}^{n+1}}}{2 \left( n+1\right) \, \left( {{n}^{2}}+2 n+2\right) n\operatorname{!}}\right.}$  (%i89) FPS ( acos ( z ) ^ 2 , z , n ) ; $\tag{%o89} -\ensuremath{\pi} \left( \sum_{n=0}^{\infty }{\left. \frac{\left( 2 n\right) \operatorname{!} {{z}^{2 n+1}}}{\left( 2 n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. \frac{{{4}^{n}}\, {{n\operatorname{!}}^{2}}\, {{z}^{2 \left( n+1\right) }}}{\left( n+1\right) \, \left( 2 n+1\right) \operatorname{!}}\right.}\right) +\frac{{{\ensuremath{\pi} }^{2}}}{4}$  (%i90) FPS ( asin ( z ) ^ 2 , z , n ) ; $\tag{%o90} \sum_{n=0}^{\infty }{\left. \frac{{{4}^{n}}\, {{n\operatorname{!}}^{2}}\, {{z}^{2 \left( n+1\right) }}}{\left( n+1\right) \, \left( 2 n+1\right) \operatorname{!}}\right.}$  (%i91) FPS ( acos ( z ) ^ 2 − asin ( z ) ^ 2 , z , n ) ; $\tag{%o91} \frac{{{\ensuremath{\pi} }^{2}}}{4}-\ensuremath{\pi} \sum_{n=0}^{\infty }{\left. \frac{\left( 2 n\right) \operatorname{!} {{z}^{2 n+1}}}{\left( 2 n+1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}$  (%i92) FPS ( sin ( z ) + sinh ( z ) , z , n ) ; $\tag{%o92} 2 \sum_{n=0}^{\infty }{\left. \frac{{{4}^{n}}\, {{z}^{4 n+1}}}{{{\left( \frac{3}{4}\right) }_n}\, {{\left( \frac{5}{4}\right) }_n}\, {{256}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}$  (%i93) FPS ( cos ( 2 · z ) + sin ( 3 · z ) , z , n ) ; $\tag{%o93} \left( \sum_{n=0}^{\infty }{\left. \frac{3 {{\left( -9\right) }^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \, \left( 2 n\right) \operatorname{!}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 n}}}{\left( 2 n\right) \operatorname{!}}\right.}$  (%i94) FPS ( sin ( z ) · cos ( z ) , z , n ) ; $\tag{%o94} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 n+1}}}{\left( 2 n+1\right) \operatorname{!}}\right.}$  (%i95) FPS ( sinh ( z ) · sin ( z ) , z , n ) ; $\tag{%o95} 2 \sum_{n=0}^{\infty }{\left. \frac{\left( n+1\right) \, {{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{2 \left( 2 n+1\right) }}}{{{\left( \frac{3}{4}\right) }_n}\, {{\left( \frac{5}{4}\right) }_n}\, {{64}^{n}}\, \left( 2 \left( n+1\right) \right) \operatorname{!}}\right.}$  (%i96) FPS ( cosh ( z ) · cos ( z ) , z , n ) ; $\tag{%o96} \sum_{n=0}^{\infty }{\left. \frac{{{\left( -1\right) }^{n}}\, {{4}^{n}}\, {{z}^{4 n}}}{{{\left( \frac{1}{4}\right) }_n}\, {{\left( \frac{3}{4}\right) }_n}\, {{64}^{n}}\, \left( 2 n\right) \operatorname{!}}\right.}$  (%i97) FPS ( exp ( z ) · cosh ( z ) , z , n ) ; $\tag{%o97} \left( \sum_{n=0}^{\infty }{\left. \frac{{{2}^{n-1}}\, {{z}^{n}}}{n\operatorname{!}}\right.}\right) +1$  (%i98) FPS ( atanh ( z ) + sqrt ( 1 + z ) + 1 / sqrt ( 1 + z ) , z , n ) ; $\tag{%o98} \left( \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n+1}}}{2 n+1}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{2 \left( n-1\right) \, {{\left( -1\right) }^{n}}\, \left( 2 n\right) \operatorname{!} {{z}^{n}}}{\left( 2 n-1\right) \, {{4}^{n}}\, {{n\operatorname{!}}^{2}}}\right.}$  (%i99) FPS ( sinh ( z ) ^ 2 + cosh ( z ) ^ 2 , z , n ) ; $\tag{%o99} 2 \left( \sum_{n=0}^{\infty }{\left. \frac{{{4}^{n}}\, {{z}^{2 \left( n+1\right) }}}{\left( n+1\right) \, \left( 2 n+1\right) \operatorname{!}}\right.}\right) +1$  (%i100) FPS ( − cosh ( z ) ^ 2 + sinh ( z ) ^ 2 , z , n ) ; $\tag{%o100} -1$  (%i101) declare ( q , constant )$
 (%i102) FPS ( 1 / ( p − z ^ 2 ) / ( q − z ^ 3 ) , z , n ) ;

$\tag{%o102} \left( \sum_{n=0}^{\infty }{\left. -\frac{p\, {{q}^{-n-1}}\, {{z}^{3 n+2}}}{{{q}^{2}}-{{p}^{3}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. -\frac{{{z}^{3 n+1}}}{\left( {{q}^{2}}-{{p}^{3}}\right) \, {{q}^{n}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. \frac{{{z}^{2 n+1}}}{\left( {{q}^{2}}-{{p}^{3}}\right) \, {{p}^{n}}}\right.}\right) +\left( \sum_{n=0}^{\infty }{\left. -\frac{{{p}^{2}}\, {{q}^{-n-1}}\, {{z}^{3 n}}}{{{q}^{2}}-{{p}^{3}}}\right.}\right) +\sum_{n=0}^{\infty }{\left. \frac{q\, {{p}^{-n-1}}\, {{z}^{2 n}}}{{{q}^{2}}-{{p}^{3}}}\right.}$

 (%i103) FPS ( exp ( 2 · atanh ( sin ( 2 · z ) / ( 1 + cos ( 2 · z ) ) ) ) , z , n ) ;

$\tag{%o103} [\sum_{n=0}^{\infty }{\left. {A_n}\, {{z}^{n}}\right.}\operatorname{,}{A_{n+4}}=\frac{3 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, {A_{k+2}}\, \left( n-k+2\right) \, {A_{n-k+2}}\right.}\right) -\left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, \left( k+3\right) \, {A_{k+3}}\, {A_{n-k+1}}\right.}\right) -4 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, {A_{k+1}}\, {A_{n-k+1}}\right.}\right) +6 \left( n+2\right) \, \left( n+3\right) \, {A_{n+3}}+8 \left( n+2\right) \, {A_{n+2}}-24 {A_{n+1}}}{\left( n+2\right) \, \left( n+3\right) \, \left( n+4\right) }\operatorname{(}3 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, {A_{k+2}}\, \left( n-k+2\right) \, {A_{n-k+2}}\right.}\right) -\left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, \left( k+2\right) \, \left( k+3\right) \, {A_{k+3}}\, {A_{n-k+1}}\right.}\right) -4 \left( \sum_{k=1}^{n}{\left. \left( k+1\right) \, {A_{k+1}}\, {A_{n-k+1}}\right.}\right) +6 \left( n+2\right) \, \left( n+3\right) \, {A_{n+3}}+8 \left( n+2\right) \, {A_{n+2}}-24 {A_{n+1}}\operatorname{)}/\left( \left( n+2\right) \, \left( n+3\right) \, \left( n+4\right) \right) \operatorname{,}n\operatorname{> =}0\operatorname{,}[{A_0}=1\operatorname{,}{A_1}=2\operatorname{,}{A_2}=2\operatorname{,}{A_3}=\frac{8}{3}]]$

 (%i104) FPS ( ( 1 + tan ( z ) ) / ( 1 − tan ( z ) ) − exp ( 2 · atanh ( sin ( 2 · z ) / ( 1 + cos ( 2 · z ) ) ) ) , z , n ) ;

$\tag{%o104} 0$

Created with wxMaxima.