Re: Backwards?
- To: mathgroup at smc.vnet.net
- Subject: [mg3518] Re: [mg3480] Backwards?
- From: jpk at apex.mpe.FTA-Berlin.de (Jens-Peer Kuska)
- Date: Wed, 20 Mar 1996 02:49:46 -0500
- Sender: owner-wri-mathgroup at wolfram.com
Hi Artur, > > I would like to ask a question please. > How can I let Mathematica do this: > > 1) c[x,y]*a[x]*D[b[x],x]+c[x,y]*b[x]*D[a[x],x]+d[x,y] > --->c[x,y]*D[a[x]*b[x],x]+d[x,y] ? > It's backward-chainrule. the following works nice (* create the formula *) In[]= Expand[ c[x,y]*D[ a[x]*b[x],x] ] +d[x,y] Out[]= d[x, y] + b[x] c[x, y] a'[x] + a[x] c[x, y] b'[x] (* show the rule for multiplication more explicitly *) In[]= Collect[%,c[x,y]] Out[]= d[x, y] + c[x, y] (b[x] a'[x] + a[x] b'[x]) (* revert the rule for products of derivatives *) In[]= % /. any_. f1_[x_]*Derivative[n_.+1][f2_][x_]+ any_. f2_[x_]*Derivative[n_.+1][f1_][x_] :> any*Derivative[n+1][f1*f2][x] Out[]= d[x, y] + c[x, y] (a b)'[x] > > > 2) If I let u^2+v^2:=1 (sic), how cann I do: > > a*u^2+a*v^2==a*1==a ? eqn=u^2+v^2==1; Expand[a*#] & /@ eqn gives the desired result. Hope that helps Jens PS: The chain rule for derivatives is D[f[g[x]],x] :> Derivative[1][f][g[x]]*Derivative[1][g][x] or d ( f(g(x)) ) ------------- = f'(g(x)) g'(x) d x You want reverse the rule for the derivatives of products. Jens ==== [MESSAGE SEPARATOR] ====