# How to calculate this integral: $\int_{C}{} (z^2-2z) dz$ where $C$ is a line segment starting at $1$ and ending in $i$

The task is as follows: $$\text{Calculate } \int_{C}{}f(z) dz \text{, where } \\ \text{a) } f(z)=z^2-2z \text{, } C \text{ - line segment starting at } 1 \text{ and ending at } i \text{;} \\ \text{b) }f(z)=\frac{\bar{z}}{z+i} \text{, } C \text{ - circle } |z+i| = 3 \text{.}$$

I do not know how to calculate either of the integrals. Any help or push in the right direction would be much appreciated. Thank you.

Update:

I calculated the $$a)$$ integral to be equal to $$\frac{7}{3}-\frac{i}{3}$$. If someone could check if I did good, that would be great.

Hint.

For (a), you can simply use the fundamental theorem of calculus (also true in complex analysis) since you have an entire function: $$\int_Cf(z)dz=F(B)-F(A)$$ where $$A$$ is the initial point of $$C$$ and $$B$$ the final point, and $$F$$ is an antiderivative of $$f$$.

For (b), the first thing you need is to parameterize your path $$C$$, which means writing $$z=g(t),\quad t\in[0,1]$$ for some function $$g$$.

Then $$\int_Cf(z)dz=\int_0^1 f(g(t))g'(t)dt.$$

• Okay, so is my $g(t)=i-\text{t}i+\text{t}$? – bosendorfer Jan 16 at 21:26
• @bosendorfer: you have different $g$ for (a) and (b).// If the parameterization interval is $[0,1]$, you should have $g(0)=1$ and $g(1)=i$ for (a). // Can you work that out? – user9464 Jan 16 at 22:08
• @bosendorfer: that's right. But there is a shortcut for (a), I have edited my answer. You only need to parameterize the path for (b). – user9464 Jan 16 at 22:26
• @bosendorfer: do you know how to go on? – user9464 Jan 16 at 23:04
• @bosendorfer: yes, that's correct. Then you can go on. – user9464 Jan 16 at 23:10