- labels: 460522 --> Lisp Core - Trigonometry
--------------------------------------------------
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. #
##################################################
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.
Logged In: YES
user_id=28849
Originator: NO
Fixed by replacing call to radcan with ratsimp.
Log in to post a comment.