Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: how to find minimum value.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94959] Re: [mg94945] how to find minimum value.
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Thu, 1 Jan 2009 07:25:37 -0500 (EST)
  • Reply-to: hanlonr at cox.net

a = Solve[x^2 + 3 x + 1 == 0]

{{x -> (1/2)*(-3 - Sqrt[5])},
    {x -> (1/2)*(Sqrt[5] - 3)}}

Select[a, #[[1, 2]] == Min[a[[All, 1, 2]]] &][[1]]

{x -> (1/2)*(-3 - Sqrt[5])}

or

Min[x /. Solve[x^2 + 3 x + 1 == 0]]

(1/2)*(-3 - Sqrt[5])



Bob Hanlon


On Wed, Dec 31, 2008 at 11:28 AM , mssivava wrote:

> Hi everyone,
>
> For instance, lets assume that we have an equation like
> a = Solve[x^2 + 3 x + 1 == 0]
>
> the solution gives 2 x values as
>
> {{x -> 1/2 (-3 - Sqrt[5])}, {x -> 1/2 (-3 + Sqrt[5])}}
>
> Which function can I use to find the min x? (Min[] or FindMimimum[] is 
> not working)
>
> In my real question, I have more than 50 values. So I need to find a 
> mathematica function to find the minimum value from 50 automatically.
>
> Thank you very much.


  • Prev by Date: Re: how to find minimum value.
  • Next by Date: Re: Non-deterministic numerical inaccuracies in
  • Previous by thread: Re: how to find minimum value.
  • Next by thread: Re: how to find minimum value.