diff ignores some rules? Re: [Maxima] handling tellsimp'ed rules



declare is not enough, I need the real differentiation to take place. 
multiplying by a constant was just an example. Consider as another 
example exp(...some stuff 1... + II(...expression.., t)), where the 
chain rule must be applied, and 'stuff 1' contains variables dependent 
on t in a sence of depends() call. I just gave an example, real 
expression can be quite complicated.

What do you call 'intermediate positions in matching'? Is it what I am 
looking for, from your point of view?

My main concern is still in breaking into a differentiation process with 
my specific rule without rewriting it from scratch.

--
Andrei Zorine

Richard Fateman wrote:
> first, I find the treatment of 'diff and diff to be
> problematic.  One is "DERIVATIVE" and the other is "DIFF"
> internally.  You are probably using both.  Note that
> 
> tellsimp(diff(....)   )   puts rules in different place from
> tellsimp('diff(...)   ).
> 
> This may be part of the problem.
> 
> My suggestion is to use a different operator, say D if you can, and
> only at the last stage (if necessary) convert D to diff, e.g.
> tellsimpafter(d(any1,any2), diff(any1,any2));
> 
> 
> Then you can do this:
> 
> matchdeclare([sd,t],true);
> tellsimp(d(II(sd,t),t,2),0);
> declare(d, outative);
> declare(a,constant);
> 
> d(a*II(sd,t),t,2)   should be 0.
> 
> You might prefer declare(d,linear).
> 
> The system then looks at the 2nd argument for more help, linear in what..
> 
> d(a*f(x)+b,x)  becomes   a*d(f(x),x)+ b*d(1,x).
> 
> This matching system is more complicated to use than it
> should be, unfortunately.  But there are many different
> decisions that have to be made in the design that interact.
> There is no one set that is ideal in all cases.  I am
> probably more aware of this than others because I wrote the
> tellsimp (etc) programs for Macsyma originally, and I have
> also implemented a version of Mathematica's pattern matcher
> for MockMMA.  There are advantages to each, and also to
> intermediate positions in matching.
> 
> I hope that using properties like linear will make
> your programs simpler and more complete at the same time.
> 
> 
> RJF
> 
> 
> Andrei Zorine wrote:
> 
>> Another problem, I'd expect to see 0 here:
>>
>> (C1) block([sd,t,y ],
>>   matchdeclare([sd,t,y],true),
>>   print(tellsimp('diff(II(sd,t),t),sd/ID(t))),
>>   print(tellsimp('diff(II(sd,t),t,2),0)),
>>   print(tellsimp('diff(II(sd,t),sd),0)))$
>>
>> [DERIVATIVERULE6, SIMPDERIV]
>> [DERIVATIVERULE7, DERIVATIVERULE6, SIMPDERIV]
>> [DERIVATIVERULE8, DERIVATIVERULE7, DERIVATIVERULE6, SIMPDERIV]
>> (C2) diff(a*II(sd,t),t,2);
>>
>>                       d
>>                 a sd (-- (ID(t)))
>>                       dt
>> (D2)                   - -----------------
>>                        2
>>                      ID (t)
>> -- 
>> Andrei Zorine
>>
>> _______________________________________________
>> Maxima mailing list
>> Maxima@www.math.utexas.edu
>> http://www.math.utexas.edu/mailman/listinfo/maxima
> 
> 
> 
> _______________________________________________
> Maxima mailing list
> Maxima@www.math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
> 
>