Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Is this the best way to Solve the Katsura 6 problem

  • To: mathgroup at smc.vnet.net
  • Subject: [mg73982] Re: Is this the best way to Solve the Katsura 6 problem
  • From: "Raj" <rajanikanth at gmail.com>
  • Date: Sat, 3 Mar 2007 23:58:11 -0500 (EST)
  • References: <200703021140.GAA03968@smc.vnet.net><esb59q$45e$1@smc.vnet.net>

Thanks for correcting my mistake Daniel.

Regards,

Raj

On Mar 2, 11:40 pm, Daniel Lichtblau <d... at wolfram.com> wrote:
> Raj wrote:
> > hi!
>
> > Could somebody tell me if this is the best way to solve theKatsura6
> > problem:
>
> > NSolve[{x1 + 2x2 + 2x3 + 2x4 + 2x5 + 2x6 + 2x7 - 1   ,
> >     2x4 x3 + 2x5 x2 + 2x6 x1 + 2x7 x2 - x6   ,
> >     x3^2 + 2x4 x2 + 2x5 x1 + 2x6 x2 + 2x7 x3 - x5   ,
> >     2x3 x2 + 2x4 x1 + 2x5 x2 + 2x6 x3 + 2x7 x4 - x4   ,
> >     x2^2 + 2x3 x1 + 2 x4 x2 + 2 x5 x3 + 2 x6 x4 + 2 x7 x5 - x3   ,
> >     2 x2 x1 + 2 x3 x2 + 2 x4 x3 + 2 x5 x4 + 2 x6 x5 + 2 x7 x6 - x2   ,
> >     x1^2 + 2 x^2 + 2 x3^2 + 2 x4^2 + 2 x5^2 + 2 x6^2 + 2 x7^2 - x1  },
> > {x1,x2,x3,
> > x4,x5,x6,x7}]


>
> > Thanks,
>
> > Raj
>
> For Mathematica I think it is about as good as one can do. Or rather it
> would be, if your input did not have a typo. In the last polynomial you
> have 2*x^2 instead of 2*x2^2. Below is the corrected version.
>
> polys = {-1 + x1 + 2*x2 + 2*x3 + 2*x4 + 2*x5 + 2*x6 + 2*x7,
>    2*x3*x4 + 2*x2*x5 - x6 + 2*x1*x6 + 2*x2*x7,
>    x3^2 + 2*x2*x4 - x5 + 2*x1*x5 + 2*x2*x6 + 2*x3*x7,
>    2*x2*x3 - x4 + 2*x1*x4 + 2*x2*x5 + 2*x3*x6 + 2*x4*x7,
>    x2^2 - x3 + 2*x1*x3 + 2*x2*x4 + 2*x3*x5 + 2*x4*x6 + 2*x5*x7,
>    -x2 + 2*x1*x2 + 2*x2*x3 + 2*x3*x4 + 2*x4*x5 + 2*x5*x6 + 2*x6*x7,
>    2*x2^2 - x1 + x1^2 + 2*x3^2 + 2*x4^2 + 2*x5^2 + 2*x6^2 + 2*x7^2};
> vars = {x1, x2, x3, x4, x5, x6, x7};
>
> In[16]:= Timing[soln = NSolve[polys, vars];]
> Out[16]= {3.35, Null}
>
> In[17]:= InputForm[Max[Abs[polys /. soln]]]
> Out[17]//InputForm= 6.652497580583727*^-10
>
> Residuals are less than 10^(-9), which seems fairly good.
>
> Daniel Lichtblau
> Wolfram Research




  • Prev by Date: Re: Bug with Limit?
  • Next by Date: Re: Re: fastest way to add up a billion numbers
  • Previous by thread: Re: Is this the best way to Solve the Katsura 6 problem
  • Next by thread: Re: Unexpected message 2