# Revision history [back]

### simplify_full sometimes does not like abs and I

Hi

Maxima simplify_full() sometimes does not like abs() and Imaginary

var('t')
h(t)=sqrt(  abs( -2*I*cos(t)*sin(t) + 2*sin(t)^2 )  )
#h(t)=sqrt(-2*I*cos(t)*sin(t) + 2*sin(t)^2)

show('h(2) =\t ',h(2),'\t h(2) numerical =\t ',h(2).n())

show('h(t) =\t ',h.simplify_full())


### simplify_full sometimes does not like abs and I

Hi

Maxima simplify_full() sometimes does not like abs() and Imaginary

var('t')
h(t)=sqrt(  abs( -2*I*cos(t)*sin(t) + 2*sin(t)^2 )  )
#h(t)=sqrt(-2*I*cos(t)*sin(t) + 2*sin(t)^2)

show('h(2) =\t ',h(2),'\t h(2) numerical =\t ',h(2).n())

show('h(t) =\t ',h.simplify_full())


not only simplify_full does not like abs and I

var('t')
tStart=0
tEnd=4*pi
tRange=(t,tStart,tEnd)
# plot ok  if I replaced by 1
h(t)=sqrt( abs(-4*cos(t)^2 - 8*I*cos(t)*sin(t) + 4*sin(t)^2 + 1) )

N=60
vSub=0
inc=tEnd/(2*N)
hL=[]
vL=[]
for n in range (0,2*N+1) :
hL.append(h(t).subs(t=vSub).n(10))
vL.append(vSub)
#show('h(t) =\t ',h(t),'h(t) num =\t ',h(t).subs(t=vSub).n(10))
#show(vSub)
vSub+=inc
show(vL)
show(hL)

plt = parametric_plot3d(  ( cos(t),sin(t),h(t)),
tRange,color='blue',thickness=10)
show(plt,aspect_ratio=1)