# Revision history [back]

### Trouble with an integral

Hi,

Let f be the following function:

f(t, z0, z1) = (z0z1 - 1)(z0 - z1)/((tz0 - 1)(tz1 - 1)(t - z0)(t - z1)z0)

f is a nice holomorphic function and I would like to compute the contour integral

\int_{|z1|=1} \int_{|z0|=1} f(t, z0, z1) dz0/z0 dz1/z1

Assuming 0 < t < 1, the result should be -4 pi^2/(t^2-1).

In Sage:

var("z0, z1, theta0, theta1")

assume(0 < t < 1)

f = (z0z1 - 1)(z0 - z1)/((tz0 - 1)(tz1 - 1)(t - z0)(t - z1)z0)

g = f.subs({z0: exp(Itheta0), z1: exp(Itheta1)})

Now if I integrate with respect to theta0 first: g.integrate(theta0, 0, 2pi) Sage answers that the integral is zero. If I integrate with respect to theta1 first: factor(g.integrate(theta1, 0, 2pi).integrate(theta0, 0, 2pi)) Sage answers that the integral is -4pi^2/t^2 which is also clearly wrong...