Sum - Maple Help

convert/Sum

convert to inert sum representation - a formal power series

convert/sum

convert to sum representation

 Calling Sequence convert( expr, Sum, opts, Sum_opts ); convert( expr, sum, opts, Sum_opts );

Parameters

 expr - valid Maple expression, equation, set, list, or similar structure opts - (optional) arguments as described in convert/to_special_function Sum_opts - (optional) any of the following arguments intrinsic to a Sum: expansionvariable = x - indicates the expansion variable - the rhs could be any name dummy = n - indicates the dummy (summation) variable - the rhs could be any name x = a - the lhs and rhs respectively indicate the expansion variable and expansion point b(k) - a function name with an expansion variable as argument, representing the "kth coefficient" of the series expansion method = value - indicates the method to be used; value can be any of: default, Local, Global, hypergeometric, holonomic, quadratic differentialorder = n - indicates an upper bound for the order the intermediate differential equation used to represent expr; n can be any positive integer recurrence = value - indicates that the output should be a recurrence for the series coefficients b(k) instead of a Sum; value can be true or false

Description

 • The convert(expr, Sum) command attempts representing the given expr as a "formal power series", expressed using the inert Sum command. For that purpose, two approaches are used: one is a Global approach, which aims at representing the whole expression as a Sum of terms of the form ${c}_{n}{\left(x-a\right)}^{n}$, with $a$ representing a constant and ${c}_{n}$ a coefficient not depending on x, the main variable; another one is Local and consists of replacing, in expr, occurrences of mathematical functions in by their Sum representations - in this case the terms summed are of the generic form ${c}_{n}{f\left(x\right)}^{n}$, where f(x) is a mapping of x not involving functions for which a sum representation is known. The conversion to Sum does not include computing the sums.
 • All the optional arguments accepted by the Maple convert/to_special_function network are allowed, so that one can restrict the application of convert to Sum in different manners.
 • The convert(expr, sum) command does the same as convert(expr, Sum) followed by an attempt to compute all the Sums introduced, and here again to override the default behavior you can use any of the optional arguments described in convert/to_special_function.
 • By default, a combination of the Global and Local methods is used; in this approach, when possible, all mathematical functions found expr are converted, and in cases of nested mathematical functions, or linear combination of functions which admit a hypergeometric representation, a Global conversion is attempted first, taking advantage of the properties of such expressions. By invoking this conversion with the optional argument method = Global (or skip = Local), or with  method = Local (or skip = Global), respectively only the Global or the Local methods are used.
 NOTE: The use of the following optional arguments automatically make convert/Sum to skip the Local method and only work using the Global method: x = a, differentialorder = n, method = value, indicating one of the methods hypergeometric, holonomic, quadratic, and recurrence = value. Also, powers of x are not converted unless you explicitly request that using the optional argument include = powers (all powers) or include = radicals (only fractional powers).
 • The implementation for Global conversions is based on references [1] and [2] (see at the end), and mainly expands meromorphic expressions of certain type (see next paragraph) into their corresponding Laurent-Puiseux series as a Sum of terms of the form ${\sum }_{k=0}^{\mathrm{\infty }}b\left(k\right){\left(x-a\right)}^{\frac{mk+s}{q}}$, where $m$ is called the symmetry number, $s$ is the shift number, and $a$ is the expansion point. If the expansion point is not given, then an expansion around the origin is computed; if the expansion point is at infinity, then the command searches for an asymptotic (possibly divergent) series. This implementation also works for formal Laurent-Puiseux series, and in certain cases of logarithmic singularities.
 • The algorithm: given expr to be represented as a Sum, consists of first representing expr as a homogeneous linear differential equation with polynomial coefficients with appropriate initial conditions, an ODE-IVP (see gfun[holexprtodiffeq], PDEtools[dpolyform]), then finding a formal power series for it (see Slode[FPseries], dsolve, formal_series, dsolve, formal_solution).
 • The types of expressions that Global conversions can handle are:
 – expressions of hypergeometric type, where b(k+m)/b(k) is a rational function of k for some integer m
 – expressions of exponential type, which satisfy a linear homogeneous differential equation with constant coefficients
 – expressions of rational type, which are either rational or have a rational derivative
 – linear combinations of hypergeometric functions are treated by the Petkovsek-van-Hoeij algorithm; see LREtools[hypergeomsols].

Optional arguments for Global conversions

 • differentialorder: a positive integer n (default: n=4); upper bound for the order of the differential equation searched for. This controls the depth of the search for a differential equation for expr. Higher values of n will increase the chance to find the solution, but increase the running time as well.
 • method: one of default, Global, Local, hypergeometric, holonomic, or quadratic. Specifies the method that will be used; the default method uses an internal selection strategy. method=holonomic will attempt to find a linear recurrence relation for the series coefficients, instead of a Sum, and method=quadratic will try to find a quadratic recurrence relation. See the Examples below for an illustration of the various methods.
 • recurrence: either true or false (default). If recurrence = true (or recurrence for short) is given, then the output is a recurrence for the series coefficients b(k) instead of a sum. This is equivalent to first trying method=holonomic and then method=quadratic.

Examples

 > $\mathrm{FunctionAdvisor}\left(\mathrm{Ei_related}\right)\left(z\right)$
 The 7 functions in the "Ei_related" class are:
 $\left[{\mathrm{Chi}}{}\left({z}\right){,}{\mathrm{Ci}}{}\left({z}\right){,}{\mathrm{Ei}}{}\left({z}\right){,}{\mathrm{Li}}{}\left({z}\right){,}{\mathrm{Shi}}{}\left({z}\right){,}{\mathrm{Si}}{}\left({z}\right){,}{\mathrm{Ssi}}{}\left({z}\right)\right]$ (1)
 > $\mathrm{map}\left(u→u=\mathrm{convert}\left(u,\mathrm{Sum}\right),\right)$
 $\left[{\mathrm{Chi}}{}\left({z}\right){=}\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{{z}}^{{2}{+}{2}{}{\mathrm{_k1}}}}{{2}{}\left({1}{+}{\mathrm{_k1}}\right){}{\mathrm{\Gamma }}{}\left({3}{+}{2}{}{\mathrm{_k1}}\right)}\right){+}{\mathrm{ln}}{}\left({z}\right){+}{\mathrm{\gamma }}{,}{\mathrm{Ci}}{}\left({z}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{z}}^{{2}{+}{2}{}{\mathrm{_k1}}}}{{2}{}\left({1}{+}{\mathrm{_k1}}\right){}{\mathrm{\Gamma }}{}\left({3}{+}{2}{}{\mathrm{_k1}}\right)}\right){+}{\mathrm{ln}}{}\left({z}\right){+}{\mathrm{\gamma }}{,}{\mathrm{Ei}}{}\left({z}\right){=}{\mathrm{\gamma }}{-}\frac{{\mathrm{ln}}{}\left(\frac{{1}}{{z}}\right)}{{2}}{+}\frac{{\mathrm{ln}}{}\left({z}\right)}{{2}}{+}\left({\sum }_{{\mathrm{_k1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{{z}}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{}{\mathrm{_k1}}{!}}\right){,}{\mathrm{Li}}{}\left({z}\right){=}{\mathrm{Li}}{}\left({z}\right){,}{\mathrm{Shi}}{}\left({z}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{{z}}^{{1}{+}{2}{}{\mathrm{_k1}}}}{\left({1}{+}{2}{}{\mathrm{_k1}}\right){}{\mathrm{\Gamma }}{}\left({2}{+}{2}{}{\mathrm{_k1}}\right)}{,}{\mathrm{Si}}{}\left({z}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{z}{}{\mathrm{pochhammer}}{}\left(\frac{{1}}{{2}}{,}{\mathrm{_k1}}\right){}{\left({-}\frac{{{z}}^{{2}}}{{4}}\right)}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}{}{{\mathrm{pochhammer}}{}\left(\frac{{3}}{{2}}{,}{\mathrm{_k1}}\right)}^{{2}}}{,}{\mathrm{Ssi}}{}\left({z}\right){=}\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{z}{}{\mathrm{pochhammer}}{}\left(\frac{{1}}{{2}}{,}{\mathrm{_k1}}\right){}{\left({-}\frac{{{z}}^{{2}}}{{4}}\right)}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}{}{{\mathrm{pochhammer}}{}\left(\frac{{3}}{{2}}{,}{\mathrm{_k1}}\right)}^{{2}}}\right){-}\frac{{\mathrm{\pi }}}{{2}}\right]$ (2)

By default, the following command only converts Sum into sum.

 > $\mathrm{convert}\left({-1}_{},\mathrm{sum}\right)$
 ${\mathrm{Ssi}}{}\left({z}\right){=}{\mathrm{Si}}{}\left({z}\right){-}\frac{{\mathrm{\pi }}}{{2}}$ (3)

Verify lhs = rhs

 > $\mathrm{convert}\left(,\mathrm{Si}\right)$
 ${\mathrm{Si}}{}\left({z}\right){-}\frac{{\mathrm{\pi }}}{{2}}{=}{\mathrm{Si}}{}\left({z}\right){-}\frac{{\mathrm{\pi }}}{{2}}$ (4)

Note that some conversions are possible only under assumptions.

 > $\mathrm{FunctionAdvisor}\left(\mathrm{sum},\mathrm{tan}\right)$
 * Partial match of "sum" against topic "sum_form".
 $\left[{\mathrm{tan}}{}\left({z}\right){=}{\sum }_{{\mathrm{_k1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{bernoulli}}{}\left({2}{}{\mathrm{_k1}}\right){}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{z}}^{{-}{1}{+}{2}{}{\mathrm{_k1}}}{}\left({{4}}^{{\mathrm{_k1}}}{-}{{16}}^{{\mathrm{_k1}}}\right)}{{\mathrm{\Gamma }}{}\left({1}{+}{2}{}{\mathrm{_k1}}\right)}{,}\left|{z}\right|{<}\frac{{\mathrm{\pi }}}{{2}}\right]$ (5)

Therefore, the following is not converted.

 > $\mathrm{convert}\left(\mathrm{tan}\left(z\right),\mathrm{Sum}\right)$
 ${\mathrm{tan}}{}\left({z}\right)$ (6)

The conversion occurs only when you specify the proper assumptions.

 > $\mathrm{convert}\left(\mathrm{tan}\left(z\right),\mathrm{Sum}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\left|z\right|<\frac{1\mathrm{Pi}}{2}$
 ${\sum }_{{\mathrm{_k1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{bernoulli}}{}\left({2}{}{\mathrm{_k1}}\right){}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{z}}^{{-}{1}{+}{2}{}{\mathrm{_k1}}}{}\left({{4}}^{{\mathrm{_k1}}}{-}{{16}}^{{\mathrm{_k1}}}\right)}{{\mathrm{\Gamma }}{}\left({1}{+}{2}{}{\mathrm{_k1}}\right)}$ (7)
 > $\mathrm{convert}\left(\mathrm{ln}\left(x\right),\mathrm{Sum},x=1,\mathrm{dummy}=n\right)$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\left({-1}\right)}^{{n}}{}{\left({x}{-}{1}\right)}^{{n}{+}{1}}}{{n}{+}{1}}$ (8)

By default, powers, or rational expressions, are not converted to Sum unless explicitly requested, e.g. using the include = powers  (could also be include = ratpoly or include = radicals) optional argument; make the dummy summation be $n$

 > $\mathrm{ee}≔\sqrt{\frac{1-\sqrt{1-x}}{x}}$
 ${\mathrm{ee}}{≔}\sqrt{\frac{{1}{-}\sqrt{{1}{-}{x}}}{{x}}}$ (9)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 $\sqrt{\frac{{1}{-}\sqrt{{1}{-}{x}}}{{x}}}$ (10)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},\mathrm{include}=\mathrm{powers},\mathrm{dummy}=n\right)$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{{2}}^{{-}\frac{{1}}{{2}}{-}{4}{}{n}}{}\left({2}{}{n}{+}{1}\right){}\left({4}{}{n}\right){!}{}{{x}}^{{n}}}{{\left({2}{}{n}{+}{1}\right){!}}^{{2}}}$ (11)

The output above is computed using the Global algorithm; let's see the output representing first, Locally, each of the powers found in $\mathrm{ee}$ as MeijerG functions, then representing these functions as Sums

 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},\mathrm{include}=\mathrm{powers},\mathrm{dummy}=m,\mathrm{method}=\mathrm{Local}\right)$
 ${\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{{\left({1}{+}\left({-}{1}{+}{\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{{\mathrm{\Gamma }}{}\left({-}\frac{{1}}{{2}}{+}{m}\right){}{{x}}^{{m}}}{{2}{}\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({1}{+}{m}\right)}\right)\right){}\left({\sum }_{{m}{=}{0}}^{{\mathrm{\infty }}}{}{\left({-1}\right)}^{{m}}{}{\left({x}{-}{1}\right)}^{{m}}\right)\right)}^{{m}}{}{\mathrm{\Gamma }}{}\left({-}\frac{{1}}{{2}}{+}{m}\right)}{{2}{}\sqrt{{\mathrm{\pi }}}{}{\mathrm{\Gamma }}{}\left({1}{+}{m}\right)}\right)$ (12)

Expansions around t = 0 or t = 1; note the indication of the expansion variable when indicating the expansion point

 > $\mathrm{ee}≔\frac{t}{1-xt-{t}^{2}}$
 ${\mathrm{ee}}{≔}\frac{{t}}{{-}{{t}}^{{2}}{-}{x}{}{t}{+}{1}}$ (13)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},t=0,\mathrm{include}=\mathrm{powers}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{\left({\left(\frac{{x}}{{2}}{-}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{1}{+}{\mathrm{_k1}}}{-}{\left(\frac{{x}}{{2}}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{1}{+}{\mathrm{_k1}}}\right){}{{t}}^{{1}{+}{\mathrm{_k1}}}}{\sqrt{{{x}}^{{2}}{+}{4}}}\right)$ (14)

This command also computes around t = 0

 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},\mathrm{expansionvariable}=t,\mathrm{include}=\mathrm{powers}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{\left({\left(\frac{{x}}{{2}}{-}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{1}{+}{\mathrm{_k1}}}{-}{\left(\frac{{x}}{{2}}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{1}{+}{\mathrm{_k1}}}\right){}{{t}}^{{1}{+}{\mathrm{_k1}}}}{\sqrt{{{x}}^{{2}}{+}{4}}}\right)$ (15)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},t=1,\mathrm{include}=\mathrm{powers}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{\left({{x}}^{{1}{-}{\mathrm{_k1}}}{}{{2}}^{{-}{\mathrm{_k1}}}{}\sqrt{{{x}}^{{2}}{+}{4}}{}{\left({-}{x}{-}{2}{+}\sqrt{{{x}}^{{2}}{+}{4}}\right)}^{{\mathrm{_k1}}}{+}{{x}}^{{2}{-}{\mathrm{_k1}}}{}{{2}}^{{-}{\mathrm{_k1}}}{}{\left({-}{x}{-}{2}{+}\sqrt{{{x}}^{{2}}{+}{4}}\right)}^{{\mathrm{_k1}}}{-}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{1}{-}{\mathrm{_k1}}}{}\sqrt{{{x}}^{{2}}{+}{4}}{}{\left(\frac{{x}}{{2}}{+}{1}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{\mathrm{_k1}}}{+}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{2}{-}{\mathrm{_k1}}}{}{\left(\frac{{x}}{{2}}{+}{1}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{\mathrm{_k1}}}{-}{{2}}^{{1}{-}{\mathrm{_k1}}}{}{{x}}^{{-}{\mathrm{_k1}}}{}\sqrt{{{x}}^{{2}}{+}{4}}{}{\left({-}{x}{-}{2}{+}\sqrt{{{x}}^{{2}}{+}{4}}\right)}^{{\mathrm{_k1}}}{+}{2}{}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{-}{\mathrm{_k1}}}{}\sqrt{{{x}}^{{2}}{+}{4}}{}{\left(\frac{{x}}{{2}}{+}{1}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{\mathrm{_k1}}}{+}{4}{}{{2}}^{{-}{\mathrm{_k1}}}{}{{x}}^{{-}{\mathrm{_k1}}}{}{\left({-}{x}{-}{2}{+}\sqrt{{{x}}^{{2}}{+}{4}}\right)}^{{\mathrm{_k1}}}{+}{4}{}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{-}{\mathrm{_k1}}}{}{\left(\frac{{x}}{{2}}{+}{1}{+}\frac{\sqrt{{{x}}^{{2}}{+}{4}}}{{2}}\right)}^{{\mathrm{_k1}}}\right){}{\left({t}{-}{1}\right)}^{{\mathrm{_k1}}}}{{2}{}\left({{x}}^{{2}}{+}{4}\right){}{x}}\right)$ (16)

For composite mathematical functions, first the Global approach is attempted

 > $\mathrm{ee}≔{ⅇ}^{\mathrm{arcsin}\left(x\right)}$
 ${\mathrm{ee}}{≔}{{ⅇ}}^{{\mathrm{arcsin}}{}\left({x}\right)}$ (17)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left(\frac{{\mathrm{pochhammer}}{}\left({-}\frac{{I}}{{2}}{,}{\mathrm{_k1}}\right){}{\mathrm{pochhammer}}{}\left(\frac{{I}}{{2}}{,}{\mathrm{_k1}}\right){}{{4}}^{{\mathrm{_k1}}}{}{{x}}^{{2}{}{\mathrm{_k1}}}}{\left({2}{}{\mathrm{_k1}}\right){!}}{+}\frac{{\mathrm{pochhammer}}{}\left(\frac{{1}}{{2}}{-}\frac{{I}}{{2}}{,}{\mathrm{_k1}}\right){}{\mathrm{pochhammer}}{}\left(\frac{{1}}{{2}}{+}\frac{{I}}{{2}}{,}{\mathrm{_k1}}\right){}{{4}}^{{\mathrm{_k1}}}{}{{x}}^{{1}{+}{2}{}{\mathrm{_k1}}}}{\left({1}{+}{2}{}{\mathrm{_k1}}\right){!}}\right)$ (18)

User-defined functions are handled provided their derivative is known. You define the derivative of the function $g$ as follows (see diff for more information).

 > diff/g := proc(a,x) g(a)*diff(a,x) end proc;
 ${\mathrm{diff/g}}{≔}{\mathbf{proc}}\left({a}{,}{x}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{g}{}\left({a}\right){*}\left({\mathrm{diff}}{}\left({a}{,}{x}\right)\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (19)
 > $\mathrm{convert}\left(g\left(x\right),\mathrm{Sum}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{g}{}\left({0}\right){}{{x}}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}}$ (20)

Indefinite integrals are handled.

 > $\mathrm{ee}≔{{∫}}_{0}^{x}\frac{\mathrm{erf}\left(t\right)}{t}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}t$
 ${\mathrm{ee}}{≔}{{\int }}_{{0}}^{{x}}\frac{{\mathrm{erf}}{}\left({t}\right)}{{t}}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (21)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},\mathrm{expansionvariable}=x\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{2}{}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{1}{+}{2}{}{\mathrm{_k1}}}}{{\left({1}{+}{2}{}{\mathrm{_k1}}\right)}^{{2}}{}\sqrt{{\mathrm{\pi }}}{}{\mathrm{_k1}}{!}}$ (22)

Linear combinations of hypergeometric functions are recognized.

 > $\mathrm{ee}≔\left(-\frac{1x}{2}+\frac{1{x}^{3}}{6}\right)\mathrm{arctan}\left(x\right)+\left(-\frac{1{x}^{2}}{4}+\frac{1}{12}\right)\mathrm{ln}\left({x}^{2}+1\right)+\frac{5{x}^{2}}{12}+\frac{1}{4}$
 ${\mathrm{ee}}{≔}\left({-}\frac{{1}}{{2}}{}{x}{+}\frac{{1}}{{6}}{}{{x}}^{{3}}\right){}{\mathrm{arctan}}{}\left({x}\right){+}\left({-}\frac{{{x}}^{{2}}}{{4}}{+}\frac{{1}}{{12}}\right){}{\mathrm{ln}}{}\left({{x}}^{{2}}{+}{1}\right){+}\frac{{5}{}{{x}}^{{2}}}{{12}}{+}\frac{{1}}{{4}}$ (23)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 $\frac{{1}}{{4}}{+}\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{4}{+}{2}{}{\mathrm{_k1}}}}{{4}{}\left({1}{+}{\mathrm{_k1}}\right){}\left({1}{+}{2}{}{\mathrm{_k1}}\right){}\left({2}{+}{\mathrm{_k1}}\right){}\left({3}{+}{2}{}{\mathrm{_k1}}\right)}\right)$ (24)

In the next example, the output is expressed in terms of algebraic numbers.

 > $\mathrm{ee}≔\frac{1}{{x}^{4}+x+1}$
 ${\mathrm{ee}}{≔}\frac{{1}}{{{x}}^{{4}}{+}{x}{+}{1}}$ (25)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},\mathrm{include}=\mathrm{powers}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{\left({\sum }_{{\mathrm{_α}}{=}{\mathrm{RootOf}}{}\left({{\mathrm{_Z}}}^{{4}}{+}{\mathrm{_Z}}{+}{1}\right)}{}\left({36}{}{{\mathrm{_α}}}^{{3}}{-}{48}{}{{\mathrm{_α}}}^{{2}}{+}{64}{}{\mathrm{_α}}{+}{27}\right){}{{\mathrm{_α}}}^{{-}{1}{-}{\mathrm{_k1}}}\right){}{{x}}^{{\mathrm{_k1}}}}{{229}}$ (26)

Maple's special functions are handled.

 > $\mathrm{ee}≔\mathrm{AiryAi}\left(x\right)$
 ${\mathrm{ee}}{≔}{\mathrm{AiryAi}}{}\left({x}\right)$ (27)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\left({-}\frac{{\mathrm{\Gamma }}{}\left(\frac{{2}}{{3}}\right){}{{3}}^{{1}}{{6}}}{}{x}{}{\left(\frac{{{x}}^{{3}}}{{9}}\right)}^{{\mathrm{_k1}}}}{{2}{}{\mathrm{\pi }}{}{\mathrm{_k1}}{!}{}{\mathrm{pochhammer}}{}\left(\frac{{4}}{{3}}{,}{\mathrm{_k1}}\right)}{+}\frac{{{3}}^{{1}}{{3}}}{}{\left(\frac{{{x}}^{{3}}}{{9}}\right)}^{{\mathrm{_k1}}}}{{3}{}{\mathrm{\Gamma }}{}\left(\frac{{2}}{{3}}\right){}{\mathrm{_k1}}{!}{}{\mathrm{pochhammer}}{}\left(\frac{{2}}{{3}}{,}{\mathrm{_k1}}\right)}\right)$ (28)

In this case, convert/Sum returns without expanding

 > $\mathrm{ee}≔\mathrm{hypergeom}\left(\left[a,b\right],\left[c\right],x\right)$
 ${\mathrm{ee}}{≔}{\mathrm{hypergeom}}{}\left(\left[{a}{,}{b}\right]{,}\left[{c}\right]{,}{x}\right)$ (29)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${\mathrm{hypergeom}}{}\left(\left[{a}{,}{b}\right]{,}\left[{c}\right]{,}{x}\right)$ (30)

because a conversion exists only for restricted values of the parameters; these restrictions are seen via (see FunctionAdvisor):

 > $\mathrm{FunctionAdvisor}\left(\mathrm{sum},\mathrm{ee}\right)$
 * Partial match of "sum" against topic "sum_form".
 $\left[{\mathrm{hypergeom}}{}\left(\left[{a}{,}{b}\right]{,}\left[{c}\right]{,}{x}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{pochhammer}}{}\left({a}{,}{\mathrm{_k1}}\right){}{\mathrm{pochhammer}}{}\left({b}{,}{\mathrm{_k1}}\right){}{{x}}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}{}{\mathrm{pochhammer}}{}\left({c}{,}{\mathrm{_k1}}\right)}{,}\left({a}{::}{\mathrm{Typesetting}}{:-}{\mathrm{_Hold}}{}\left(\left[{\mathrm{nonposint}}\right]\right){\wedge }{c}{\ne }{a}{+}{1}\right){\vee }\left|{x}\right|{<}{1}{\vee }\left(\left|{x}\right|{=}{1}{\wedge }{0}{<}{-}{\mathrm{\Re }}{}\left({-}{c}{+}{a}{+}{b}\right)\right){\vee }\left(\left|{x}\right|{=}{1}{\wedge }{x}{\ne }{1}{\wedge }{-}{\mathrm{\Re }}{}\left({-}{c}{+}{a}{+}{b}\right){\in }\left({-1}{,}{0}\right]\right)\right]$ (31)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}\mathrm{And}\left(a::\mathrm{nonposint},c\ne a+1\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{pochhammer}}{}\left({a}{,}{\mathrm{_k1}}\right){}{\mathrm{pochhammer}}{}\left({b}{,}{\mathrm{_k1}}\right){}{{x}}^{{\mathrm{_k1}}}}{{\mathrm{_k1}}{!}{}{\mathrm{pochhammer}}{}\left({c}{,}{\mathrm{_k1}}\right)}$ (32)
 > $\mathrm{ee}≔\mathrm{tan}\left(x\right)$
 ${\mathrm{ee}}{≔}{\mathrm{tan}}{}\left({x}\right)$ (33)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${\mathrm{tan}}{}\left({x}\right)$ (34)
 > $\mathrm{FunctionAdvisor}\left(\mathrm{sum},\mathrm{ee}\right)$
 * Partial match of "sum" against topic "sum_form".
 $\left[{\mathrm{tan}}{}\left({x}\right){=}{\sum }_{{\mathrm{_k1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{bernoulli}}{}\left({2}{}{\mathrm{_k1}}\right){}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{-}{1}{+}{2}{}{\mathrm{_k1}}}{}\left({{4}}^{{\mathrm{_k1}}}{-}{{16}}^{{\mathrm{_k1}}}\right)}{{\mathrm{\Gamma }}{}\left({1}{+}{2}{}{\mathrm{_k1}}\right)}{,}\left|{x}\right|{<}\frac{{\mathrm{\pi }}}{{2}}\right]$ (35)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{-1}_{}$
 ${\sum }_{{\mathrm{_k1}}{=}{1}}^{{\mathrm{\infty }}}{}\frac{{\mathrm{bernoulli}}{}\left({2}{}{\mathrm{_k1}}\right){}{\left({-1}\right)}^{{\mathrm{_k1}}}{}{{x}}^{{-}{1}{+}{2}{}{\mathrm{_k1}}}{}\left({{4}}^{{\mathrm{_k1}}}{-}{{16}}^{{\mathrm{_k1}}}\right)}{{\mathrm{\Gamma }}{}\left({1}{+}{2}{}{\mathrm{_k1}}\right)}$ (36)

Hidden polynomials are frequently detected.

 > $\mathrm{ee}≔\mathrm{cos}\left(4\mathrm{arccos}\left(x\right)\right)$
 ${\mathrm{ee}}{≔}{\mathrm{cos}}{}\left({4}{}{\mathrm{arccos}}{}\left({x}\right)\right)$ (37)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${8}{}{{x}}^{{4}}{-}{8}{}{{x}}^{{2}}{+}{1}$ (38)

Asymptotic power series can be computed.

 > $\mathrm{ee}≔{ⅇ}^{{x}^{2}}\left(1-\mathrm{erf}\left(x\right)\right)$
 ${\mathrm{ee}}{≔}{{ⅇ}}^{{{x}}^{{2}}}{}\left({1}{-}{\mathrm{erf}}{}\left({x}\right)\right)$ (39)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},x=\mathrm{∞}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\left({-1}\right)}^{{\mathrm{_k1}}}{}\left({2}{}{\mathrm{_k1}}\right){!}{}{{4}}^{{-}{\mathrm{_k1}}}{}{\left(\frac{{1}}{{x}}\right)}^{{1}{+}{2}{}{\mathrm{_k1}}}}{\sqrt{{\mathrm{\pi }}}{}{\mathrm{_k1}}{!}}$ (40)
 > $\mathrm{ee}≔\mathrm{sin}\left(\frac{1}{x}\right)$
 ${\mathrm{ee}}{≔}{\mathrm{sin}}{}\left(\frac{{1}}{{x}}\right)$ (41)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},x=\mathrm{∞}\right)$
 ${\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{\left({-1}\right)}^{{\mathrm{_k1}}}{}{\left(\frac{{1}}{{x}}\right)}^{{1}{+}{2}{}{\mathrm{_k1}}}}{\left({1}{+}{2}{}{\mathrm{_k1}}\right){!}}$ (42)

An example where a the command fails to compute a closed form for the coefficients in the formal power series and so it returns, under request, the recurrence equation for these coefficients.

 > $\mathrm{ee}≔{\mathrm{arcsin}\left(x\right)}^{3}$
 ${\mathrm{ee}}{≔}{{\mathrm{arcsin}}{}\left({x}\right)}^{{3}}$ (43)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)$
 ${{\mathrm{arcsin}}{}\left({x}\right)}^{{3}}$ (44)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum},b\left(k\right),\mathrm{recurrence}\right)$
 $\left({\sum }_{{k}{=}{0}}^{{\mathrm{\infty }}}{}{b}{}\left({k}\right){}{{x}}^{{k}{+}{1}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{b}{}\left({k}\right){=}{\mathrm{RESol}}{}\left(\left\{\left({{k}}^{{4}}{+}{4}{}{{k}}^{{3}}{+}{6}{}{{k}}^{{2}}{+}{4}{}{k}{+}{1}\right){}{b}{}\left({k}\right){+}\left({-}{2}{}{{k}}^{{4}}{-}{18}{}{{k}}^{{3}}{-}{62}{}{{k}}^{{2}}{-}{98}{}{k}{-}{60}\right){}{b}{}\left({k}{+}{2}\right){+}\left({{k}}^{{4}}{+}{14}{}{{k}}^{{3}}{+}{71}{}{{k}}^{{2}}{+}{154}{}{k}{+}{120}\right){}{b}{}\left({k}{+}{4}\right){=}{0}\right\}{,}\left\{{b}{}\left({k}\right)\right\}{,}\left\{{b}{}\left({0}\right){=}{0}{,}{b}{}\left({1}\right){=}{0}{,}{b}{}\left({2}\right){=}{1}{,}{b}{}\left({3}\right){=}{0}\right\}{,}{\mathrm{INFO}}\right)\right\}$ (45)

Note however that in this case a conversion exists for the appropriate conditions on the function parameters:

 > $\mathrm{FunctionAdvisor}\left(\mathrm{sum},\mathrm{arcsin}\left(x\right)\right)$
 * Partial match of "sum" against topic "sum_form".
 $\left[{\mathrm{arcsin}}{}\left({x}\right){=}{\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{-I}{}\left({-}{1}{+}{I}{}{x}{+}\sqrt{{-}{{x}}^{{2}}{+}{1}}\right){}{\left({1}{-}{I}{}{x}{-}\sqrt{{-}{{x}}^{{2}}{+}{1}}\right)}^{{\mathrm{_k1}}}}{{1}{+}{\mathrm{_k1}}}{,}\left|{-}{1}{+}{I}{}{x}{+}\sqrt{{-}{{x}}^{{2}}{+}{1}}\right|{<}{1}\right]$ (46)
 > $\mathrm{convert}\left(\mathrm{ee},\mathrm{Sum}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}assuming\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{-1}_{}$
 ${\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{I}{}{\left({1}{-}{I}{}{x}{-}\sqrt{{-}{{x}}^{{2}}{+}{1}}\right)}^{{1}{+}{\mathrm{_k1}}}}{{1}{+}{\mathrm{_k1}}}\right)}^{{3}}$ (47)

 > $\mathrm{convert}\left({\mathrm{arcsin}\left(z\right)}^{2},\mathrm{Sum}\right)$
 ${{\mathrm{arcsin}}{}\left({z}\right)}^{{2}}$ (48)
 > $\mathrm{convert}\left({\mathrm{arcsin}\left(z\right)}^{2},\mathrm{Sum},\mathrm{dummy}=n,\mathrm{method}=\mathrm{hypergeometric}\right)$
 ${\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}\frac{{2}{}{{n}{!}}^{{2}}{}{{4}}^{{n}}{}{{z}}^{{2}{}{n}{+}{2}}}{\left({2}{}{n}{+}{2}\right){!}}$ (49)
 > $\mathrm{convert}\left({\mathrm{arcsin}\left(z\right)}^{2},\mathrm{Sum},B\left(n\right),\mathrm{method}=\mathrm{holonomic}\right)$
 $\left({\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{B}{}\left({n}\right){}{{z}}^{{n}{+}{1}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{B}{}\left({n}\right){=}{\mathrm{RESol}}{}\left(\left\{\left({-}{{n}}^{{2}}{-}{2}{}{n}{-}{1}\right){}{B}{}\left({n}\right){+}\left({{n}}^{{2}}{+}{5}{}{n}{+}{6}\right){}{B}{}\left({n}{+}{2}\right){=}{0}\right\}{,}\left\{{B}{}\left({n}\right)\right\}{,}\left\{{B}{}\left({0}\right){=}{0}{,}{B}{}\left({1}\right){=}{1}\right\}{,}{\mathrm{INFO}}\right)\right\}$ (50)
 > $\mathrm{convert}\left({\mathrm{arcsin}\left(z\right)}^{2},\mathrm{Sum},B\left(n\right),\mathrm{recurrence}\right)$
 $\left({\sum }_{{n}{=}{0}}^{{\mathrm{\infty }}}{}{B}{}\left({n}\right){}{{z}}^{{n}{+}{1}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{B}{}\left({n}\right){=}{\mathrm{RESol}}{}\left(\left\{\left({-}{{n}}^{{2}}{-}{2}{}{n}{-}{1}\right){}{B}{}\left({n}\right){+}\left({{n}}^{{2}}{+}{5}{}{n}{+}{6}\right){}{B}{}\left({n}{+}{2}\right){=}{0}\right\}{,}\left\{{B}{}\left({n}\right)\right\}{,}\left\{{B}{}\left({0}\right){=}{0}{,}{B}{}\left({1}\right){=}{1}\right\}{,}{\mathrm{INFO}}\right)\right\}$ (51)

In the next example, only a quadratic recurrence equation exists, but not a holonomic one.

 > $\mathrm{convert}\left(\frac{z}{{ⅇ}^{z}-1},\mathrm{Sum},\mathrm{method}=\mathrm{hypergeometric}\right)$
 $\frac{{z}}{{{ⅇ}}^{{z}}{-}{1}}$ (52)
 > $\mathrm{convert}\left(\frac{z}{{ⅇ}^{z}-1},\mathrm{Sum},\mathrm{method}=\mathrm{holonomic}\right)$
 $\frac{{z}}{{{ⅇ}}^{{z}}{-}{1}}$ (53)
 > $\mathrm{convert}\left(\frac{z}{{ⅇ}^{z}-1},\mathrm{Sum},\mathrm{method}=\mathrm{quadratic}\right)$
 $\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}{A}{}\left({\mathrm{_k1}}\right){}{{z}}^{{\mathrm{_k1}}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{A}{}\left({\mathrm{_k1}}\right){=}{\mathrm{RESol}}{}\left({A}{}\left({3}{+}{\mathrm{_k1}}\right){+}\frac{\left({\sum }_{{\mathrm{_k}}{=}{1}}^{{2}{+}{\mathrm{_k1}}}{}{A}{}\left({\mathrm{_k}}\right){}{A}{}\left({3}{+}{\mathrm{_k1}}{-}{\mathrm{_k}}\right)\right){+}{A}{}\left({2}{+}{\mathrm{_k1}}\right)}{{4}{+}{\mathrm{_k1}}}{,}\left\{{A}{}\left({\mathrm{_k1}}\right)\right\}{,}\left\{{A}{}\left({0}\right){=}{1}{,}{A}{}\left({1}\right){=}{-}\frac{{1}}{{2}}{,}{A}{}\left({2}\right){=}\frac{{1}}{{12}}\right\}{,}{\mathrm{INFO}}\right)\right\}$ (54)
 > $\mathrm{convert}\left(\frac{z}{{ⅇ}^{z}-1},\mathrm{Sum},\mathrm{recurrence}\right)$
 $\left({\sum }_{{\mathrm{_k1}}{=}{0}}^{{\mathrm{\infty }}}{}{A}{}\left({\mathrm{_k1}}\right){}{{z}}^{{\mathrm{_k1}}}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&where}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left\{{A}{}\left({\mathrm{_k1}}\right){=}{\mathrm{RESol}}{}\left({A}{}\left({3}{+}{\mathrm{_k1}}\right){+}\frac{\left({\sum }_{{\mathrm{_k}}{=}{1}}^{{2}{+}{\mathrm{_k1}}}{}{A}{}\left({\mathrm{_k}}\right){}{A}{}\left({3}{+}{\mathrm{_k1}}{-}{\mathrm{_k}}\right)\right){+}{A}{}\left({2}{+}{\mathrm{_k1}}\right)}{{4}{+}{\mathrm{_k1}}}{,}\left\{{A}{}\left({\mathrm{_k1}}\right)\right\}{,}\left\{{A}{}\left({0}\right){=}{1}{,}{A}{}\left({1}\right){=}{-}\frac{{1}}{{2}}{,}{A}{}\left({2}\right){=}\frac{{1}}{{12}}\right\}{,}{\mathrm{INFO}}\right)\right\}$ (55)

References

 [1] Wolfram Koepf, Power series in computer algebra. Journal of Symbolic Computation 13, 1992, 581-603
 [2] Dominik Gruntz, Wolfram Koepf: Maple package on formal power series. Maple Technical Newsletter 2 (2), 1995, 22-28

Compatibility

 • The convert/Sum command was updated in Maple 2022.