Is Mathematica able to accurately graph this function at such a small domain?

  • Context: Undergrad 
  • Thread starter Thread starter Orion1
  • Start date Start date
  • Tags Tags
    Limits Theoretical
Click For Summary

Discussion Overview

The discussion centers around the limit of the function \(\sin \frac{\pi}{x}\) as \(x\) approaches 0, particularly whether the limit exists or if it can be described as an interval. Participants explore implications of this limit in the context of calculus education and computational tools like Mathematica.

Discussion Character

  • Debate/contested
  • Mathematical reasoning
  • Technical explanation

Main Points Raised

  • Some participants assert that \(\lim_{x \rightarrow 0} \sin \frac{\pi}{x}\) does not exist due to the oscillatory nature of the function.
  • Others propose that the limit can be described as the interval \([-1, 1]\), suggesting that while the limit does not exist in the traditional sense, the function takes on all values in that range as \(x\) approaches 0.
  • A participant mentions that "independent research" likely refers to using software like Mathematica or Maple, which may return an interval rather than a single limit value.
  • Some participants provide calculations indicating that \(\lim_{x \rightarrow 0^+} \sin \frac{\pi}{x} = 1\) and \(\lim_{x \rightarrow 0^-} \sin \frac{\pi}{x} = -1\), reinforcing the idea that the limit does not exist.
  • Another participant discusses the concept of subsequential limits, stating that any number between -1 and 1 can be approached by sequences converging to 0, further supporting the claim that the limit does not exist.
  • Concerns are raised about the limitations of numerical methods and computational tools when evaluating limits at very small domains, suggesting potential machine or processor limitations affecting the results.

Areas of Agreement / Disagreement

Participants generally disagree on whether the limit exists, with some asserting it does not exist and others suggesting it can be described as an interval. The discussion remains unresolved with multiple competing views present.

Contextual Notes

Participants note that the limit's behavior is influenced by the oscillatory nature of the sine function, and there are discussions about the implications of using computational tools for evaluating limits. There are also references to the precision limitations of numerical methods.

Who May Find This Useful

Readers interested in calculus, mathematical limits, the behavior of oscillatory functions, and the use of computational tools in mathematical analysis may find this discussion relevant.

Orion1
Messages
961
Reaction score
3

My calculus book describes the following example:

Equation:
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{does not exist}[/tex]

However, my independent research indicates that it is actually:
Equation:
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{Interval}(-1,1)[/tex]

Is this second solution only theoretical, and not a real valid solution in a Calculus I course?
[/Color]
 
Physics news on Phys.org
Orion1 said:
My calculus book describes the following example:
Equation:
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{does not exist}[/tex]
However, my independent research indicates that it is actually:
Equation:
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{Interval}(-1,1)[/tex]
Is this second solution only theoretical, and not a real valid solution in a Calculus I course?
[/Color]

That's the thing as x approcahes zero the value of this function continually oscillates between -1 and 1 therefore the limit does not exist.
 
Like d_leet said for a limit to have a value L

[tex]\lim_{x \rightarrow a} f(x) = L[/tex]

then

[tex]\lim_{x \rightarrow -a} f(x) = \lim_{x \rightarrow +a} f(x) = L[/tex]

In the case of that function, it oscilates.
 
Orion1 said:
\
However, my independent research indicates that it is actually:
Equation:

[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{Interval}(-1,1)[/tex]
Is this second solution only theoretical, and not a real valid solution in a Calculus I course?

I will hazard a guess that "independent research" means typing it into a program like Maple or Mathematica. You should have a look at the documentation provided by these programs as to what this actually means. From maple:

"If limit returns a numeric range it means that the value of the limiting expression is known to lie in that range for arguments restricted to some neighborhood of the limit point. It does not necessarily imply that the limiting expression is known to achieve every value infinitely often in this range."
 
Orion1 said:
However, my independent research indicates that it is actually:
Equation:
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{Interval}(-1,1)[/tex]
Is this second solution only theoretical, and not a real valid solution in a Calculus I course?
[/Color]
What 'research' led you to conclude that ??

Perhaps you meant to say:
[tex]\forall \varepsilon > 0,\bigcup\limits_{\left| x \right| < \varepsilon } {\left\{ {\sin \frac{\pi }<br /> {x}} \right\}} = \left[ { - 1,1} \right][/tex]
where [itex]x \ne 0[/itex] (an undefined element?)
 
Last edited:


I performed some calculations on this function and produced the following results:

[tex]\lim_{x \rightarrow 0^+} \sin \frac{\pi}{x} = 1[/tex]
[tex]\lim_{x \rightarrow 0^-} \sin \frac{\pi}{x} = -1[/tex]
[tex]\boxed{\lim_{x \rightarrow 0^{\pm}} \sin \frac{\pi}{x} = \pm 1}[/tex]
[/Color]
 
Last edited:
Orion1 said:
I performed some calculations on this function and produced the following results:
[tex]\lim_{x \rightarrow 0^+} \sin \frac{\pi}{x} = 1[/tex]
[tex]\lim_{x \rightarrow 0^-} \sin \frac{\pi}{x} = -1[/tex]
[tex]\boxed{\lim_{x \rightarrow 0^{\pm}} \sin \frac{\pi}{x} = \pm 1}[/tex]
[/Color]

Perhaps you would be kind enough to show us your calcuations. :)
 
[tex]\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{Interval}(-1,1)[/tex]
That is incorrect.

It is true that [-1, 1] is the set of limit points of this function as x goes to 0, but the limit of a function is defined to be its only limit point. Since this function does not have a single limit point (it has many), the limit does not exist.
 
Your independent research seems to have involved faulty arithmetic.

As Hurkyl said, [-1,1] is the set of limit points. I myself would have said "subsequential limits": given any number, X, between -1 and 1, it is possible to choose a sequence, {xn}, converging to 0, such that the sequence [itex]{sin(\frac{\pi}{x_n})}[/itex] converges to X. However, saying that is exactly saying that the limit of the function itself does not exist.
 
Last edited by a moderator:
  • #10
Calculus Calculations...

Tide said:
Perhaps you would be kind enough to show us your calcuations. :)


Mathematica:
[tex]\text{In[1] := Limit} \left[ \sin \left[ \frac{\pi}{x} \right], x \rightarrow 0 \right][/tex]

[tex]\text{Out[1] = Interval[{-1,1}]}[/tex]

[tex]\boxed{\forall \varepsilon > 0,\bigcup\limits_{\left| x \right| < \varepsilon } {\left\{ {\sin \frac{\pi }{x}} \right\}} = \left[ { - 1,1} \right] \; \; x \ne 0}[/tex]

Basic Source Code:
Code:
ST = 0.00001!

For X1 = 1 To 0 Step -ST
Y1 = Sin(PI / X1)
Next X1

For X2 = -1 To 0 Step ST
Y2 = Sin(PI / X2)
Next X2

Results:
[tex]\begin{array}{|c|c|} S_T & Y_1 \\ \hline 0.01 & 0.275 \\ 0.001 & 0.562 \\ 0.0001 & 0.832 \\ 0.00001 & 0.956 \\ \hline \end{array}[/tex]

[tex]\begin{array}{|c|c|} S_T & Y_2 \\ \hline 0.01 & -0.275 \\ 0.001 & -0.562 \\ 0.0001 & -0.832 \\ 0.00001 & -0.956 \\ \hline \end{array}[/tex]

[tex]\boxed{\lim_{x \rightarrow 0^{\pm}} \sin \frac{\pi}{x} = \pm 1}[/tex]

[tex]\boxed{\lim_{x \rightarrow 0} \sin \frac{\pi}{x} = \text{does not exist}}[/tex]
[/Color]
 
Last edited:
  • #11
Thanks, Orion.

Others have already explained the problem with Mathematica.

Your problem with BASIC is that none of your FOR loops ever hits the desired values of x1 = 0 or x2 = 0. The first clue is that your program didn't crash - i.e. you would have gotten a "division by zero" message. You are working with single precision numbers (which, by the way, according to the IEEE standard maintains only 6 digits of mantissa, i.e. significant digits).

By repeatedly subtracting ST from 1 (for small ST) the binary roundoff error never gets you to exactly zero so the compiler (interpreter?) uses the last value of x! which is nonnegative (in the case of X1 and conversely for X2). You just happened to get values that APPEAR to be getting closer to 1.0 but in reality that is completely fortuitous. Try a few smaller values for ST and your compiler will go bonkers (that's a technical term!) ;)

The correct answer to your original problem is that the limit simply does not exist - whether you approach it from the right or from the left. As others have already indicated, as you approach x = 0 the function will take on any of the values between -1 and +1 but the limit does not exist.
 
  • #12
Orion:
In order to convince you of what others have said, consider a sequence of number [itex]x_{k}=\frac{\pi}{\theta+2k\pi}[/tex], where [itex]\theta[/itex] is some fixed number.<br /> <br /> This sequence converges to 0 as k grows.<br /> Form another sequence [itex]y_{k}[/itex] as follows:<br /> [itex]y_{k}=\sin(\frac{\pi}{x_{k}}[/tex]<br /> As is readily found, we have for all k, [itex]y_{k}=\sin\theta[/itex].<br /> <br /> Consider why this shows that the limit of your function cannot exist at 0, and why it proves that the set of limit points must be the interval [-1,1][/itex][/itex]
 
  • #13
One more thing, if you're looking at [tex]\lim_{x\rightarrow 0}f(x)[/tex] for example, it is not sufficient to look at f evaluated along some sequence approaching 0. e.g. if you punch f(1), f(.1), f(.01), f(.001), ..., f(10^(-n)), even if it "looks like" this sequence is converging to L say, you HAVE NOT just proven [tex]\lim_{x\rightarrow 0}f(x)=L[/tex]. They like to put tables of these sorts of evaluations in first year calculus texts, but this is not at all a rigorous approach and can lead to terribly misleading and just plain wrong results.
 
  • #14
Limits...



I understand. However, what happens to this function when plotted by Mathematica at a domain of around +,- 5*10^-19?

The function itself appears to 'shut down' at around +,- 3.41*10^-19.

Is this a machine language or processor limitation? :eek:

Mathematica:
[tex]\text{Plot} \left[\sin \left[ \frac{\pi}{x} \right], {x,-1,1} \right][/tex]

[tex]\text{Plot} \left[\sin \left[ \frac{\pi}{x} \right], {x,-5*10^{-19}, 5*10^{-19}} \right][/tex]

The Mathematica plots from these commands are attached.
[/Color]
 

Attachments

  • 001.jpg
    001.jpg
    8.6 KB · Views: 469
  • 002.jpg
    002.jpg
    6.9 KB · Views: 486
Last edited:
  • #15
Orion1 said:
I understand. However, what happens to this function when plotted by Mathematica at a domain of around +,- 5*10^-19?
The function itself appears to 'shut down' at around +,- 3.41*10^-19.
Is this a machine language or processor limitation? :eek:
Mathematica:
[tex]\text{Plot} \left[\sin \left[ \frac{\pi}{x} \right], {x,-1,1} \right][/tex]
[tex]\text{Plot} \left[\sin \left[ \frac{\pi}{x} \right], {x,-5*10^{-19}, 5*10^{-19}} \right][/tex]
The Mathematica plots from these commands are attached.
[/Color]
Well do remember that everything has its computational limits, though when I ran that on Mathematica it didn't result in the same problem.
 
  • #16
Orion1 said:
I understand. However, what happens to this function when plotted by Mathematica at a domain of around +,- 5*10^-19?

The function itself appears to 'shut down' at around +,- 3.41*10^-19.

Mathematica is a computational tool, it usually can't help you deal with situations like this (in this case, a function that oscillates arbitrarily quickly by getting sufficiently close to zero) in a reasonable manner, because it is run on a machine in the physical, discrete, world. Frankly, in this case the software (or your processor) probably includes a feature specifically designed to stop your computer from generating an error!
 

Similar threads

  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K