Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12224

Re: Solve...or not

From "djmpark" <djmpark@comcast.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Solve...or not
Date 2012-11-02 04:46 +0000
Message-ID <k6vj7g$6bs$1@smc.vnet.net> (permalink)
References <2879485.82468.1351754544475.JavaMail.root@m06>
Organization Time-Warner Telecom

Show all headers | View raw


Tony,

You could use:

Solve[{(y - 2)/(x - 1) == 1, y == 0}, {x, y}]
{{x -> -1, y -> 0}}

Or with a warning and probably deprecated:
Solve[{(y - 2)/(x - 1) == 1, y == 0}, x, y]
{{x -> -1}}

Or without a warning, probably because Mathematica now knows for certain
that y is not a domain but perhaps still deprecated:
Solve[{(y - 2)/(x - 1) == 1, y == 0}, x, y, Reals]
{{x -> -1}}

Or:

Solve[(y - 2)/(x - 1) == 1 /. y -> 0, x] 
{{x -> -1}}

Or more formally:

Solve[Exists[y, y == 0, (y - 2)/(x - 1) == 1], x] 
{{x -> -1}}

Or:

Solve[Exists[y, And @@ {(y - 2)/(x - 1) == 1, y == 0}], x] 
{{x -> -1}}

Or quixotically:

Solve[ForAll[y, y == 0, (y - 2)/(x - 1) == 1], x]
{{x -> -1}}

Or maybe:

Eliminate[{(y - 2)/(x - 1) == 1, y == 0}, y]
x == -1

The new behavior of Solve in Version 8 at first seems like a pain in the
neck (also when it returns ConditionalExpressions with a Reals domain say)
but actually I think it is quite useful and much better than the old
behavior. One of the changes is that you can't simply (without a warning)
include a second list specifying variables to eliminate. Either use
Eliminate first or use Exists or ForAll to eliminate the variables, or
explicitly specify the domain.


David Park
djmpark@comcast.net 
http://home.comcast.net/~djmpark/index.html 



From: Harker, Anthony [mailto:a.harker@ucl.ac.uk] 


I've seen some discussion of Version 8's Solve[] in this group, but have I
missed something explaining this?

  I have the following behaviour (both under Windows 7)


Mathematica 8.0.1.0

Solve[{(y-2)/(x-1)==1,y==0},x]
{}

Mathematica 7.0.1.0
Solve[{(y-2)/(x-1)==1,y==0},x]
{{x->-1}}

  Tony

Tony Harker
Department of Physics and Astronomy
University College London
Gower Street
London
WC1E 6BT

Tel: (within UK)    020 7679 3404
     (overseas ) +44 20 7679 3404
E:    a.harker@ucl.ac.uk

[...] clay possesses one considerable advantage: it is resistant to fire,
water, and magnetic disturbances. In [...] a few thousand years, our
photographs, books and hard disks will no doubt have disappeared, but our
collections of cuneiform tablets will still be there.

  Dominique Charpin, Reading and Writing in Babylon (2010) translated by
Jane Marie Todd.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Solve...or not "djmpark" <djmpark@comcast.net> - 2012-11-02 04:46 +0000

csiph-web