#827 trigsimp(sqrt(%i2)) != sqrt(trigsimp(%i2))

closed
nobody
5
2012-12-04
2005-11-30
Anonymous
No

--------------------------------------------------

Maxima version: 5.9.2
Maxima build date: 9:5 10/12/2005
host type: i686-pc-mingw32
lisp-implementation-type: GNU Common Lisp (GCL)
lisp-implementation-version: GCL 2.6.7

--------------------------------------------------

##################################################
# Start problem with sqrt and trigsimp: #
# #
# (%i2) 2*(cos(x)^2-sin(x)^2)+2; #
# 2 2 #
# (%o2) 2 (cos (x) - sin (x)) + 2 #
# (%i3) trigsimp(sqrt(%i2)); #
# (%o3) - 2 abs(cos(x)) #
# (%i4) sqrt(trigsimp(%i2)); #
# (%o4) 2 abs(cos(x)) #
# #
# End problem with sqrt and trigsimp. #
##################################################

Discussion

  • Robert Dodier

    Robert Dodier - 2006-08-14
    • labels: 460522 --> Lisp Core - Trigonometry
     
  • Raymond Toy

    Raymond Toy - 2006-11-09

    Logged In: YES
    user_id=28849

    This bug is caused by the call to radcan in trigsimp
    (share/trigonometry/trgsmp.mac).

    For the case trigsimp(sqrt(%i2)), radcan converts
    sqrt(2*(cos(x)^2-sin(x)^2)+2) int
    sqrt(2)*%i*sqrt(sin(x)^2-cos(x)^2-1).

    I don't think this is what we want. Perhaps replacing radcan
    with ratsimp would be better.

     
  • Raymond Toy

    Raymond Toy - 2006-12-22
    • status: open --> closed
     
  • Raymond Toy

    Raymond Toy - 2006-12-22

    Logged In: YES
    user_id=28849
    Originator: NO

    Fixed by replacing call to radcan with ratsimp.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks