extending limit



Barton Willis wrote:
> I was playing with the idea of appending a simplim%function for the
> hypergeometric
> functions. To start, I wrote some 100% fake code:
>
> (setf (get '$hypergeometric 'simplim%function) 'limit-hg)
> (setf (get '%hypergeometric 'simplim%function) 'limit-hg)
>
> (defun limit-hg (exp var val)
>   (displa `((mequal) exp ,exp))
>   (displa `((mequal) var ,var))
>   (displa `((mequal) val ,val))
>   42)
>
> Limit assumes continuity?
>
>   (%i14) limit(hypergeometric([a],[b],x),x,0);
>   (%o14) 1
>
> Limit doesn't even try limit-hg?
>
>   (%i16) limit(hypergeometric([a],[b],x),a,0);
>   (%o16) limit(hypergeometric([a],[b],x),a,0)
>
> Towards infinity, limit tries limit-hg:
>
>   (%i17) limit(hypergeometric([3],[7],x),x,inf);
>    exp=hypergeometric([3],[7],x)
>    var=x
>    val=inf
> (%o17) 42
>
> Is there a way to get more cases funneled through limit-hg?
>   
Yes, limit assumes continuity, so you have to tell limit about
discontinuities.  There is a way to get all cases funnelled through
limit-hg, but I can't remember how.  Perhaps looking at how the elliptic
functions and integrals are done will give a hint.

It's been a while since I looked at (the very complicated) limit
routines, so it will take some time to figure it out.

Ray