Subject: Further improvements to integral property code
From: Billinghurst, David (RTATECH)
Date: Sun, 4 Jan 2009 14:46:06 +1100
> From: David Billinghurst
>
> 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.
>
> As a further test I had a go at the 0F1 hypergeometric
> function with the following code (which is not in CVS).
... and here is naive code for a pFq hypergeometric function.
I don't know enough about these functions to know if we should
do if any of the terms in the denominator are zero.
(defprop $%f
((p q p-list q-list z)
nil
nil
nil
nil
(lambda (p q p-list q-list unused)
(cond
((and ($integerp p)
($integerp q)
(= ($length p-list) p)
(= ($length q-list) q))
(let* ((p-list-1
`((mlist) ,@(map 'list (lambda (x) (sub x 1)) (cdr
p-list))))
(q-list-1
`((mlist) ,@(map 'list (lambda (x) (sub x 1)) (cdr
q-list)))))
`((mtimes)
,(div
`((mtimes) ,@(cdr q-list-1))
`((mtimes) ,@(cdr p-list-1)))
((mqapply) (($%f array) ,p ,q)
,p-list-1
,q-list-1
z))))
(t nil))))
integral)
With this:
(%i31) integrate(%f[2,2]([a1,a2],[b1,b2],x),x);
%f ([a1 - 1, a2 - 1], [b1 - 1, b2 - 1], x) (b1 - 1) (b2 - 1)
2, 2
(%o31) ---------------------------------------------------------------
(a1 - 1) (a2 - 1)
(%i33) integrate(x*%f[2,2]([a1,a2],[b1,b2],x^2),x);
2
%f ([a1 - 1, a2 - 1], [b1 - 1, b2 - 1], x ) (b1 - 1) (b2 - 1)
2, 2
(%o33) ----------------------------------------------------------------
2 (a1 - 1) (a2 - 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.