1
$\begingroup$

Let $f(x) = x^2+1$. I would like to compute the limit $$ \lim_{k \to +\infty} k \int_0^1 \sin \left [ \left ( k + \frac{1}{2} \right ) \pi x \right ] f(x) \, \mathrm d x. $$

Then I use the command

Limit[Integrate[k * Sin[( k + 1 / 2) * Pi * x] * (x^2 + 1), {x, 0, 1}], k -> Infinity]

Mathematica returns Indeterminate

enter image description here

Could you explain how to get the explicit limit? Thank you so much for your help!

$\endgroup$
9
  • $\begingroup$ @Nasser I have corrected the code. It is strange to me because the limit seems to be $1 / \pi$. I have verified it by computing the integral for big values of $k$. $\endgroup$
    – Akira
    Commented Dec 10, 2023 at 10:15
  • $\begingroup$ You are right, it should be 1/pi !Mathematica graphics $\endgroup$
    – Nasser
    Commented Dec 10, 2023 at 10:24
  • 1
    $\begingroup$ The limit does not exists because it oscillates around 1/pi with no decreasing amplitude of oscillations so Mathematica is right. $\endgroup$ Commented Dec 10, 2023 at 10:28
  • $\begingroup$ @azerbajdzan I actually proved that the limit exists in this thread. I just want to confirm it with Mathematica. $\endgroup$
    – Akira
    Commented Dec 10, 2023 at 10:29
  • $\begingroup$ @Akira: So then your proof is wrong. $\endgroup$ Commented Dec 10, 2023 at 10:31

2 Answers 2

5
$\begingroup$
DiscreteLimit[k Integrate[Sin[(k + 1/2)*Pi*x]*(x^2 + 1), {x, 0, 1}], 
 k -> Infinity]

1/π

Also,

Series[Integrate[k Sin[(k + 1/2)*Pi*x]*(x^2 + 1), {x, 0, 1}], {k, 
   Infinity, 0}] // Normal

gives almost the answer

1/π + (2 Sin[k π])/π

Edit: From the documentation we read

DiscreteLimit is also known as discrete limit or limit over the integers.

which is my understanding of the basic difference between this and Limit

Edit 2: Thanks to @BobHanlon

The corresponding Series to the DiscreteLimit is given by

Series[Integrate[k Sin[(k + 1/2)*Pi*x]*(x^2 + 1), {x, 0, 1}], {k, Infinity, 0}, Assumptions -> k ∈ PositiveIntegers] // Normal

and evaluates to the expected result.

$\endgroup$
9
  • 1
    $\begingroup$ Voila, this subtlety is important. Thank you so much for your help! $\endgroup$
    – Akira
    Commented Dec 10, 2023 at 10:33
  • 1
    $\begingroup$ This is not a good answer to this question because OP do not ask for limit over integers and your answer makes an impression that the limit over reals is same as over integers. But the limit over reals does not exist while over integers exists in this case. $\endgroup$ Commented Dec 10, 2023 at 10:36
  • 1
    $\begingroup$ @azerbajdzan Some people should focus their efforts on READING carefully what is written in the reply. According to the timestamps I already had added my edit. Hence, it is very clear that DiscreteLimit is taken over the integers. It is, also, very clear that this differentiates DiscreteLimit from Limit. Thanks for your comment. It was not a good one. $\endgroup$
    – bmf
    Commented Dec 10, 2023 at 10:42
  • 1
    $\begingroup$ @Akira glad I was able to help :-) $\endgroup$
    – bmf
    Commented Dec 10, 2023 at 10:44
  • 1
    $\begingroup$ Since you are looking at the DiscreteLimit, the corresponding Series is Series[Integrate[k Sin[(k + 1/2)*Pi*x]*(x^2 + 1), {x, 0, 1}], {k, Infinity, 0}, Assumptions -> k \[Element] PositiveIntegers] // Normal which evaluates to the expected 1/Pi $\endgroup$
    – Bob Hanlon
    Commented Dec 10, 2023 at 18:09
2
$\begingroup$

No need to only consider Element[k,Integers]

Integrate[k Sin[(k + 1/2)*Pi*x]*(x^2 + 1), {x, 0, 1}] 
Asymptotic[%, k -> Infinity]// Collect[#, k] &
  

$\frac{2 \sin (\pi k)}{\pi }+\frac{-\frac{\sin (\pi k)}{\pi }+\frac{2 \cos(\pi k)}{\pi ^2}-\frac{1}{2 \pi}}{k}+\frac{1}{\pi }$

$\endgroup$
2
  • $\begingroup$ While this is the asymptotic behavior, it is not a limit. Taking the Limit of this result gives Indeterminate and taking the DiscreteLimit gives 1/Pi $\endgroup$
    – Bob Hanlon
    Commented Dec 10, 2023 at 18:27
  • $\begingroup$ @BobHanlon For k->Infinity we get 1/Pi+2 Sin[Pi k]/Pi which is indead Indeterminate! Restriction Element[k,Integers] gives the correct result 1/Pi! $\endgroup$ Commented Dec 10, 2023 at 21:28

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.