Thank you very much ( Felipe and Jens),<div><br></div><div>both ways are good for me.</div><div><br></div><div>Best regards and keep up the great work on GiNaC!!</div><div><br></div><div>Martin Ettl</div><div><br></div><div>
<br><div class="gmail_quote">2012/7/22 Felipe Bordeu Weldt <span dir="ltr"><<a href="mailto:felipe.bordeu@ec-nantes.fr" target="_blank">felipe.bordeu@ec-nantes.fr</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Hello,<div><br></div><div>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 differentiation. </div>
<div><br></div><div>Then I can differentiate the symbol (add 1 to the degree). and at the end I can make the substitution and the real differentiation.</div><div><br></div><div> I'm not sure that is the correct approach, but it works for me.</div>
<div><br></div><div>Felipe.</div><div><br></div><div><br></div><div><div><div>Le 22 juil. 12 à 19:29, Martin Ettl a écrit :</div><br><blockquote type="cite"><div><div class="h5"><div class="gmail_quote">Hello,<div><br></div>
<div>i have a question regarding symbolic differentiation with GiNAC.</div><div><br></div><div>Here is what i am trying to do:</div><div><br></div><div>I have to variables a(t) and b(t), both are dependent from time (t). </div>
<div>Suppose, this two variables are multiplied liked this:</div><div><br></div><div> a(t) * b(t)</div><div><br></div><div>Is it possible to derive this expression (a(t)*b(t)) according time with ginac.</div>
<div> <br></div><div>The only function i found in the manual is usefull for partial derivation, which does not help me here.</div><div><br></div><div><br></div><div>Here is some example code:</div><div><br></div><div> symbol a("a"), b("b"); // <-- how to tell ginac that variable a and b is dependant from variable t</div>
<div> expression f = a*b;</div><div> std::cout << f.diff(t,1) << std::endl;</div><div><br></div><div><br></div><div>Many thanks in advance and best regards</div><span><font color="#888888"><div> <br></div><div>
Martin Ettl </div><div><br></div> <div><br></div> </font></span></div><br></div></div><div class="im"> _______________________________________________<br>GiNaC-list mailing list<br><a href="mailto:GiNaC-list@ginac.de" target="_blank">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br></div></blockquote></div><br></div></div><br>_______________________________________________<br>
GiNaC-list mailing list<br>
<a href="mailto:GiNaC-list@ginac.de">GiNaC-list@ginac.de</a><br>
<a href="https://www.cebix.net/mailman/listinfo/ginac-list" target="_blank">https://www.cebix.net/mailman/listinfo/ginac-list</a><br>
<br></blockquote></div><br></div>