Hi All,
I am having trouble here getting Mathematica to Integrate a simple function where inside the cosine function, n is just a simple integer.
Here is what I have tried.
Integrate[Exp[a*x]*Cos[n*x], {x, -\[Pi], \[Pi]}, Assumptions -> n \[Element] Integers]
and I get out
(2 (n Cosh[a \[Pi]] Sin[n \[Pi]] + a Cos[n \[Pi]] Sinh[a \[Pi]]))/(a^2 + n^2)
But since n is an integer, the Sin(n [Pi]) term should be zero but for some reason I cannot get Mathematica to go there. It is like it is ignoring the Assumption that n are Integers.
Anyone know what I am doing wrong? Thanks in advance :)