Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Strange result of solve
Replies: 2   Last Post: Mar 11, 2014 3:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hanlon

Posts: 906
Registered: 10/29/11
Re: Strange result of solve
Posted: Mar 11, 2014 3:17 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


Reduce is generally more powerful than Solve and indicates that the
expression is True, i.e., valid for all integers, x.

Reduce[5 x==0,x,Modulus->5]

True

In your second example, the result of {{}} does not mean that every x is OK
but rather that there is no solution for x.

Attributes[Solve]

{Protected}

Since Solve does NOT have either the attribute HoldFirst or HoldAll, your
second example is equivalent to

Solve[True,x,Modulus->5]

{{}}

That is, there is no solution for x since x does not appear in the
expression. You can verify this with

Solve[0 x==0,x,Modulus->5]//Trace

{{{0 x,0},0==0,True},{Modulus->5,Modulus->5},Solve[True,x,Modulus->5],{{}}}


Bob Hanlon



On Mon, Mar 10, 2014 at 4:41 AM, Wiel Aerts <wiel.aerts@xs4all.nl> wrote:

>
>
> I cannot really understand the different results of the following:
>
> Solve[ 5 x == 0, x, Modulus-> 5 ]
> result: {{x-> 0}}
>
> and:
>
> Solve[ 0 x == 0, x, Modulus-> 5 ]
> result: {{}}
>
> The last means that every x is OK. Which I think is true. But I would
> expect the same result for the first case.
>
> What am I missing?
>
> Wiel
>
> I'm using MTM v9.
>
>
>






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.