Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Symbolic replacement of scalar products

  • To: mathgroup at smc.vnet.net
  • Subject: [mg120027] Symbolic replacement of scalar products
  • From: Giuseppe <juseppe78 at gmail.com>
  • Date: Wed, 6 Jul 2011 05:40:38 -0400 (EDT)

Hello,

I have very complicated expressions containing scalar products like 

a1*b1 + a2*b2 + a3*b3

In order to reduce the complexity, I would like to establish a set of rules like

rule={a1*b1 + a2*b2 + a3*b3 -> pAB, ...}

in order to replace each time the scalar product by an appropriate new symbol (pAB in the example).
The problem is that, apparently, Mathematica does not perform the substitution if in the expression the scalar products appear together with some multiplying factor; for example Mathematica fails to apply the previous rule if the expression is

-a1*b1 - a2*b2 - a3*b3

or

2a1*b1 + 2a2*b2 + 2a3*b3

How could solve this problem?


  • Prev by Date: Unwanted Recursion
  • Next by Date: How can I get better solution for this...?
  • Previous by thread: Re: Unwanted Recursion
  • Next by thread: Re: Symbolic replacement of scalar products