I want to prove that
$$\int_{0}^{+\infty} \frac{\sin(\pi x)}{x} dx$$
is convergent;
I know that $\int \frac{\sin(\pi x)}{x}=\frac{1-\cos(\pi x)}{\pi x}+ \int \frac{1-\cos(\pi x)}{\pi x^2} dx$.
I want to prove that
$$\int_{0}^{+\infty} \frac{\sin(\pi x)}{x} dx$$
is convergent;
I know that $\int \frac{\sin(\pi x)}{x}=\frac{1-\cos(\pi x)}{\pi x}+ \int \frac{1-\cos(\pi x)}{\pi x^2} dx$.
We have that $\sin(\pi x)$ has a bounded primitive and $\frac{1}{x}$ is decreasing towards zero as $x\to +\infty$, hence the integral is convergent by Dirichlet's test (integral version).
This question deals with the computation of that integral.
Hint. Integrating by parts as you did is Ok, one has for $M>0$, $$ \int_{0}^M \frac{\sin(\pi x)}{x} dx=\left.\frac{1-\cos(\pi x)}{\pi x}\right]_0^M+ \int_0^M \frac{1-\cos(\pi x)}{\pi x^2} dx $$ then letting $M \to \infty$ gives $$ \left|\int_{0}^\infty \frac{\sin(\pi x)}{x} dx\right|=\left|\lim_{M \to \infty}\int_{0}^M \frac{\sin(\pi x)}{x} dx\right|\le \int_0^1 \left|\frac{1-\cos(\pi x)}{\pi x^2}\right| dx+\int_1^\infty \frac{|2|}{\pi x^2} dx<\infty $$