Is it possible for me to tell mathematica something is an integer?
like if I typed
Sin[n Pi]+Cos[n Pi]
it would tell me it equals 1 for even n and -1 for odd n?
This would really help me check my answers when trying to find Fourier Series (I am just learning them now)
Assuming[Element[n, Integers], Simplify[Cos[n Pi] + Sin[n Pi]]]ORSimplify[Cos[n Pi] + Sin[n Pi], Element[n, Integers]]– RunnyKine Feb 22 '14 at 20:14Simplify[Sin[n Pi] + Cos[n Pi], n ∈ Integers]. More details can be found here How to specify assumptions before evaluation?. – Artes Feb 22 '14 at 20:43