Re: A question of simplification
- To: mathgroup at smc.vnet.net
- Subject: [mg20988] Re: [mg20953] A question of simplification
- From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
- Date: Thu, 2 Dec 1999 21:41:04 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
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> > Date: Wed, 1 Dec 1999 01:50:20 -0500 (EST) > To: mathgroup at smc.vnet.net > Subject: [mg20988] [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 > >