Page 1 sur 1

false nonzero imaginary part after real substitution

Publié : dim. oct. 10, 2021 8:48 pm
par lukamar
Hi,
There's a strange thing happening when substituting in giac 1.7.0-25:

Code : Tout sélectionner

s:=subs(ln(1+x1^2)-x2,[x1=-sqrt((sqrt(2*(sqrt(17)-1))-2)/2),x2=(-sqrt(17)+1)/2])
Since values for x1 and x2 are both real, the result should obviously be real also.
However, the command

Code : Tout sélectionner

im(s)
gives

Code : Tout sélectionner

(1-i)*pi/2
which is strange on its own because it contains the imaginary unit. Also

Code : Tout sélectionner

im(normal(s))
yields

Code : Tout sélectionner

pi/2
which is a contradiction.