Q:

Complex Integral

I have a question about a task, that I am supposed to solve in the Complex analysis course.
Let  $g(z)=\frac {\sin z}{z^2+i}$, and $K$ is a curve running from $-1$ to $1$, inside the domain of $g$ . What values can the integral take: 
$$\int_{K}g(z) \space dz \quad ?$$ 
I have tried completing the curve into a closed curve and have then used the residue theorem, I did also find all the singularities of g, but I just can't find a logicall answer.

A:

So... $g(z)$ has two singuar points : $a=-\frac {\sqrt2}{2}+\frac {\sqrt2}{2}i$ and $\frac {\sqrt2}{2}-\frac {\sqrt2}{2}i$ . If I complete the $K$ curve to a full curve, the closed curve now consists of two parts, $K$ and $G$, if $G$ does not enclose any of the singular points $\int _{K\bigcup G} g(z)dz =0 $  which means:
$\int _{K\bigcup G} g(z)dz =\int _{K} g(z)dz \space +\space \int _{G} g(z)dz = 0$  so $\int _{K} g(z)dz = -\int _{G} g(z)dz $.  So the integral takes the value of   $\int _{K} g(z)dz\space =-(g(1)-g(-1)). $ But if on the other hand the integral encloses one or both singular points then it should take the value of $\int _{K} g(z)=k\space Res(g,a)+h\space Res(g,b) $, where $Res(g,a)$ means the residue of function $g$ in $a$, and $k$ and $h$ are both integers,via the residue theorem 

