Page 1 sur 1

Differentiating vectors of functions

Publié : mar. janv. 25, 2011 5:56 pm
par alexg
Just another little thing I noticed, not very important but I think worth mentioning:
As far as I can tell, giac's function_diff() is pretty much the same as Maple's D(), which giac also supports.

Yet, function_diff([sin,cos,tan]) correctly gives

Code : Tout sélectionner

 (` x`)->{ 
  cos(` x`);  
  -(sin(` x`));  
  1+tan(` x`)^2;  
}
While D([sin,cos,tan]) gives

Code : Tout sélectionner

D(['sin','cos','tan'])
Could that be improved?

Re: Differentiating vectors of functions

Publié : mar. janv. 25, 2011 8:14 pm
par parisse
You must select maple mode if you want D to be a synonym for function_diff, otherwise it is a valid identifier name (especially useful for geometry).

Re: Differentiating vectors of functions

Publié : mar. janv. 25, 2011 8:37 pm
par alexg
Thanks very much for that, I was getting a bit confused with the Maple-mode support...
I now see it's working OK, even if the answer is the slightly different

Code : Tout sélectionner

expr("proc(` x`) 
  cos(` x`);  
  -(sin(` x`));  
  1+tan(` x`)^2;  
 
end;")
Gives me enough to go on, anyway

Re: Differentiating vectors of functions

Publié : mer. janv. 26, 2011 6:39 am
par parisse
Indeed, display should be optimized. I don't have much time for that now since it's not critical...