gfun[borel] - compute the Borel transform of a generating function

Calling Sequence

borel(expr, a(n), t, <homogeneous=bool>, <operator=name>)

Parameters

expr - linear recurrence with polynomial coefficients

a,n - name and index of the recurrence

t - (optional) 'diffeq'

homogeneous - (optional) boolean requesting a homogeneous recurrence or differential equation; the default is false

operator - (optional) name of the output operator

Description

Examples

> with(gfun):
rec:={a(n)=n*a(n-1)+a(n-2), a(0)=1, a(1)=1}:
b:= borel(rec, a(n));
\[\{-a \! \left(n \right)+\left(-n^{2}-3 n -2\right) a \! \left(n +1\right)+\left(n^{2}+3 n +2\right) a \! \left(n +2\right), a \! \left(0\right) = 1, a \! \left(1\right) = 1\}\]

invborel is the inverse command:

> invborel(b,a(n));
\[\{-a \! \left(n \right)+\left(-n -2\right) a \! \left(n +1\right)+a \! \left(n +2\right), a \! \left(0\right) = 1, a \! \left(1\right) = 1\}\]

We can also perform Borel transforms on the corresponding differential equations:

> deq:=rectodiffeq(rec, a(n), f(x)):
newdeq:= borel(deq, f(x), 'diffeq');
\[\{-f \! \left(x \right)-2 \frac{d}{d x}f \! \left(x \right)+\left(1-x \right) \left(\frac{d^{2}}{d x^{2}}f \! \left(x \right)\right), f \! \left(0\right) = 1, D\! \left(f \right)\! \left(0\right) = 1\}\]
> diffeqtorec(newdeq, f(x), a(n));
\[\{-a \! \left(n \right)+\left(-n^{2}-3 n -2\right) a \! \left(n +1\right)+\left(n^{2}+3 n +2\right) a \! \left(n +2\right), a \! \left(0\right) = 1, a \! \left(1\right) = 1\}\]
> 

See Also

gfun, gfun[invborel]