Improper integral I'm trying to compute the following improper integral
$$ \int_{-\pi}^{\pi} f(t) \sin(nt)\operatorname{d}t, \;\;\;\;\; n \in \mathbb N$$
where $$f(x) = \begin{cases} -1 &\mbox{if } x \in [-\pi,0) \\
0 &\mbox{if } x = 0 \\
1 &\mbox{if } x \in (0, \pi) \end{cases} $$
What I tried is to write it
$$ \int_{-\pi}^{\pi} f(t) \sin(nt) \operatorname{d}t = \lim_{a \to 0} \int_{-\pi}^{a} f(t) \sin(nt) \operatorname{d}t + \lim_{a \to 0} \lim_{b \to \pi} \int_{a}^{b} f(t) \sin(nt) \operatorname{d}t$$
Now I'm not sure whether I'm allowed to just put in the values for $f$
$$\lim_{a \to 0} \int_{-\pi}^{a} (-1) \sin(nt) \operatorname{d}t + \lim_{a \to 0} \lim_{b \to \pi} \int_{a}^{b} 1 \sin(nt) \operatorname{d}t$$
because this seems wrong. Can somebody help me how to integrate such functions?
 A: The simplest thing to observe is that $f$ is odd, so the integrand is even, (the zero at the origin doesn't matter), and you can write the integral as
$$2 \int_0^{\pi} dt \, \sin{n t}  = \frac{2}{n} \left [1-\cos{\pi n} \right ] = \cdots$$
A: It is not an improper integral. The term improper integral applies when $f$ is unbounded and/or the interval of integration is infinite. In this case the integrand has a jump discontinuity. Functions with a finite number of jump discontinuities are Riemann integrable, and you can disregard the points of discontinuity. Thus
$$
\int_{-\pi}^\pi f(x)\,dx=\int_{-\pi}^0 f(x)\,dx+\int_0^\pi f(x)\,dx=-\int_{-\pi}^0 dx+\int_0^\pi dx=0.
$$
A: First you can separate your integrable domain as $[-\pi,0]$ and $[0,\pi]$, since $\forall a,b,c$ $$\int_a^bf=\int_a^cf+\int_c^bf$$
Second, since changing the finite number of values of an integrable function won't change the integral, your integral is equal to the integral with 
$f_1(x) = -1 \quad x\in [-\pi,0]$ and $f_2(x)=1 \quad x\in [0,\pi]$.
