integrate((x*tan(x/2)**2 + 1)/tan(x/2))