The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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]


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



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



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 <> 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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.