0
$\begingroup$

Given the following set of equations:

       a*opA = b*opB + c*opC; 
       b*opB = a*opA + c*OpC; 
  a*opAprime = b*opBprime + c*opCprime; 
  b*opBprime = a*opAprime + c*OpCprime; 

where a,b,c are complex coefficients and the quantities opA , opB, opC, opAprime, opBprime, opCprime are some operators which do not commute in general. How to make Mathematica to do the addition of these two equations and that the "numbers" and "operators" are written separately, something like when adding first and third equation as:

a*(opA+opAprime) = b*(opB+opBprime) + c*(opC+opCprime)
$\endgroup$

1 Answer 1

1
$\begingroup$

As there is no multiplication of operators in these equations, there is no problem of commutation. The "*" is an ordinary multiplication relative to a scalar. Therefore you may write:

e1 = a*opA == b*opB + c*opC;
e2 = b*opB == a*opA + c*OpC;
e3 = a*opAprime == b*opBprime + c*opCprime;
e4 = b*opBprime == a*opAprime + c*OpCprime;

And the to add equaions, e.g.:

e1[[1]] + e3[[1]] == e1[[2]] + e3[[2]] // Simplify

a (opA + opAprime) == b (opB + opBprime) + c (opC + opCprime)
$\endgroup$
2
  • $\begingroup$ Thanks, @Daniel. I was wondering whether it would be possible to instruct Mathemtica to replace the sum of operators by a different letter, say /.{opA+opAprime->A}. But /. doesn't seem to work here. Could you suggest some way of doing this? $\endgroup$
    – Jee
    Commented Apr 15 at 11:54
  • $\begingroup$ Your proposal works: a (opA + opAprime) == b (opB + opBprime) + c (opC + opCprime) /. {opA + opAprime -> A}this evaluates to a A == b (opB + opBprime) + c (opC + opCprime) $\endgroup$ Commented Apr 15 at 12:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.