I am trying to use contour integration to find the integral of:
$$ \int_\gamma ydz $$
where we have the union of line segments from $0$ to $i$ and then to $i+2$.
I simply do not understand how to do this. I missed the lecture on the introduction to this due to being sick.
I attempted to do:
$$ \int_0^i ydz + \int_i^{i+2} ydz $$ but did not get the right answer, which is $2+\frac{i}{2}$.I believe we are supposed to use Parameterization but I don't understand how to Parameterize a curve.

Let $\gamma_1$ be the line segment from $0$ to $i$, and let $\gamma_2$ be the line segment from $i$ to $i+2$. Then $\gamma = \gamma_1 + \gamma_2$, and so $$\int_\gamma y\, dz = \int_{\gamma_1} y\, dz + \int_{\gamma_2} y\, dz.$$ Parametrize $\gamma_1$ by setting $z = it$, $0 \le t \le 1$. Then $$\int_{\gamma_1} y\, dz = \int_0^1 t (i\, dt) = i \int_0^1 t\, dt = \frac{i}{2}.$$ Parametrize $\gamma_2$ by setting $z = t + i$, $0 \le t \le 2$. Then
$$\int_{\gamma_2} y\, dz = \int_0^2 1\, dt = 2.$$
Thus
$$\int_{\gamma} y\, dz = 2 + \frac{i}{2}.$$