|  1 |    initial version    |  
FWIW :
sage: var("t")
t
sage: integrate(abs(exp(i*t).demoivre()-1)^2*i*exp(i*t), (t,0,pi))
-I*pi - 4
 HTH,
 
                
                Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.