Re: System for which Solve and NSolve both fail
- To: mathgroup at smc.vnet.net
- Subject: [mg30589] Re: [mg30572] System for which Solve and NSolve both fail
- From: BobHanlon at aol.com
- Date: Thu, 30 Aug 2001 03:51:35 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
In a message dated 2001/8/29 8:46:22 AM, writes:
>Needs["Graphics`ImplicitPlot`"];
>
>Needs["Graphics`Colors`"];
>
>Solve and NSolve are primarily for polynomial equations. Use FindRoot
>
>eqns = {3^x + 3^y == 90, x + y == 6};
>
>ImplicitPlot[eqns, {x, 1, 5}, {y, 1, 5}, PlotStyle -> {Red, Blue}];
>
>FindRoot[eqns, {x, 4.1}, {y, 2.2}] // Rationalize[#, 1*^-8]&
>
>{x -> 4, y -> 2}
>
>FindRoot[eqns, {x, 2.2}, {y, 4.1}] // Rationalize[#, 1*^-8]&
>
>{x -> 2, y -> 4}
>
>eqns /. {%, %%}
>
>{{True, True}, {True, True}}
>
You can "force" Solve as follows
Transpose[{xSoln =
Solve[3^x + 3^y == 90 /.
(ySoln = Flatten[
Solve[x+y == 6, y]]),
x], ySoln /. xSoln}]
Bob Hanlon
Chantilly, VA USA