This is very unlikely to have the effect that is required.
As has been pointed out, and should be pointed out each time you call the
pattern match compiler on a program which includes a product in which two or
more terms are associated with predicates, the pattern matcher works to
partition a product by choosing ONE element for each match. If that fails,
as could easily happen if the terms appear in different orders, the match
fails.
What does work is matching a, b, c in a*x^3+b*x^2+c*x, where x is a
known "constant" at match time.
The defmatch (etc) programs work by using programs like ratcoef(expression,
x^3).
This cannot be used if x is "something that looks like sin (??*x+??)".
RJF (original author of the matching programs..)
_____
From: maxima-bounces at math.utexas.edu [mailto:maxima-bounces at math.utexas.edu]
On Behalf Of Robert Marik
Sent: Sunday, March 23, 2008 1:48 PM
To: maxima at math.utexas.edu
Subject: Re: [Maxima] patterns for integration
On Sun, Mar 23, 2008 at 5:17 PM, Robert Dodier <robert.dodier at gmail.com>
wrote:
So (after the bug is fixed) a pattern of the form
matchdeclare (foo, lambda ([ee], member (ee, '[sin, cos])));
defmatch (polfoo, pp1 * foo (aa1 * maw_var + bb1));
Robert, many thanks. I'll try it in CVS version.
Robert Marik