I meet some difficulties when trying to compute this limit,
Limit[1/n*Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}], n -> Infinity,Assumptions -> n \[Element] Integers]
The output is,
Limit::cas: Warning: Contradictory assumption(s) (n\[Element]Integers&&(Re[n]<=1/2||n\[NotElement]Reals))&&n>4096 encountered. >>
The limit is finite though.
Answer
Break it up:
int = Assuming[Element[n, Integers],
Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}]]
(* (n*Pi)/2 *)
now
Limit[1/n*int, n -> Infinity]
(* Pi/2 *)
You do not even need limit.
(1/n)*int
(* Pi/2 *)
To do it as you did, you need to put the Assuming
first, so it covers the integral part, like this
Assuming[Element[n, Integers],
Limit[1/n*Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}],n -> Infinity]]
(* Pi/2 *)
What you had is this:
Limit[1/n*Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}],
n -> Infinity,Assumptions -> n \[Element] Integers]
So, the Integrate
part never knew that n
was an integer ! This is important. Since without this information, integrate will generate an answer this like this:
int = Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}]
(* 1/2 (-ArcTan[2] + ArcTan[2 (1 + Tan[n Pi])]) *)
Assuming[Element[n, Integers], Limit[1/n*int, n -> Infinity]]
(* 0 *)
Compare the result on Integrate
when it sees the assumption on n
being integer:
Assuming[Element[n, Integers], Integrate[1/(Cos[x]^2 + 4 Sin[2 x] + 4), {x, 0, Pi*n}]]
(* (n Pi)/2 *)
big difference
1/2 (-ArcTan[2] + ArcTan[2 (1 + Tan[n Pi])])
vs
(n Pi)/2
Comments
Post a Comment