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
- If
(a(n),n=0..infinity)is the sequence of numbers defined by the recurrenceexpr, the procedure computes the recurrence for the numbersa(n)/n!. - If an optional argument 'diffeq' is given,
expris considered as a linear differential equation with polynomial coefficients for the functiona(n). In this case the procedure outputs a linear differential equation verified by the Borel transform ofa(n). - The same calling convention and the
homogeneousoption apply toinvboreland its synonymLaplace. - With
operator=name, the supplied name is used verbatim for the recurrence or differential operator and output initial conditions are not computed. Inhomogeneous operator output has the formL(name)=q.
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\}\]
>