Re: Solve : missing elims in the Mathematica 8 version
- To: mathgroup at smc.vnet.net
- Subject: [mg115054] Re: Solve : missing elims in the Mathematica 8 version
- From: Adam Strzebonski <adams at wolfram.com>
- Date: Wed, 29 Dec 2010 06:00:00 -0500 (EST)
Andrzej Kozlowski wrote:
> On 28 Dec 2010, at 12:49, W. Deinhard wrote:
>
>> ?Hi,
>> in Mathematica 7 Solve allowed to specify the variables I wanted to eliminate.
>> How can I do that in Mathtematica 8 ?
>>
>> The syntax is no longer
>>
>> Solve[eqns,vars,elims]
>>
>> but
>>
>> Solve[expr,vars,dom]
>>
>> Thanks , bye Walter.
>>
>
> First, the old syntax still works but now it is undocumented (?):
>
> In[33]:= Solve[{1 == x^5 + y^5, a - b == x + y, b + a == x*y}, {x,
> y}, {a, b}]
>
> Solve::svars:Equations may not give solutions for all "solve" variables. >>
>
> {{y -> (1 - x^5)^(1/
> 5)}, {y -> (-(-1)^(1/5))*(1 - x^5)^(1/5)},
> {y -> (-1)^(2/5)*(1 - x^5)^(1/5)},
> {y -> (-(-1)^(3/5))*(1 - x^5)^(1/5)},
> {y -> (-1)^(4/5)*(1 - x^5)^(1/5)}}
>
> This, in fact, is the same answer as the one you get if you explicitly use Eliminate:
>
> Solve[
> Eliminate[{1 == x^5 + y^5, a - b == x + y, b + a == x*y}, {a,
> b}], {x, y}]
>
> Solve::svars:Equations may not give solutions for all "solve" variables. >>
>
> {{y -> (1 - x^5)^(1/
> 5)}, {y -> (-(-1)^(1/5))*(1 - x^5)^(1/5)},
> {y -> (-1)^(2/5)*(1 - x^5)^(1/5)},
> {y -> (-(-1)^(3/5))*(1 - x^5)^(1/5)},
> {y -> (-1)^(4/5)*(1 - x^5)^(1/5)}}
>
> I am not sure if the lack of documentation for the former usage is an oversight or it is now deprecated.
>
> Andrzej Kozlowski
The new Solve syntax allows use of arbitrary combinations
of quantifiers. "Elimination variables" are a special case,
namely
Solve[eqns, vars, elims]
is equivalent to
Solve[Exists[elims, eqns], vars]
In[1]:= Solve[Exists[{a, b}, 1 == x^5 + y^5 && a - b == x + y &&
b + a == x*y], y]
5 1/5 1/5 5 1/5
Out[1]= {{y -> (1 - x ) }, {y -> -((-1) (1 - x ) )},
2/5 5 1/5 3/5 5 1/5
> {y -> (-1) (1 - x ) }, {y -> -((-1) (1 - x ) )},
4/5 5 1/5
> {y -> (-1) (1 - x ) }}
Note, that the last argument of a quantifier needs to be a Boolean
formula, so one should use
eq1 && eq2 && ...
rather than
{eq1, eq2, ...}
The old syntax still works, but is now deprecated because of
a possible confusion with the domain argument.
In[2]:= Solve[x^4==1, x, Reals]
Out[2]= {{x -> -1}, {x -> 1}}
In[3]:= Solve[x^4==1, x, Real]
Solve::bdomv: Warning: Real is not a valid domain specification. Mathematica
is assuming it is a variable to eliminate.
Out[3]= {{x -> -1}, {x -> -I}, {x -> I}, {x -> 1}}
Best regards,
Adam Strzebonski
Wolfram Research