Solving the following integral $\int_1^c\frac{1}{x} \cos(a_nx)\mathrm{d}x\ $ Solve the following integral
 $$\int_1^c\frac{1}{x} \cos(a_nx)\mathrm{d}x$$
Where $$a_{n}=\frac{(2n-1)\pi}{2c}$$
What I tried:
I tried using integration by parts and I got an expression of the form 
$$\int_1^c\frac{2}{(a_n)^2x^3} \cos(a_nx)\mathrm{d}x
+\frac{1}{ca_n}\sin(a_nc)-\frac{1}{a_n}\sin(a_n)$$
which complicates the expression rather than solving it. I then tried  using wolfram alpha to solve the following integral but what it says is that the following integral cannot be solve by using the usual method found in calculus and it went on to solve using methods found in Complex Analysis (Which I dont quite get) and its final answer is in complex form. Could anyone explain to me how to solve the following integral and get the answer in the real form and not the complex form. Thanks
The answer found in my answer key gives $$\frac{(-1)^{n+1}}{a_n}$$
Thus this the final answer that I must arrive at.
 A: As said in comments and answers, the problem and the answer look rather strange.
$$\int \frac{\cos(\alpha x)}x \,dx=\text{Ci}(\alpha  x)$$ where appears the cosine integral function which cannot be expressed using any elementary function. $$\int_1^c \frac{\cos(\alpha x)}x \,dx=\text{Ci}(c \alpha )-\text{Ci}(\alpha )\qquad (\Re(c)\geq 0\lor c\notin \mathbb{R})$$ Replacing $\alpha$ by $a_n$ gives $$I_n=\int_1^c \frac{\cos(a_n x)}x \,dx=\text{Ci}\left(\frac{(2 n-1)
   \pi }{2}\right) -\text{Ci}\left(\frac{(2 n-1)
   \pi }{2 c}\right)$$ For $c=2$, I put the numerical values in the following table
$$\left(
\begin{array}{ccc}
n & I_n & \frac{4 (-1)^{n+1}}{\pi  (2 n-1)}\\
 1 & +0.286652 & +1.273240 \\
 2 & -0.529005 & -0.424413 \\
 3 & +0.252214 & +0.254648 \\
 4 & +0.052774 & -0.181891 \\
 5 & -0.013756 & +0.141471 \\
 6 & -0.146271 & -0.115749 \\
 7 & +0.110343 & +0.097942 \\
 8 & +0.021827 & -0.084883 \\
 9 & -0.011210 & +0.074896 \\
 10 & -0.083508 & -0.067013
\end{array}
\right)$$
If you make a scatter plot of the results, you will notice that there is no clear relation between them.
A: The result you give is erroneous; here is a counterexample:
Taking $c=2$ and $n=1$, the integral has numerical value $0.28665...$ whereas $a_{n}=\frac{2c}{(2n-1)\pi}=\frac{4}{\pi}=1.2732...$
