> How could I convince Maxima to match the whole coefficient in any case,
> to be able to operate further on them?
>
I thought maybe a property of the diff function prevents Maxima from
stepping further in collecting the remaining parts of the coefficient,
but replacing it with a dummy function without any properties does not
change the situation:
kill(all)$
depends([u, du], x)$
tmp: 2 * diff(u,x) * diff(du, x);
matchdeclare(
a1, all,
s1, symbolp,
i1, integerp
)$
defrule(derivativetodif,
'derivative(a1, s1, i1),
dif(a1, s1, i1)
)$
defrule(
finddiff,
a1 * dif(du, s1, i1),
found(a1, [du, s1, i1])
)$
tmp1: apply1(tmp, derivativetodif);
>>> 2*dif(du,x,1)*dif(u,x,1)
apply1(tmp1, finddiff);
>>> 2*found(1,[du,x,1])*dif(u,x,1)
Thank you for any hint,
Martin