Wrong answer for complex integral with maxima
I was trying to do the contour integral $\int_C |z-1|^2 dz$ 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 $-\frac{8}{3}$, which is wrong. The correct answer is $-4-i\pi$, which is given by the giac
and sympy
solvers.
It seems that maybe it is ignoring the absolute value, as we do have $\int_C (z-1)^2 dz = -\frac{8}{3}$.
Is this a bug in Maxima and/or Sage, or am I doing something silly?