Integration using complex analysis