I was trying to do the contour integral ∫C|z−1|2dz along the upper unit semicircle, and tried
t = var('t')
integrate(abs(exp(i*t)-1)^2*i*exp(i*t), (t,0,pi))
The answer returned was −83, which is wrong. The correct answer is −4−iπ, which is given by the giac
and sympy
solvers.
It seems that maybe it is ignoring the absolute value, as we do have ∫C(z−1)2dz=−83.
Is this a bug in Maxima and/or Sage, or am I doing something silly?