Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • $\begingroup$ My understanding of the question (I ve had that pb myself many times) is to do this when its too late... ie when mathematica has already distributed a and b (?) $\endgroup$ Commented Oct 19, 2012 at 17:13
  • $\begingroup$ @chris What do you mean by distributed? This still works if a and b have numeric values, if that is your concern. Otherwise I guess I don't understand. $\endgroup$ Commented Oct 19, 2012 at 17:51
  • $\begingroup$ The problem is that a, b, etc. are just examples. The real expressions are a lot more complicated and I don't know a priori how they look like, i.e. I can't just divide out the prefactors. In more detail, I have two terms and all I know is their general structure: a lot of scalar prefactors times a vector. I then need to dot these terms into each other and simplify the result. The thing is that the prefactors can be related to the inner products of the vectors (e.g. they are the norms) - so there is a lot of possible simplification that only works if I do NOT explicitly expand the dot $\endgroup$ Commented Oct 19, 2012 at 19:34
  • $\begingroup$ [continued] product into its components but rather keep it intact as long as possible and then use replacement rules on the appropriate terms. $\endgroup$ Commented Oct 19, 2012 at 19:35
  • $\begingroup$ BTW: In case you are curious, I am trying to compute squared amplitudes of Feynman diagrams that eventually involves computing inner products of a lot of terms of the generic structure I discussed above.. $\endgroup$ Commented Oct 19, 2012 at 19:39