I'm trying to do contour integration, but I need it over a specific subset of complex numbers $z$. Specifically, I need a contour that, for real numbers $a$, $b$, and $c$, it covers all and only $z \in \{ \Re(z) \in [c-a, c+a] \}$, but for all $z$ in the contour, $\Im(z) \in [-b,b] $. I also need it to be in polar form, that is, all points on $r(\theta)$, with $0 \le \theta \le 2\pi$, describe the boundary of the contour.
I'm basically asking for an ellipse that has radius $a$ on the real line, radius $b$ on the imaginary line and the center at $c+0i$.
In Cartesian coordinates:
$$\frac{(x-c)^2}{a^2}+\frac{y^2}{b^2}=1$$
Substitute $(x,y)=r(\cos \theta,\sin \theta)$ and solve $r$,
$$r_{\pm}(\theta)= \frac{b^2 c\cos \theta \pm ab\sqrt{(a^2-c^2) \sin^2 \theta+b^2\cos^2 \theta}} {a^2\sin^2 \theta+b^2\cos^2 \theta}$$
A plot of $r$ vs $\theta$ when $(a,b,c)=(5,4,3)$ such that $a>c>0$
and the corresponding ellipse:
A plot of $r$ vs $\theta$ when $(a,b,c)=(3,4,5)$ such that $c>a>0$
and the corresponding ellipse:
Further points to be noticed:
Given $\theta \in [0, 2\pi]$, the contour with continuous $\theta$ should enclose the origin. In this case, the mapping $\theta \mapsto r$ is surjective.
Now $0\in [c-a,c+a]$,
$$a> |c| \ge 0$$
See also another post of mine.
In particular, $c$ is the linear eccentricity, that is
$$a=\frac{b}{\sqrt{1-e^2}}=\frac{c}{e}=\sqrt{b^2+c^2}$$
Then
$$r(\theta)=\frac{b^2}{a-c\cos \theta}$$