applying function identities (proposal)



Maxima doesn't have a uniform method for applying function
identities. Some identities are controlled by switches
(for example, triginverses), while others have not-so-easy
to remember (or guess) names (such as makegamma).

Neither of these methods allow for a user to apply an
identity in a controlled fashion. You could define a defrule
for f(x) --> 2 * f(1-x), provided x > 1, but you'd need to
build another (similar) rule if you later needed to do
f(x) --> 2 * f(1-x), provided imagpart(x) > 1.

It seems to me that there should be a database of function
identities that could be searched and extended. The database
would have names for collections of identities -- say all
identities that convert something to the gamma function or
all that identities that convert to a 1F1 function.

There would be a function, say 'applyident' that works
something like this fake session:

(%i1) applyident(pochhammer_reflect, 42 + pochhammer(-x,n));
(%o1) 42 + pochhammer((-1)^n * pochhammer(x-n+1,n))

An optional predicate would determine whether to apply
the identity. For example, to apply the identity only
if the negation of the first argument to pochhammer is
a mapatom, use

(%i1) applyident(pochhammer_reflect, pochhammer(x,n) * pochhammer(-x,n),
      lambda([e], mapatom(-first(e))));
(%o1) pochhammer((-1)^n * pochhammer(x,n) * pochhammer(x-n+1,n))

Querying the database might work something like:

(%i1) findidentity(reflection);
(%o1) [bessel_reflect, pochhammer_reflect, trigreflect]

(%i2) describe_identity(pochhammer_reflect);
(%o2) pochhammer = lambda([x,n], (-1)^n * pochhammer(-x -n + 1,n));

What do you all think of this proposal? Provided there is sufficient
interest, I might work on it.
Barton