# contour integral with integration by parts

Is there a complex version of integration-by-part? I saw someone used it but didn't find it in textbook. I tested integrals $\int_{\mathcal{C}}\frac{\log(x+1)}{x-2}\mathrm{d}x$ and $\int_{\mathcal{C}}\frac{\log(x-2)}{x+1}\mathrm{d}x$, where $\mathcal{C}$ encloses both -1 and 2. But the results do not match. Is it because they are not equal at the first place or I chose the wrong branch cut?

## 1 Answer

Integration by parts is just the product rule and the Fundamental Theorem of Calculus. But you need well-defined analytic functions on your contour, which you don't have here.

• Not everyone would agree in your answer. Take a look at math.stackexchange.com/a/505865/622884 for example. Commented Jan 3, 2022 at 11:57
• @DrPotato Looks to me as if Daniel said exactly the same thing, using the word “holomorphic” instead of “analytic.” Commented Jan 3, 2022 at 14:10
• (+1) This looks like a good answer. There is no analytic extension of $\log(x+1)$ onto a contour that has a non-zero winding number around $-1$. The same goes for $\log(x-2)$ and $2$.
– robjohn
Commented Jan 3, 2022 at 18:37
• Yes Ted you're right. So is there any alternative for contour integration by parts when the contour encloses some poles or singularities? Commented Jan 5, 2022 at 14:29
• @DrPotato For each integrand to be a well-defined holomorphic/analytic function on the closed contour, every function appearing must have the sum of residues equal to $0$ inside. Commented Jan 5, 2022 at 18:14