Problem with 'diff(x,x) tex conversion



> On Friday 17 October 2008 06:09:17 Nathaniel E. Powell wrote:
> > After playing around with this some more, I discovered that this
> > only happens for something where the expression which is being
> > differentiated is simply the variable of differentiation.
> 
> Other examples:
> 
>   'integrate (0, x); => 0
>   'integrate (2, x); => 2*x
>   'integrate (2*x, x); => 2*'integrate(x,x)

I think we had the discussion if evaluating functions should simplify
in simple cases in the past and did disagree.

I don't remember the details, but I think the arguments where
* if we can do it then why not to do it
* We want this to work:
(%i14) integrate(f(x)*(x-1)-x*f(x)+f(x), x);
(%o14) 'integrate(-x*f(x)+(x-1)*f(x)+f(x),x)
(%i15) expand(%);
(%o15) 0

instead of getting 'integrate(0, x)

(I'm not in that camp, I think anybody using maxima for more serious stuff
than floating point arithmetik will need to know about nouns/verbs anyway.)

> Sometimes it may be a bad simplification:
> 
>   'diff(cos(x)*x,cos(x)*x); => 1
>    diff(cos(x)*x,cos(x)*x); => Non-variable 2nd argument to diff

Thanks for providing this very nice example. I didn't know this
before. Perhaps it will help to convince somebody...

Harald