Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Basically I want to reduce something like:

Subscript[P, 4] - Subscript[P, 5] == Subscript[R, 4, 5]* Subscript[i, 4, 5]

when only one of them is known (Subscript[R, 4, 5] == 1), so that Mathematica expresses the simplified form as:

Subscript[i, 4, 5] + Subscript[P, 5] - Subscript[P, 4] == 0
share|improve this question
    
Have a look at Reduce. –  b.gatessucks Oct 25 '12 at 9:29
    
Yeah I tried that... But how can you tell it to reduce so you have constants on one side ? –  TehHO Oct 25 '12 at 9:30
1  
Perhaps this is what you are looking for? Is is possible to have mathematica move all terms to one side of an equation? –  Michael Wijaya Oct 25 '12 at 9:34
    
Yeah, but I also have some expressions which equal 1, and I do not want that moved over setting everything to equal zero... Basically I want all unknown on one side. And all that's known (defined) on the other side.. –  TehHO Oct 25 '12 at 9:39
    
So you have a - b == c * d and your only known variable is c. Then, according to your last comment, the output should be: (a - b)/d == c. That is what you are looking for? –  István Zachar Oct 25 '12 at 9:48

1 Answer 1

I think you are looking for Replace:

p4 - p5 == r45 i45 /. r45 -> 1
(* p4 - p5 == i45 *)

% /. lhs_ == rhs__ -> rhs - lhs == 0
(* i45 + p5 - p4 == 0 *)
share|improve this answer
    
(probably the question should have been closed?) –  djp Mar 3 at 11:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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