I wish to use Distribute[p.(q+r)+m] to get p.q+p.r+m. However, Distribute apparently does not thread through all parts of the expression. What should I do instead?
Tell me more
×
Mathematica Stack Exchange is a question and answer site for
users of Mathematica. It's 100% free, no registration required.
|
|
|||
|
You don't give a lot of context about how the target expression is generated (interactively or via code). The documentation for Via code, using
|
||||
|
|
|
You could also define special symbols that distribute themselves when they get combined with
Then you can enter your expression like this:
where the
|
|||
|
|
|
||||
|
|

Distribute[#] & /@ (p.(q + r) + m)acceptable ? – b.gatessucks Nov 29 '12 at 9:26Log[a+b]inside the expression, the distribute would expand that too, yieldingLog[a]+Log[b]. – QuantumDot Jan 8 at 20:06