I am learning about hyperelliptic curves and hyperelliptic integrals. I encountered some problems when reading the book by Gesztesy and Holden (F. Gesztesy, H. Holden, Soliton Equations and Their Algebro-Geometric Solutions, Volume 1: (1+1)-Dimensional Continuous Models, Cambridge University Press, Cambridge, 2003, pp. 360–363).
Consider the hyperelliptic curve $$ y^2 = R_{2n+1}(z) = \prod^{2n}_{j=0}(z - E_j), \ \ E_0<E_1<\dots <E_{2n}. $$ It is known that this curve can be compactified by adding a point $P_{\infty}$, which becomes a two-sheeted compact Riemann surface of genus $n$.
A basis of holomorphic differentials on the curve is given by $$\eta_j = \dfrac{z^{j-1}{\mathrm d}z}{y}, j=1,\dots, n.$$ The homology basis $\{a_1, \dots, a_n, b_1, \dots, b_n\}$ of the curve is chosen as follows. The $a_j$ cycle encircles the interval $[E_{2j-2}, E_{2j-1}], j=1,\dots, n$ clockwise on the upper sheet. The $b_j$ cycle starts at a point in $(E_{2j-2}, E_{2j-1}), j=1,\dots,n$, on the upper sheet, proceeds clockwise to intersect $a_j$, and then continues clockwise on the upper sheet until it hits a point on the cut $[E_{2n}, \infty)$. Then $b_j$ returns clockwise on the lower sheet to its original starting points. As shown below
The authors wrote in the book $$ \int_{a_k}\eta_j = 2\int^{E_{2k-1}}_{E_{2k-2}}\dfrac{z^{j-1}{\mathrm d}z}{y}, $$ and $$ \int_{b_k}\eta_j = 2\sum^n_{l=k}\int^{E_{2l}}_{E_{2l-1}}\dfrac{z^{j-1}{\mathrm d}z}{y}. $$ I don't understand why the integration path changed from the cycle $a_k$ to $[E_{2k-2}, E_{2k-1}]$ (as well as $b_k$).
Can someone give me some tips?