Re: NSolve freezes on two polynomial equations

• To: mathgroup at smc.vnet.net
• Subject: [mg48379] Re: [mg48332] NSolve freezes on two polynomial equations
• From: Daniel Lichtblau <danl at wolfram.com>
• Date: Wed, 26 May 2004 02:41:35 -0400 (EDT)
• References: <200405251116.HAA03554@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Carlos Felippa wrote:
> This innocent looking system of 2 quadratic equations (extracted with
> InputForm from the guts of a large code) freezes Mathematica 4.2 on my
> Mac.  Same if NSolve is replaced by Solve. I wonder why, and how to
> fix it.  Thanks.
>
> ClearAll[x,y];
> eqs=
> {(37.5*(-0.005707305713190276 + 12.52471957392599*I +
>               x)*(4.672373972379857 + 12.52471957392599*I +
>               x))/((100. + 939.3539680444492*I)*x +
>           37.5*x^2 - 487.5*(0.4594268481272286 + 8.967155112255348*I +
>                 y)*(1.1815987928984124 + 16.08228403559663*I +
>                 y)) == -0.03653043382891893,
> (-487.5*(-1.0444224854481148 + 12.524719573925989*I +
>               y)*(0.6854481264737559 + 12.524719573925989*I +
>               y))/((100. + 939.3539680444492*I)*x +
>           37.5*x^2 - 487.5*(0.4594268481272286 + 8.967155112255348*I +
>                 y)*(1.1815987928984124 + 16.08228403559663*I +
>                 y)) == -0.8852848076704578};
> sol=NSolve[eqs,{x,y}]; Print[sol];
>

I believe this is a bug in NSolve handling of rational functions (I need
to look into this further). A work around would be to remove them with
Numerator[Together[...]].

exprs = {
(37.5*(-0.005707305713190276 + 12.52471957392599*I + x)*
(4.672373972379857 + 12.52471957392599*I + x))/
((100. + 939.3539680444492*I)*x + 37.5*x^2 -
487.5*(0.4594268481272286 + 8.967155112255348*I + y)*
(1.1815987928984124 + 16.08228403559663*I + y)) + -0.03653043382891893,
(-487.5*(-1.0444224854481148 + 12.524719573925989*I + y)*
(0.6854481264737559 + 12.524719573925989*I + y))/
((100. + 939.3539680444492*I)*x + 37.5*x^2 -
487.5*(0.4594268481272286 + 8.967155112255348*I + y)*
(1.1815987928984124 + 16.08228403559663*I + y)) + 0.8852848076704578};

Out[24]//InputForm=
{0.04*Second, {{x -> -4.585064233464287 - 12.524719573926033*I,
y -> 0.20980857814216422 - 12.524719573926097*I},
{x -> -4.700243789960978 - 12.524719573926033*I,
y -> -0.8168089849056585 - 12.524719573925948*I},
{x -> -0.06353162442403039 - 12.49422903643516*I,
y -> -0.29523493134015644 - 12.79648760504943*I},
{x -> -0.0635316244240563 - 12.555210111416677*I,
y -> -0.29523493134014506 - 12.25295154280242*I}}}

Daniel Lichtblau
Wolfram Research

```

• Prev by Date: [Fwd: Re: Mathematica Trial]--> CalculationCenter 2
• Next by Date: Re: Eigensystem: different solution in V5.0 and V4.1 ??
• Previous by thread: NSolve freezes on two polynomial equations
• Next by thread: Re: NSolve freezes on two polynomial equations