Message Boards Message Boards

0
|
4481 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

[?] Distinguish two equal variables?

Posted 6 years ago

Hey, everybody. I have this expression

expr = (A (n1 - n1^2 + n2 + 2 n1 n2 - n2^2) + 
c ((-1 + n1) n1 - (1 + 2 n1) n2 + n2^2) + 
n1 (1 - n1 + n2) \[Gamma]1 + (1 + n1 - n2) n2 \[Gamma]2)/(B (1 + n1 +
n2))

I wish to simplify it, with the assumption n1=n2 and n1 + n2 = N. However, I want to keep the distinction between the two variables.

I should find

(N (A - c + (n2 \[Gamma]2 * n1 \[Gamma]1) / N)/(B (1 + N))

However I don't know how to enter the assumptions, because n1 = n2 replaces the variable.

Thanks in advance if you have an answer

POSTED BY: Alexandre Ruiz
2 Replies
Posted 6 years ago

Yes I have tried this method but there is a problem at the numerator.

If we do this Simplify[expr, {n1 == n2, n1 + n2 == n}] we obtain

(n2 (2 A - 2 c + \[Gamma]1 + \[Gamma]2))/(b (1 + n1 + n2))

At the numerator n1 disappears

POSTED BY: Alexandre Ruiz

The Simplify function supports simplification with assumptions

Simplify[expr,assum]

so you can do something like

Simplify[expr, {n1 == n2, n1 + n2 == n}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract