Strengthening solve



I fixed some bugs in the to_poly_solver. The new version should be
better at rejecting spurious solutions (using Maxima 5.19post + SBCL)

  (%i13) to_poly_solve((x-%pi)/sin(x)=0, x);
  (%o13) %union()

  (%i14) to_poly_solve((sqrt(x)-1)/(x-1),x);
  (%o14) %union()

  (%i15) to_poly_solve((x^2 - 2) * (sqrt(x)-1)/(x-1),x);
  (%o15) %union([x = -sqrt(2)],[x = sqrt(2)])

OK, Maxima doesn't know that 2 * integer + 1 # 0

  (%i16) nicedummies(to_poly_solve(sin(x)/x,x));
  (%o16) %union(%if(2*%z0+1 # 0,[x = 2*%pi*%z0+%pi],%union()), %if(%z1 #
  0,[x = 2*%pi*%z1],%union()))

>From the Sage mailing list, circa 18 May 2009:

  (%i22) to_poly_solve(Q*sqrt(Q^2+2)-1,Q);
  (%o22) %union([Q = 1/sqrt(1-sqrt(2))],[Q = 1/sqrt(sqrt(2)+1)])

As always, if you all know of something I should read, think about, or
revise, let me know. There are plenty of equations to_poly_solve is
unable to solve:

   http://www.maplesoft.com/support/help/view.aspx?path=examples/solve
   x^(1/9) + (2^(8/9) - 2^(1/9))*(x - 1) - x^(8/9) = 0.

(Last example sent to me by an alert user.) So there is much room for
improvement.
If you all would like to try the new version, you'll need the CVS
versions of compar.lisp (patch for sign-log) and simp.lisp (patch for
simpsignum):

 (%i21) signum(%i*sqrt(1-sqrt(2)));
 (%o21) -1

Barton

-----maxima-bounces at math.utexas.edu wrote: -----

>To:?Maxima?List?<maxima at math.utexas.edu>
>From:?Richard?Fateman?<fateman at cs.berkeley.edu>
>Sent?by:?maxima-bounces at math.utexas.edu
>Date:?09/01/2009?12:53PM
>Subject:?[Maxima]?Strengthening?solve
>
>looking?at?making?Maxima's?solve?program?more?robust,?maybe?along?the
>lines?of?Mathematica's?Reduce,?I?came?up?with?this?simple?problem,
>solve((x-%pi)/sin(x)=0,?x)
>
>which?Maxima?says?has?the?solution?x=%pi,
>
>which?is?(a)?false?in?that?it?reduces?to?0/0=0?by?substitution,?and
>?????????(b)?false?in?the?limit?as?x->%pi,?since?it?is?then?-1=0.
>
>
>Mathematica?6.0?gives?a?warning?in?that?a?potential?solution?was
>"possibly?discarded?by?verifier"?and
>should?be?check?by?hand.?May?require?use?of?limits.
>It?also?warns?that?inverse?functions?are?being?used?by?Solve,?and
>suggests?using?Reduce.
>
>RJF
>
>
>_______________________________________________
>Maxima?mailing?list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima