       Re: Re: System for which Solve and NSolve both fail

• To: mathgroup at smc.vnet.net
• Subject: [mg30651] Re: [mg30650] Re: System for which Solve and NSolve both fail
• From: Andrzej Kozlowski <andrzej at tuins.ac.jp>
• Date: Mon, 3 Sep 2001 20:32:26 -0400 (EDT)
• Sender: owner-wri-mathgroup at wolfram.com

```Solve will in principle give you solutions to polynomial equations and
systems of arbitrary degree. (In principle means that it will always
attempt to do so but you may not be able to wait long enough to see the
answer.). NSolve in this respect has no advantage over Solve because it
also uses algebraic (not analytic) methods, but it is considerably
faster. (This has nothing to do with the fact that higher degree
equations can't be solved in radicals because Solve does not try to
solve polynomial equations in radicals. To see what happens try any
polynomial equation of degree 7, e.g. Solve[x^7 + 2x^6 - x^3 - 3x + 2 -
1 == 0, x] or anything else. Of course, for high degree equations you
may run out of patience waiting for the answer but in principle they are
all solvable in the same way. The method of Groebner basis also in
principle allows one to solve arbitrary systems of polynomial equations
in several variables.)

As for non-polynomial equations there are very few general methods.
Basically the only equations that can be solved are those that can be
reduced to solving an polynomial equation (or perhaps a system) and
applying the inverse function of a transcendental function. This for
example, if you replace x by E^y in the above polynomial equation you
will get some solution plus the usual warning about using inverse
functions:

In:=
Solve[1 - 3*E^y - E^(3*y) + 2*E^(6*y) + E^(7*y) == 0, y]

From In:=
Solve::ifun: Inverse functions are being used by Solve, so some
solutions may \
not be found.

Out=
2       3       4       5     6
{{y -> 0}, {y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  +
#1  & , 1]]},

2       3       4       5     6
{y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  + #1  & ,
2]]},

2       3       4       5     6
{y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  + #1  & ,
3]]},

2       3       4       5     6
{y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  + #1  & ,
4]]},

2       3       4       5     6
{y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  + #1  & ,
5]]},

2       3       4       5     6
{y -> Log[Root[-1 + 2 #1 + 2 #1  + 3 #1  + 3 #1  + 3 #1  + #1  & ,
6]]}}

One exception is trigonometric functions, in solving which Mathematica
uses some non algebraic trigonometric identities, e.g:

In:=
Solve[Sin[x]==Cos[x],x]

From In:=
Solve::ifun: Inverse functions are being used by Solve, so some
solutions may \
not be found.

Out=
3 Pi          Pi
{{x -> -(----)}, {x -> --}}
4            4

but this is an exception and in general you can't expect to get anywhere
with Solve or NSolve in cases where you have algebraically independent
transcendental functions, e.g:
In:=
NSolve[Sin[x]==x,x]

From In:=
Solve::tdep: The equations appear to involve the variables to be solved
for \
in an essentially non-algebraic way.

Out=
NSolve[Sin[x]==x,x]

Andrzej Kozlowski
Toyama International University
JAPAN
http://platon.c.u-tokyo.ac.jp/andrzej/

On Sunday, September 2, 2001, at 04:58  PM, Ben Langton wrote:

>
> Would I be correct in concluding that Solve (or NSolve for higher degree
> systems) will always produce at least a numerical approximation of the
> complete solution set for a system of polynomial equations, but is not
> guaranteed to do so for non-polynomial systems? Also, is there any
> reliable
> predictor of which non-polynomial systems these commands will fail on
> (I'm
> guessing not, since otherwise WRI would use such a predictor to extend
> their
> software to deal with these cases)? I know this is probably getting a
> bit
> esoteric, but if anyone could shed some light on why these commands
> work for
> some non-polynomial systems but not others, I would be very interested
> to
> find out more.
>
> Regards,
>
> Ben Langton, QuickMath
>
>> From: Ben Langton <ben at spam.bugs.me.quickmath.com>
To: mathgroup at smc.vnet.net
>> Organization: OzEmail Ltd, Australia
>> Newsgroups: comp.soft-sys.math.mathematica
>> Date: Wed, 29 Aug 2001 06:25:01 +0000 (UTC)
>> Subject: [mg30651] [mg30650] System for which Solve and NSolve both fail
>>
>> Hi,
>>
>> I noticed that Mathematica seems unable to solve this system of
>> equations :
>>
>> 3^x + 3^y = 90
>>
>> x + y = 6
>>
>> With a bit of thought, you can see by inspection that the solutions are
>>
>> {x , y} = {2 , 4} or {4 , 2}
>>
>> However, when I use the commands
>>
>> Solve[{3^x+3^y==90,x+y==6},{x,y}]
>>
>> or
>>
>> NSolve[{3^x+3^y==90,x+y==6},{x,y}]
>>
>> I get a warning message starting with
>>
>> Solve::incnst: Inconsistent or redundant transcendental equation
>>
>> Can anyone shed some light on what is going on here? Any way to get
>> around
>> this problem?
>>
>> (I am using Mathematica v 3.0.0.0 under Mac OS 9.2.1, although I
>> believe a
>> similar thing occurs under v 4.x)
>>
>> Regards,
>>
>> Ben Langton
>>
>> http://www.quickmath.com/
>>
>
>

```

• Prev by Date: Re: Curl
• Next by Date: Repeated Messages Fixed
• Previous by thread: Re: Re: System for which Solve and NSolve both fail
• Next by thread: Re: Re: System for which Solve and NSolve both fail