Re: Simplification problem
- To: mathgroup at smc.vnet.net
- Subject: [mg104766] Re: [mg104755] Simplification problem
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Mon, 9 Nov 2009 05:44:48 -0500 (EST)
- References: <200911081151.GAA25009@smc.vnet.net>
On 8 Nov 2009, at 20:51, olfa wrote:
> Hello mathematica community
> Having this system of equations:
> (z1==z2 && x*t==x1*t1)||(z1+x1*t1==z2+x2*t2)
> why a function like fullsimplify or booleanminimize doesn't simplify
> it into z1+x1*t1==z2+x2*t2?
> same question for (y1==y2 && t1== t2)||(t1/2^y1==t2/2^y2) why it is
> not simplified into t1/2^y1==t2/2^y2.
> is there another function that I can use?
> thank you.
>
I think I have answered very similar questions from you several times
but you just ignore the answers and keep asking the same thing all
over again.
The function to use is Reduce over the Reals (even if the result is
more general, the algorithms used by Mathematica for such situations
work over the reals). You will get a more complicated looking answer,
but it actually "contains yours".
FullSimplify[
Reduce[(z1 == z2 && x*t == x1*t1) || z1 + x1*t1 == z2 + x2*t2, Reals]]
(x2 ==
0 && ((z1 ==
z2 && (x1 ==
0 || (x != 0 && (t1 == 0 || t == (t1*x1)/x)))) ||
(x1 != 0 && t1*x1 + z1 == z2 && (t1 != 0 || x == 0)))) ||
(x2 != 0 && ((((t1*x1 + z1 ==
t2*x2 + z2 && (x != 0 || (t1 != 0 && t2 != 0))) ||
(t2 == 0 && x == 0 && t1*x1 + z1 == z2) || (x != 0 &&
t == (t1*x1)/x &&
t1 != (t2*x2)/x1 && z1 == z2)) && x1 != 0) ||
(x1 == 0 && ((t2 != 0 && t2*x2 + z2 == z1) ||
(z1 == z2 && (t == 0 || t2 == 0 || x == 0)))) ||
(t1 == 0 && t2 != 0 &&
x == 0 && (z1 == z2 || t2*x2 + z2 == z1))))
The answer you see is a disjunction, corresponding to various terms
being zero or non-zero. If you look at this carefully you will see
that it does contain what you want:
x2 != 0 && ((((t1*x1 + z1 == t2*x2 + z2 && (x != 0 || (t1 != 0 && t2 !
= 0)))
Similarly in the second case:
FullSimplify[
Reduce[(y1 == y2 && t1 == t2) || t1/2^y1 == t2/2^y2, Reals]]
(t1 == 0 && t2 == 0) || (t1 == t2 && y1 == y2) ||
(Log[2]*(y1 - y2) == Log[t1/t2] &&
((t1 < 0 && t2 < 0) || (t1 > 0 && t2 > 0)))
This is again essentially equivalent to the answer you wanted. You
can't expect to get exactly what you wanted as the algorithms
Mathematica uses are entirely different form the way you do this by
hand.
Andrzej Kozlowski
- Follow-Ups:
- Re: Re: Simplification problem
- From: Andrzej Kozlowski <akoz@mimuw.edu.pl>
- Re: Re: Simplification problem
- References:
- Simplification problem
- From: olfa <olfa.mraihi@yahoo.fr>
- Simplification problem