Differentiating vectors of functions

Librairie C++ de calcul formel/ C++ symbolic computation library

Modérateur : xcasadmin

alexg
Messages : 11
Inscription : lun. janv. 24, 2011 9:56 pm

Differentiating vectors of functions

Message par alexg » mar. janv. 25, 2011 5:56 pm

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?

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Differentiating vectors of functions

Message par parisse » mar. janv. 25, 2011 8:14 pm

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).

alexg
Messages : 11
Inscription : lun. janv. 24, 2011 9:56 pm

Re: Differentiating vectors of functions

Message par alexg » mar. janv. 25, 2011 8:37 pm

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
Dernière modification par alexg le mer. janv. 26, 2011 2:47 pm, modifié 1 fois.

parisse
Messages : 5743
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: Differentiating vectors of functions

Message par parisse » mer. janv. 26, 2011 6:39 am

Indeed, display should be optimized. I don't have much time for that now since it's not critical...

Répondre