SR.wild(0) and abs function

11 views
Skip to first unread message

Pedro Cruz

unread,
Nov 8, 2013, 12:16:23 PM11/8/13
to sage-s...@googlegroups.com
(I've did a little search on this but couldn't found the solution.)

How to use SR.wild(0) when "abs" is present in an expression ?

Thanks.

Pedro

EXAMPLE 1 (with abs)

t=var('t')
w0 = SR.wild(0)
e1 = abs(cos(t))^2; print e1
print e1.subs( abs(w0)^2 == w0 )

abs(cos(t))^2
abs(cos(t))    #abs shouldn't be here.

EXAMPLE 2 (with tan)

t=var('t')
w0 = SR.wild(0)
e2 = tan(cos(t))^2; print e2
print e2.subs( tan(w0)^2 == w0 )

tan(cos(t))^2
cos(t)  #tan and square removed.


Reply all
Reply to author
Forward
0 new messages