Re: Simplification of vector and scalar products
- To: mathgroup at smc.vnet.net
- Subject: [mg39630] Re: Simplification of vector and scalar products
- From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
- Date: Thu, 27 Feb 2003 00:26:59 -0500 (EST)
- Organization: Universitaet Leipzig
- References: <b3hrkl$ij8$1@smc.vnet.net>
- Reply-to: kuska at informatik.uni-leipzig.de
- Sender: owner-wri-mathgroup at wolfram.com
Hi, > I want to simplify vector and scalar products as for instance > > 6 (a / 2) x b //Simplify > > where a and b are assumed to be vectors and "x" is the vector product.. > Simplify and FullSimplify do nothing, nor does the following command > change anything: > > 6 (a / 2) x b /. p_ Cross[a_ / q_ , b_] => p Cross[a, b] / q This does nothing because Mathematica store a/2 as Rational[1,2]*a while a/q would be a*q^(-1) and the pattern with a_/q_ can't match, but 6*Cross[a/2, b] /. Cross[a_.*q_, p_] /; NumericQ[a] :> a*Cross[q, p] work as expected. > Regards Jens