patterns for integration



Dear all

I have two questions concerning patterns matching in Maxima (btw: I have no
experinece with Mathematica and Axiom, but I think that Maxima is much
better than Maple and Derive in pattern matching, thank the developers for
their work.)

Question 1.
I have the following to check is a function is polynomial times exponential
function:

polynomialpx(e):=polynomialp(e,[maw_var]) and hipow(e,maw_var)>0;
nonzero_constant(e):=constantp(e) and (e#0);
matchdeclare(pp1,polynomialpx,aa1,nonzero_constant,bb1,constantp);
defmatch(polexp,pp1*exp(aa1*maw_var+bb1));

(maw_var is variable)
Is it possible to modify it to match the pattern   "polynomial*f(a*x+b)"
where f is sin, cos or exp ?
I can write three rules for exp, sin and cos separately, but is it possible
to do this in one defmatch?
This can be used to detect, if a function is suitable for integration by
parts and the polynomial is differentiated



Question 2.

How to check that a function is in the form R(sin(x),cos(x)) and odd with
respect to sin(x)   (i.e. the substitution cos(x)=t converts the integral
into integral of rational function)?

How to check that the function is in the form R(x,sqrt(a*x+b)) (i.e. the
substitution ax+b=t^2 simplifies the integral into integral of rational
function)?

Here R(x,y) is rational function in two variables.


Thank you
Robert Marik