Evaluating a complex line integral

Suppose $f(z) = y$. I want to find $\int_{\gamma} y$ where $\gamma$ is the curve joining the line segments $0$ to $i$ and then to $i+2$.

Try:

Let $\gamma_1(t) = it$ there $0 \leq t \leq 1$ and $\gamma_2 = t + i$ where $0 \leq t \leq 2$. So,

$$\int_{\gamma} y = \int_{\gamma_1} y dz + \int_{\gamma_2} y dz = \int_0^1 it i dt + \int_0^2 i dt = \int_0^1 - t dt + i 2 = -\frac{1}{2} + 2i$$

IS this correct?

• The separation of the integral along gamma in two integrals, and the parametrization are good. Notice, however, two problems: 1) the integrand should be y dz, instead of y, shouldn't it? 2) in the third expression in the series of equalities, you replace y by some value. Where did this value come from? Did you mean to use y = Im(z)? – toliveira Sep 27 '15 at 23:10

We have $f(z)=y$ on $\gamma$.
On $\gamma_1$, $z=it$ and $dz=idt$. Thus, $y=t$ and
$$\int_{\gamma_1}f(z)\,dz=\int_0^1t(idt)=\frac{i}{2}$$
On $\gamma_2$, $z=t+i$ and $dz=dt$. Thus, $y=1$
$$\int_{\gamma_2}f(z)\,dz=\int_0^21(dt)=2$$