# How to integrate with integer parameter in Mathematica?

I would like to integrate the following expression with N being Integer

Integrate[(1 + Cos[f (1 + 2 n) \[Pi]])/(1 + Cos[f \[Pi]]), {f, 3, 10},
{Element[n, Integers]}]


Unfortunately the line above does not make sense in the interpreter.

• Could you write exactly what is your domain, because first N is reserved to Numerical evaluation and there is no N in the function. May 24, 2016 at 17:51
• a = 1; b = 2; c = 10; FullSimplify[Integrate[(a + Cos[f (a + b c) [Pi]])/(a + Cos[f [Pi]]), {f, 3, 10}], Element[{a, b, c}, Integers]]
– user9660
May 24, 2016 at 18:04
• @Anonymous please verify the edit I made is correct. With the fix it (Incorrectly I think) reports that it does not converge. May 24, 2016 at 18:24

Define k[n] as a listable function :

SetAttributes[k, Listable]
k[n_] := \!$$\*SubsuperscriptBox[\(\[Integral]$$, $$3$$, $$10$$]$$\*FractionBox[\(1 + Cos[f\ \((1 + 2\ n\ )$$\ \[Pi]]\), $$1 + Cos[f\ \[Pi]]$$] \[DifferentialD]f\)\)


then define a list compose of integer of the desired Length --- say 10

nn = Range[10]


k[nn]

• then run FindSequenceFunction on the result.. May 24, 2016 at 19:13