Re: Solve Feature?

• To: mathgroup at smc.vnet.net
• Subject: [mg52795] Re: Solve Feature?
• From: DrBob <drbob at bigfoot.com>
• Date: Mon, 13 Dec 2004 04:23:06 -0500 (EST)
• References: <200412100123.UAA18967@smc.vnet.net> <opsir6lsn2iz9bcq@monster.ma.dl.cox.net> <002401c4dfb5\$809b6a00\$1802a8c0@Pentium4> <opsiu9j4nmiz9bcq@monster.ma.dl.cox.net>
• Sender: owner-wri-mathgroup at wolfram.com

```By the way, it gets even worse if I use NSolve:

solution = NSolve[{c1, c5}]
{c1, c5} /. solution
Apply[Subtract, {c1, c5}, {1}] /. solution

{{x -> -4.27759132*^8,
y -> 43.74999927054117},
{x -> 4.2775924*^8,
y -> 43.75000072945884}}
{{False, False}, {False, False}}
{{1.82977917785309*^17,
1.82977917785309*^17},
{1.8297792462945597*^17,
1.8297792462945597*^17}}

These are simple polynomial equations, so this is really puzzling.

Bobby

On Sat, 11 Dec 2004 17:15:30 -0600, DrBob <drbob at bigfoot.com> wrote:

> HELP!! Here are two very simple quadratic equations (circles):
>
> {c1, c5} = {(-50 + x)^2 + (-50 + y)^2 == 156.25,
>   (-50.00000000000002 + x)^2 +
>     (-37.49999999999999 + y)^2 == 156.25};
>
> If we rationalize before solving, we get accurate solutions:
>
> solution = Solve@Rationalize@{c1, c5}
> solution // N
> {c1, c5} /. solution
> Subtract @@@ {c1, c5} /. solution
>
> {{x -> (25/4)*(8 - Sqrt[3]), y -> 175/4},
>      {x -> (25/4)*(8 + Sqrt[3]), y -> 175/4}}
> {{x -> 39.17468245269452, y -> 43.75},
>    {x -> 60.82531754730548,  y -> 43.75}}
> {{True, True}, {True, True}}
> {{-4.263256414560601*^-14, 4.973799150320701*^-13},
>    {-4.263256414560601*^-14, -4.263256414560601*^-13}}
>
> You can check this visually with ImplicitPlot:
>
> ImplicitPlot[{c1, c5}, {x, -40, 70}]
>
> But if we solve without Rationalize, we get wildly inaccurate results:
>
> solution = Solve@{c1, c5}
> {c1, c5} /. solution
> Subtract @@@ {c1, c5} /. solution
>
> {{x -> 16., y -> 43.74999999999993},
>    {x -> 84., y -> 43.75000000000004}}
> {{False, False}, {False, False}}
> {{1038.812500000001, 1038.8125000000005},
>   {1038.8124999999995, 1038.8124999999993}}
>
> I'm using version 5.1.
>
> Bobby

--
DrBob at bigfoot.com
www.eclecticdreams.net

```

• References:
• Prev by Date: Re: multiple outputs from a function
• Next by Date: Re: multiple outputs from a function
• Previous by thread: Solve Feature?
• Next by thread: Re: Solve Feature?