How to convert into a definite integral

It's literally

$$\int_0^3\cos(\pi x)\sin(2\pi x)dx$$

The substitution $u=\pi x$ re-expresses it as

$${1\over\pi}\int_0^{3\pi}\cos(u)\sin(2u)du$$

The basic idea is to think of the $1\over n$ as $\Delta x$, which in the limit becomes a $dx$, and $k/n$ as $x$, which in the limit varies from $0$ when $k=1$ to $3$ when $k=3n$.


Recall the Riemann sum $$\int_{x=a}^b f(x) \, dx = \lim_{n \to \infty} \sum_{k=1}^n f\left(a + \frac{b-a}{n} k\right) \frac{b-a}{n}.$$ Write your limit as $$S = \lim_{m \to \infty} \sum_{k=1}^{3m} \frac{1}{m} \cos \frac{k\pi}{m} \sin \frac{2k\pi}{m}.$$ Then with the choice $n = 3m$, $a = 0$, $b = 1$, $f(x) = \cos 3\pi x \sin 6\pi x,$ we get $$S = 3 \int_{x=0}^1 \cos 3\pi x \sin 6\pi x \, dx = \frac{1}{\pi} \int_{x=0}^{3\pi} \cos x \sin 2x \, dx.$$