Menu ▾ ▴

#670 SOLVE gives a wrong answer

None
open
nobody
solve (66)
5
2025-04-13
2005-01-19
Anonymous
No

When I try this:

kill(all)$
x(t):=exp(t)*cos(t)$
y(t):=exp(t)*sin(t)$
z(t):=exp(t)*sqrt(3)$
g(t):=[x(t),y(t),z(t)]$
d(t):=sqrt(g(t).g(t))$
d(t)=2;
solve(%,t);

I get the following output:
[t=log(-2/sqrt(3)),t=log(2/sqrt(3))]
but the correct answer should be t= 0.
Using TRIGSIMP or TRIGREDUCE I get te correct answer:

trigreduce(d(t)=2);
solve(%,t);

Now I get:
[t = 0]

Is this a bug?

Franco Buratti (Italy)
bufranz@hotmail.com

---------------------------------------------
Maxima version: 5.9.1
Maxima build date: 7:34 9/24/2004
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.6.5
---------------------------------------------

Discussion

  • Barton Willis

    Barton Willis - 2005-03-05

    Logged In: YES
    user_id=895922

    Yes, this is a bug. Another solution is t = %i * %pi.
    Maxima misses that solution after applying trigreduce.

    Barton

     
  • Robert Dodier

    Robert Dodier - 2006-08-04
    • labels: --> 460522
     
  • Robert Dodier

    Robert Dodier - 2006-08-04

    Logged In: YES
    user_id=501686

    Observed in 5.9.3cvs.

     
  • Robert Dodier

    Robert Dodier - 2006-09-09
    • labels: 460522 --> Lisp Core - Solving equations
     
  • Robert Dodier

    Robert Dodier - 2025-04-13
    • labels: Lisp Core - Solving equations --> solve
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,3 @@
    -
     When I try this:
    
     kill\(all\)$
    
    • Group: --> None
     
  • Robert Dodier

    Robert Dodier - 2025-04-13

    Still present (same result) in 7ed806f (post-5.47).

    I see to_poly_solve returns %union([t = %i*%pi*%z38153]) which seems optimal.

     

Log in to post a comment.