RE: newbie question: generic derivatives
- To: mathgroup at smc.vnet.net
- Subject: [mg41581] RE: [mg41563] newbie question: generic derivatives
- From: "Florian Jaccard" <jaccardf at eicn.ch>
- Date: Tue, 27 May 2003 05:25:30 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
you want : df/dx = pf/py y' + pf/py' y''= Dot[grad[f[y,y']],{y',y''}] You can create what you want ! The function grad : grad[f_, vars_List] := (D[f, #] & /@ vars) Then the function wich calculates the total derivative : derTot[f_, vars_List, indepVar_] := grad[f, vars].(D[#, indepVar] & /@ vars) You can know try it on your example : derTot[f[y[x], y'[x]], {y[x], y'[x]}, x] And you will see that it works fine ! Meilleures salutations Florian Jaccard -----Message d'origine----- De : Eduardo Suárez [mailto:bardino at mail.com] Envoyé : mar., 27. mai 2003 07:47 À : mathgroup at smc.vnet.net Objet : [mg41563] newbie question: generic derivatives Hello all. I'm new to mathematica and i'm trying to do some partial derivatives. I have y(x) and f(y,y') and would like to get: df/dx=... Is there a way to get a result without defining 'f' and 'y'. I mean df/dx = pf/py y' + pf/py' y''. Thanks in advance, -Eduardo