1
$\begingroup$

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.

$\endgroup$
3
  • 3
    $\begingroup$ Could you write exactly what is your domain, because first N is reserved to Numerical evaluation and there is no N in the function. $\endgroup$ Commented May 24, 2016 at 17:51
  • $\begingroup$ 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]] $\endgroup$
    – user9660
    Commented May 24, 2016 at 18:04
  • $\begingroup$ @Anonymous please verify the edit I made is correct. With the fix it (Incorrectly I think) reports that it does not converge. $\endgroup$
    – george2079
    Commented May 24, 2016 at 18:24

1 Answer 1

4
$\begingroup$

Here is a simple answer

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]

ask for

k[nn]

On my computer it takes a little more than 25s.

$\endgroup$
1
  • $\begingroup$ then run FindSequenceFunction on the result.. $\endgroup$
    – george2079
    Commented May 24, 2016 at 19:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.