my mistake: subst(a,f(x)*g(x),eq)



> > N.A.Beishuizen at ctw.utwente.nl wrote:
> > Hello,
> >
> > I have only used maxima for a week now and I couldn't find
> > how to do this using the descriptions in the manual.
> >
> > I have an equation containing f(x), eg
> > eq: f(x)*g(x)*x*sin(f(x)
> > I want f(x) to be replaced by a so the equation is eq: a*g(x)*x*sin(a).
> > How can I do this? Subst does not accept these type of substitutions.
>
> This works for me:
>
> (%i3) f(x)*g(x)*x*sin(f(x));
> (%o3)                        x f(x) g(x) sin(f(x))
> (%i4) subst([f(x)=a],%o3);
> (%o4)                           a sin(a) x g(x)
>
> Ray

Hi, I'm sorry, It seems that I have simplified my problem too much.
What if I want to substitute f(x)*g(x) with a? 
Subst works only with complete subexpressions and atoms. 

More specifically, I want to be able to differentiate expressions like the 
above with respect to expressions, e.g.
d:  diff(eq,f(x)*g(x));
  Non-variable 2nd argument to diff:


Regards,
Nijso