Re: A question of simplification
- To: mathgroup at smc.vnet.net
- Subject: [mg21001] Re: [mg20953] A question of simplification
- From: eexiong <eexiong at ee.ust.hk>
- Date: Thu, 2 Dec 1999 21:41:14 -0500 (EST)
- References: <B46B3B34.35C1%andrzej@tuins.ac.jp>
- Sender: owner-wri-mathgroup at wolfram.com
Thank you! Indeed, I have made a mistake. The right answer for me is D[c*f[x],x]=c f[x]. For multiplier c other than a vector, I should use " * ". Green Andrzej Kozlowski wrote: > I assume you do mean to the dot product when you use "." don't you? The > reason why you get left with 0.f[x] is that Mathematica considers all your > symbols as scalars rather than vectors and does not know what the dot > product of the scalar 0 with something else is. So you have two possible > approaches. Either work explicitly with vectors, e.g.: > In[21]:= > D[{c1, c2, c3}.{f1[x], f2[x], f3[x]}, x] > Out[21]= > c1 f1'[x] + c2 f2'[x] + c3 f3'[x] > > or teach Mathematica the following new rule: > > In[23]:= > In[92]:= > Unprotect[Dot]; > Dot /: Dot[___, 0, ___] := 0 > Protect[Dot]; > > so that now: > > In[26]:= > D[c.f[x], x] > Out[26]= > c . f'[x] > > > From: Xiong Zhenhua <eexiong at ee.ust.hk> To: mathgroup at smc.vnet.net > > Date: Wed, 1 Dec 1999 01:50:20 -0500 (EST) > > To: mathgroup at smc.vnet.net > > Subject: [mg21001] [mg20953] A question of simplification > > > > In Mathematica, when using partial differentiation, we get > > D[c.f[x]]=0.f[x]+c.f'[x], not c.f'[x]. So, when the equation is long, > > the result will be very tedious. > > How can I simply the result to c.f'[x]? I have tested Simplify and > > FullSimplify. It does not work. > > Please help me! Thanks! > > > > Green > > > >