FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Forum index » Science and Technology » Math » Symbolic
Eliminating multiple roots in mathematica's "Solve" function
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
Author Message
double d
science forum Guru


Joined: 03 May 2005
Posts: 640

PostPosted: Mon Jul 17, 2006 8:13 pm    Post subject: Re: Eliminating multiple roots in mathematica's "Solve" function Reply with quote

Thank you! Are you related to Costello?

Paul Abbott wrote:
Quote:
In article <1152964191.809085.312450@m73g2000cwd.googlegroups.com>,
markdemers15@hotmail.com wrote:

I am using mathematica to solve a set of coupled equations numerically.
But every time mathematica solves the equations, it gives me all the
roots (which are many). I only want the
real, positive roots. How do I tell mathematica to automatically
suppressed those other roots?

One solution is to use Reduce instead of Solve. A simple example:
entering

Reduce[{x^13 + x - 1 == 0, x > 0}, x]

only the first root is real and positive:

x == Root[-1 + #1 + #1^13 & , 1, 0]

Numerically, this is

N[%]

x == 0.8597566716878293

Cheers,
Paul

_______________________________________________________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
Back to top
Paul Abbott
science forum addict


Joined: 19 May 2005
Posts: 99

PostPosted: Mon Jul 17, 2006 4:01 pm    Post subject: Re: Eliminating multiple roots in mathematica's "Solve" function Reply with quote

In article <1152964191.809085.312450@m73g2000cwd.googlegroups.com>,
markdemers15@hotmail.com wrote:

Quote:
I am using mathematica to solve a set of coupled equations numerically.
But every time mathematica solves the equations, it gives me all the
roots (which are many). I only want the
real, positive roots. How do I tell mathematica to automatically
suppressed those other roots?

One solution is to use Reduce instead of Solve. A simple example:
entering

Reduce[{x^13 + x - 1 == 0, x > 0}, x]

only the first root is real and positive:

x == Root[-1 + #1 + #1^13 & , 1, 0]

Numerically, this is

N[%]

x == 0.8597566716878293

Cheers,
Paul

_______________________________________________________________________
Paul Abbott Phone: 61 8 6488 2734
School of Physics, M013 Fax: +61 8 6488 1014
The University of Western Australia (CRICOS Provider No 00126G)
AUSTRALIA http://physics.uwa.edu.au/~paul
Back to top
Math Freak
science forum beginner


Joined: 11 Jul 2005
Posts: 43

PostPosted: Sat Jul 15, 2006 11:56 pm    Post subject: Re: Eliminating multiple roots in mathematica's "Solve" function Reply with quote

On 15 Jul 2006 04:49:51 -0700, markdemers15@hotmail.com
wrote:

Quote:
I am using mathematica to solve a set of coupled equations numerically.
But every time mathematica solves the equations, it gives me all the
roots (which are many). I only want the
real, positive roots. How do I tell mathematica to automatically
suppressed those other roots?

I'm not posting this to help you on your question,
sorry.

Your reference to Mathematica reminded me of a rather
powerful software (well, at least in the setting of the
years it first came out) I used a long time back, but
not accessible to me anymore. Its name is Math CAD v. 2
and I only have it on those large 5"1/4 inch floppies.
It was very useful and I paid two hundred and some
dollars for it in the 80s dollars. I've wished to use
it again for some time but cannot find a free download
of it or something. Too old I guess, but quite powerful
and versatile enough for me and my purposes. Do you, or
anybody else here, happen to have an electronic copy of
it on your computer? If so, email me a copy and I'll
send you my two original 5"1/4 inch floppies so
copyright matters etc are observed. I have to keep the
user's manual though (a nice exquisitely made binder in
the style of those days... ).

--

"marde kheradmande honarpishe rA
omr dobAyast darin ruzgAr

tA be yeki tajrobe Amukhtan
bA degari tajrobe bordan bekAr"

- Sa'di
Back to top
T Wake
science forum Guru


Joined: 08 May 2005
Posts: 1978

PostPosted: Sat Jul 15, 2006 3:56 pm    Post subject: Re: Eliminating multiple roots in mathematica's "Solve" function Reply with quote

In <1152964191.809085.312450@m73g2000cwd.googlegroups.com>, sent to
sci.physics on Saturday 15 July 2006 12:49, markdemers15@hotmail.com
(markdemers15@hotmail.com) had a brainstorm and wrote:

Quote:
I am using mathematica to solve a set of coupled equations numerically.
But every time mathematica solves the equations, it gives me all the
roots (which are many). I only want the
real, positive roots. How do I tell mathematica to automatically
suppressed those other roots?

Dont you want to include one of your normal racist or anti-mathematician
diatribes here? Or are you saving it for your sock puppets?

--
T Wake
Usenet.es7 at gishpuppy.com
Back to top
double d
science forum Guru


Joined: 03 May 2005
Posts: 640

PostPosted: Sat Jul 15, 2006 11:49 am    Post subject: Eliminating multiple roots in mathematica's "Solve" function Reply with quote

I am using mathematica to solve a set of coupled equations numerically.
But every time mathematica solves the equations, it gives me all the
roots (which are many). I only want the
real, positive roots. How do I tell mathematica to automatically
suppressed those other roots?
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [5 Posts] View previous topic :: View next topic
The time now is Sat Jan 17, 2015 3:37 am | All times are GMT
Forum index » Science and Technology » Math » Symbolic
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Generating function for Mathieu functions cosmicstring@gmail.com Math 1 Fri Jul 21, 2006 8:39 am
No new posts Choice function over finite sets Peter Webb Math 5 Fri Jul 21, 2006 3:28 am
No new posts Function from Taylor series? Nathan Urban Research 1 Thu Jul 20, 2006 12:48 am
No new posts Function not in L_1 {[0,1]}, but satisfies ...? atkrunner@hotmail.com Math 12 Thu Jul 20, 2006 12:46 am
No new posts mathematica: how to feed Solve output into Select? double d Math 12 Mon Jul 17, 2006 10:36 pm

Copyright © 2004-2005 DeniX Solutions SRL
Other DeniX Solutions sites: Electronics forum |  Medicine forum |  Unix/Linux blog |  Unix/Linux documentation |  Unix/Linux forums  |  send newsletters
 


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0791s ][ Queries: 20 (0.0470s) ][ GZIP on - Debug on ]