MathGroup Archive 2007

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

Search the Archive

Re: Very Strange Behaviour about something Very Simple

  • To: mathgroup at smc.vnet.net
  • Subject: [mg77151] Re: [mg77130] Very Strange Behaviour about something Very Simple
  • From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
  • Date: Tue, 5 Jun 2007 06:30:08 -0400 (EDT)
  • References: <200706040755.DAA06306@smc.vnet.net>

Well, I will risk calling this a bug  Although I can only speculate  
about how this comes about, I think I can propose a reasonable  
hypothesis about what happens. One has to remember that Solve  
"really" can only solve polynomial (including linear) equations and  
all other equations it attempts to reduce to polynomial ones. One can  
illustrate what happens on an easier example than yours. Compare  
these cases:


(1)

  Solve[(a - 1)/b == a/b - 1/b, a]
{{}}

(2)

Solve[(a - 1)/b == a/b - 1/b, b]
{}

(3)

Solve[(a - 1)/b == a/b - 1/b, {a, b}]
{{}}]

(4)

Reduce[(a - 1)/b == a/b - 1/b]
True

Of the above outputs (1) appears to say that the equation has no  
(generic) solutions and all the others say it is a tautology.  
Actually the last two cases really do not belong here as quite  
different methods are used (the equation in (3) involves 2 variables,  
in (1) and (2) one variable and one parameter),  and I only included  
them to show the alternative ways to deal with this sort of problem.  
The interesting contrast is between (1) and (2). Solve sees (1) as a  
linear equation and since it is good at solving linear equations it  
has no problem with this trivial one. In the second case, however,  
Solve sees  an equation involving rational functions so it attempts  
to transform it all the non-zero terms to one side to obtain an  
equation of the form p/q==0 where p is a polynomial (remember, Solve  
really can only solve polynomial equations). So it does this:

Together[(a - 1)/b - a/b + 1/b]

and obtains 0. At this point it ought to, it seems to me, conclude  
that the equation is a tautology and return {{}} but it gets confused  
and decides that there are no solutions. So, if this analysis is more  
or less correct, you have found a bug. But it may still turn out to  
be a feature ;-)

Andrzej Kozlowski



On 4 Jun 2007, at 16:55, Apostolos E. A. S. Evangelopoulos wrote:

> Hello all!
>
> The following results appear extremely weird and I shall definitely  
> appreciate ideas about why this might be happening!
>
> I am asking for a solution of the following equation:
> Solve[8R^3/(3h)-h^2/3\[Equal](8R^3+2h^3-3h^3)/(3h), h]
> The result is {}, meaning -as far as I know- that there are no  
> solutions.
>
> Equivalently, I ask for the following:
> True &&8R^3/(3h)-h^2/3\[Equal](8R^3+2h^3-3h^3)/(3h),
> and, instead of getting a `False' statement, which would be  
> consistent with the previous output, I get the same line in  
> equation form, i.e.
> -h^2/3 + (8*R^3)/(3*h) == (-h^3 + 8*R^3)/(3*h),
> meaning that -again as far as I know- there exists a finite number  
> of particular vaules of R and h satisfying this equality.
>
> And here comes the incredible bit:
>
> Taking the right hand side of the above just one small step further  
> and splitting the fraction into two, one easily observes that the  
> above is an identity! Indeed, Mathematica will respond as follows  
> (and correctly this time):
>
> Solve[8R^3/(3h)-h^2/3\[Equal]8R^3/(3h)-h^2/3, h]
> Output: {{}}
>
> True && 8R^3/(3h) - h^2/3 == 8R^3/(3h) - h^2/3
> Output: True
>
> Ultimately, in asking for a simplification of either of the two  
> sides (even from much more complex but equivalent forms)  
> Mathematica always gives the same output and verifies identity. But  
> does this mean I always have to be so careful and simplify  
> everything as much as I can before manipulating it at all!?
>
> What more can I say...
>
> I eagerly await your view on this!
>
> Cheers,
> Apostolos
>



  • Prev by Date: Dynamic 2D plotting in V6
  • Next by Date: Re: MakeExpression problem
  • Previous by thread: Very Strange Behaviour about something Very Simple
  • Next by thread: Re: Very Strange Behaviour about something Very Simple