gfun - Maple Programming Help

# Online Help

###### All Products    Maple    MapleSim

Home : Support : Online Help : Mathematics : Discrete Mathematics : Combinatorics : gfun : gfun/Laplace

gfun

 Laplace
 compute the Laplace transform of a generating function

 Calling Sequence Laplace(expr, a(n), t)

Parameters

 expr - linear recurrence with polynomial coefficients a - name; recurrence name n - name; index of the recurrence a t - (optional) name; 'diffeq'

Description

 • The Laplace(expr, a(n)) command computes the Laplace transform of a generating function.
 If $a\left(n\right),n=0..\mathrm{\infty }$ is the sequence of numbers defined by the recurrence expr, the Laplace function computes the recurrence for the numbers $n!a\left(n\right)$.
 • If t is specified as 'diffeq', expr is considered a linear differential equation with polynomial coefficients. The function returns a linear differential equation satisfied by its Laplace transform.
 • The invborel command can be used as a synonym of Laplace, that is, the invborel(expr, a(n)) command can be used instead.

Examples

 > $\mathrm{with}\left(\mathrm{gfun}\right):$
 > $\mathrm{rec}≔\left\{a\left(n\right)=na\left(n-1\right)+a\left(n-2\right),a\left(0\right)=0,a\left(1\right)=1\right\}:$
 > $\mathrm{deq}≔\mathrm{Laplace}\left(\mathrm{rec},a\left(n\right)\right)$
 ${\mathrm{deq}}{≔}\left\{\left({-}{{n}}^{{2}}{-}{3}{}{n}{-}{2}\right){}{a}{}\left({n}\right){+}\left({-}{{n}}^{{2}}{-}{4}{}{n}{-}{4}\right){}{a}{}\left({n}{+}{1}\right){+}{a}{}\left({n}{+}{2}\right){,}{a}{}\left({0}\right){=}{0}{,}{a}{}\left({1}\right){=}{1}\right\}$ (1)
 > $\mathrm{rec2}≔\mathrm{rectodiffeq}\left(\mathrm{deq},a\left(n\right),f\left(t\right)\right)$
 ${\mathrm{rec2}}{≔}\left({-}{2}{}{{t}}^{{2}}{-}{t}{+}{1}\right){}{f}{}\left({t}\right){+}\left({-}{4}{}{{t}}^{{3}}{-}{3}{}{{t}}^{{2}}\right){}\left(\frac{{ⅆ}}{{ⅆ}{t}}{}{f}{}\left({t}\right)\right){+}\left({-}{{t}}^{{4}}{-}{{t}}^{{3}}\right){}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{t}}^{{2}}}{}{f}{}\left({t}\right)\right){-}{t}$ (2)
 > $\mathrm{deq2}≔\mathrm{borel}\left(\mathrm{rec2},f\left(t\right),'\mathrm{diffeq}'\right)$
 ${\mathrm{deq2}}{≔}\left({-}{{t}}^{{2}}{-}{t}{+}{1}\right){}{f}{}\left({t}\right){-}\left(\frac{{ⅆ}}{{ⅆ}{t}}{}{f}{}\left({t}\right)\right){}{{t}}^{{2}}{-}{t}$ (3)
 > $\mathrm{diffeqtorec}\left(\mathrm{deq2},f\left(t\right),a\left(n\right)\right)$
 $\left\{{-}{a}{}\left({n}\right){+}\left({-}{n}{-}{2}\right){}{a}{}\left({n}{+}{1}\right){+}{a}{}\left({n}{+}{2}\right){,}{a}{}\left({0}\right){=}{0}{,}{a}{}\left({1}\right){=}{1}\right\}$ (4)

 See Also

## Was this information helpful?

 Please add your Comment (Optional) E-mail Address (Optional) What is ? This question helps us to combat spam