Can One Integrate $\frac{1}{i} \int \frac{e^{ix}-e^{-ix}}{e^{ax}+e^{-ax}+e^{ix}+e^{-ix}}dx$ I'd like to integrate 
$$I(a)=\int \frac{\sin(x)}{\cosh(ax)+\cos(x)}dx$$
by changing $sin$ etc... into their exponential representation.
Using $e^{ix} = \cos(x) + i \sin(x)$ and $e^{ax} = \cosh(ax)+\sinh(ax)$ we have 
$$\frac{1}{i} \int \frac{e^{ix}-e^{-ix}}{e^{ax}+e^{-ax}+e^{ix}+e^{-ix}}dx =I(a)$$
If one substitutes $e^x = y$ we get $y^i$, can we do this? Can one get this method to work? A very similar integral has an answer:
http://integralsandseries.prophpbb.com/topic397.html?sid=77128c640169d5c07a9b32a5e7c35bc2

Consider the integral 
\begin{align}
I(a) = \int \frac{\sin(x) }{ \cos(x) + \cos(ax) } \ dx.
\end{align}
This integral can be readily evaluated as is given by
\begin{align}
I(a) = \frac{1}{a^{2}-1} \ \left[ (a+1) \ln\left( \cos\left(\frac{(1-a)x}{2}\right)\right) - (a-1) \ln\left( \cos\left(\frac{(1+a)x}{2}\right)\right) \right].
\end{align}
Now letting $a \rightarrow i a$ leads to
\begin{align}
I(ia) &= \frac{-1}{a^{2}+1} \ \left[ (1+ia) \ln\left( \cos\left(\frac{(1-ia)x}{2}\right)\right) + (1-ia) \ln\left( \cos\left(\frac{(1+ia)x}{2}\right)\right) \right] \\
&= \frac{-1}{a^{2}+1} \ \left[ \ln\left(\cos\left(\frac{(1-ia)x}{2}\right) \cos\left(\frac{(1+ia)x}{2}\right) \right) + ia \ \ln\left(\frac{\cos\left(\frac{(1-ia)x}{2}\right)}{\cos\left(\frac{(1+ia)x}{2}\right)}\right) \ \right] \\
I(ia) &= \frac{-1}{a^{2}+1} \ \left[ \ln\left(\frac{\cos(x) + \cosh(ax)}{2}\right) + ia \ 
\ln\left( \frac{1+i \tan(x/2) \tanh(ax/2)}{1-i \tan(x/2) \tanh(ax/2)}\right) \right].
\end{align}
The second term can be reduced as follows. It is known that
\begin{align}
x+iy = \sqrt{x^{2}+y^{2}} \ e^{i \tan^{-1}(y/x)} 
\end{align}
which helps lead to
\begin{align}
\ln(x+iy) = \frac{1}{2} \ \ln(x^{2}+y^{2}) + i \tan^{-1}(y/x).
\end{align}
From this result it is seen that
\begin{align}
\ln\left( \frac{1+i \tan(x/2) \tanh(ax/2)}{1-i \tan(x/2) \tanh(ax/2)}\right) = 2 i \ \tan^{-1}\left(\tan\left(\frac{x}{2}\right) \ \tanh^{-1}\left( \frac{ax}{2} \right) \right)
\end{align}
and now $I(ia)$ becomes
\begin{align}
I(ia) &= \frac{2a}{a^{2}+1} \ \tan^{-1}\left(\tan\left(\frac{x}{2}\right) \ \tanh^{-1}\left( \frac{ax}{2} \right) \right) - \frac{1}{a^{2}+1} \ \ln\left(\frac{\cos(x) + \cosh(ax)}{2}\right).
\end{align}
Hence the desired integral value is
\begin{align}
\int \frac{\sin(x) }{ \cos(x) + \cosh(ax) } \ dx = \frac{2a}{a^{2}+1} \ \tan^{-1}\left(\tan\left(\frac{x}{2}\right) \ \tanh^{-1}\left( \frac{ax}{2} \right) \right) - \frac{1}{a^{2}+1} \ \ln\left(\frac{\cos(x) + \cosh(ax)}{2}\right).
\end{align}
