[GiNaC-list] Question regarding symbolic differentiation
Felipe Bordeu Weldt
felipe.bordeu at ec-nantes.fr
Sun Jul 22 19:40:16 CEST 2012
To do the symbolic differentiation, I created a new class, that store
the dependencies with respect to a symbol (or many) and the degree of
Then I can differentiate the symbol (add 1 to the degree). and at the
end I can make the substitution and the real differentiation.
I'm not sure that is the correct approach, but it works for me.
Le 22 juil. 12 à 19:29, Martin Ettl a écrit :
> i have a question regarding symbolic differentiation with GiNAC.
> Here is what i am trying to do:
> I have to variables a(t) and b(t), both are dependent from time (t).
> Suppose, this two variables are multiplied liked this:
> a(t) * b(t)
> Is it possible to derive this expression (a(t)*b(t)) according time
> with ginac.
> The only function i found in the manual is usefull for partial
> derivation, which does not help me here.
> Here is some example code:
> symbol a("a"), b("b"); // <-- how to tell ginac that variable a
> and b is dependant from variable t
> expression f = a*b;
> std::cout << f.diff(t,1) << std::endl;
> Many thanks in advance and best regards
> Martin Ettl
> GiNaC-list mailing list
> GiNaC-list at ginac.de
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the GiNaC-list