       Re: Selecting Real Roots, Again

• To: mathgroup at smc.vnet.net
• Subject: [mg67132] Re: [mg67104] Selecting Real Roots, Again
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Sat, 10 Jun 2006 04:53:26 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```allSoln=x/.Solve[{.9*x^10 + .1*x^2 ==y},x];

In this case, you can just use a "typical" value of y (say .5) to select

soln=Select[allSoln,
(FreeQ[(#/.y->.5),Complex]&&
0<=(#/.y->.5)<=1)&]

{Root[0.9*#1^10 + 0.1*#1^2 - 1.*y & , 2]}

Plot[soln,{y,0,1}];

Bob Hanlon

---- DOD <dcodea at gmail.com> wrote:
> select real roots for you, but I have a slightly(very slighty, I
> thought) different problem ,and I don't know how to get mathematica to
> do what I want.
>
> I want to get the solution for a polynomial of the following form:
> d x^n + (1-d) x^2 =y
>
> so for example, I do
> Solve[.9 x^10 + .1 x^2 ==y,x]
> and I get a whole bunch of solution,  very good.  For my purposes, y
> lives in the [0,1], as must the solution.  So I can see, by hand, which
> root I want; exactly one root is both real, and has solutions in my
> inverval.  So I want to tell mathematica to:
>
> A: look at only solutions x* that are real over y in [0,1]
>
> and
>
> B: of those solutions, give the one x* that itself lies is [0,1].
>
> So, when I try to do something from reading previous posts, I cannot
> get it to work:
> In:=
> Select[Solve[.9 x^10 + .1 x^2 ==y,x],Element[x/.#,Reals]&]
>
> Out=
> {}
> or perhaps
> In:=
> Select[Solve[.9 x^10 + .1 x^2
> ==y,x],Assuming[Element[y,Reals],Eement[x/.#,Reals]]&]
> Out=
> {}
>
>
>  So How to I tell mathematica to do this?
>

--

Bob Hanlon
hanlonr at cox.net

```

• Prev by Date: Llearning Mathematica
• Next by Date: Re: Selecting Real Roots, Again
• Previous by thread: Re: Selecting Real Roots, Again
• Next by thread: Re: Selecting Real Roots, Again