# Evaluate an integral using integration by parts

Evaluate $$\int_1^2 \frac{\sin (nx)}{x} \, dx$$

Now, the solution suggested (using "integration by parts" method) is:

$$\int_1^2 \frac{\sin (nx)}{x} \, dx = \frac{-\cos(nx)}{nx}|_1^2 + \int_1^2 \frac{\cos (nx)}{nx} \, dx$$

As far as I can tell this is wrong. Shouldn't the integral on RHS be:

$$\int_1^2 \frac{\cos (nx)}{n\color{red}{x^2}} \, dx$$

• $$u = \frac{1}{x} \implies u' = \frac{-1}{x^{2}}$$ So yes, it should be on $x^{2}$ – mattos Feb 27 '15 at 15:18

$$\int_1^2 \frac{\sin (nx)}{x} \, dx=\int_1^2 \frac{1}{x}\left(\frac{-cos(nx)}{n}\right)' \, dx=\left.\frac{1}{x}\left(\frac{-cos(nx)}{n}\right)\right|_{1}^{2}-\int_{1}^{2}\frac{-\cos(nx)}{n}\left(\frac{1}{x}\right)'dx$$
As far as I know $$\int{\dfrac{\sin(nx)}{x} dx}$$ has not closed form solution. Using series expansion you can find $$\int{\dfrac{\sin(nx)}{x} dx}= nx-\dfrac{(nx)^3}{3\cdot 3!}+\dfrac{(nx)^5}{5\cdot 5!} \cdots$$