Integration by parts.



Hi,

I wrote a small integration by parts function:

(%i1) ibyparts(ii,f,x) := 
block ([gp,igp,df],
    gp: part(ii,1)/f,
    igp: integrate(gp,x),igp,
    df: diff(f,x),
    igp*f - integrate(igp*df,x))$

(%i2) 'integrate (f(x)*diff(g(x),x),x);
                             /
                             [       d
(%o2)                        I f(x) (-- (g(x))) dx
                             ]       dx
                             /
(%i3) ibyparts(%,f(x),x);
                                   /
                                   [       d
(%o3)                  f(x) g(x) - I g(x) (-- (f(x))) dx
                                   ]       dx
                                   /

It seems to work OK, but my question is. Does Maxima already have
something like this? If it does, I couldn't find it!

Cheers,

Bernard.