Determine the integral of the function $f(z)=\tan z$ around a contour that is a rectangle extending from $0$ to $2 \pi$ in the real direction and from $-0.5i$ to $0.5i$ in the imaginary direction. $$ $$ How to find the rectagle ? Here $-0.5i \leq y \leq 0.5i$ and $z=0 $ implies $\tan0=0.$
So $x$ starts from $0$. But what is the upper limit of $x$ in order to find the rectangle? Please help me, I got stuck here.
If you want to do this the "primitive way." Which it sort of sounds like you might.
Then you break the perimeter of the rectangle into 4 lines, and evaluate the 4 line integrals.
e.g. starting at $(0, -0.5 i)$ working counter clockwise
$$z = x+iy = t - 0.5i\\ dz = dt$$
$$\int_0^{2\pi} \tan(t-0.5i) \ dt$$
$$(2\pi, -0.5 i) \text{ to } (2\pi, 0.5i)$$
$$z = 2\pi + it\\ dz = i\ dt$$
$$\int_{-0.5}^{0.5} i\tan (2\pi + it)\ dt$$
etc. until you have done all four contours.
If you have learned the Cauchy integral formula/ residue formula, then you know that can evaluate the contour integral by evaluating the places where the function fails to be analytic.