Further improvements to integral property code



I have spent some time tidying up the integral property code that Dieter
and I 
have been working on recently.  It now works for functions with an
arbitrary 
number of arguements.

I then extended it to work for:
 - cases where the integral property is a function, and
 - subscripted functions.

Have a look at the bessel function and psi function for examples.

integrate(bessel_y(3,x),x);
-2*bessel_y(2,x)-bessel_y(0,x);

integrate(bessel_k(7,x),x);
2*(-bessel_k(6,x)+bessel_k(4,x)-bessel_k(2,x))+bessel_k(0,x);

integrate(psi[0](x),x);
log_gamma(x);

integrate(psi[1](x),x);
psi[0](x);


As a further test I had a go at the 0F1 hypergeometric function with the
following code (which is not in CVS).

(defprop $%f
  ((p q p-list q-list z)
   nil
   nil
   nil
   nil
   (lambda (p q p-list q-list unused)
     (cond
      ;; integral of 0F1(;b;z)
      ((and (alike1 p 0) (alike1 q 1)) (integral-0F1 (cadr q-list)))
      (t nil))))
  integral)

;; Return a form suitable for integral property
;; integral of 0F1[0,1](;b;z) = (b-1) * 0F1[0,1](;b-1;z)
(defun integral-0F1 (b)
  `((mtimes)
    ((mqapply) (($%f array) 0 1) ((mlist))
     ((mlist) ((mplus) -1 ,b)) z)
    ((mplus) -1 ,b)))


This gives:

(%i2) integrate(%f[0,1]([],[a],z),z);
(%o2)                   %f    ([], [a - 1], z) (a - 1)
                          0, 1
(%i3) diff(%,z);
(%o3)                         %f    ([], [a], z)
                                0, 1

This email is confidential and may also be privileged.  If you are not the intended recipient, please notify us immediately and delete this message from your system without first printing or copying it. Any personal data in this email (including any attachments) must be handled in accordance with the Rio Tinto Group Data Protection Policy and all applicable data protection laws.