Something like the following might get you started:
(%i13) ibyparts(ii,f) := block ([gp,x,igp,lo,hi,partswitch : true],
if verbify(part(ii,0)) # verbify('integrate) then error("ouch"),
gp: part(ii,1)/f,
x : part(ii,2),
lo : part(ii,3),
hi : part(ii,4),
igp : integrate(gp,x),
if lo # 'end then
at(igp * f,x=hi) - at(igp * f,x=lo) - integrate(igp * diff(f,x),x,lo,hi)
else igp * f - integrate(igp * diff(f,x),x))$
(%i29) integrate(f(x)*exp(-w*x),x,0,1);
(%o29) integrate(%e^(-w*x)*f(x),x,0,1)
OK, I think:
(%i30) ibyparts(%, f(x));
(%o30) integrate(%e^(-w*x)*('diff(f(x),x,1)),x,0,1)/w-(f(1)*%e^(-w))/w+f(0)/w
Not so good:
(%i22) integrate(42*f(x)*exp(-w*x),x,0,1);
(%o22) 42*integrate(%e^(-w*x)*f(x),x,0,1)
(%i23) ibyparts(%, f(x));
ouch
There are issues with singularites too.
--Barton
-----maxima-bounces at math.utexas.edu wrote: -----
If someone could give me some pointers about how to detect such a thing,
I will make the modification.