cancel
Showing results for 
Search instead for 
Did you mean: 
Michael178
Level 2
16 9 0 0
Message 1 of 4
669
Flag Post

Weird results using HP Prime calculator "lim" function

HP Recommended
HP Prime calculator
Other

Both the HP Prime handheld version G2 and an earlier version, when I try to calculate, on the Home screen & using the "lim" (limit) math template function, the lim as E goes to 0 of the integral from E to 1 of sin(1/x)dx, the calculator returns, after pressing Enter, something I don't understand: not a real number, but rather the integral from 0 to 1 of "sin(1/taylorx8)dtaylorx8" or "x12" or "...", successively (using the G2), or the same except with "taylorx6415" or"x6417" or"...", successively, using the earlier Prime. When I use the "approx" function (the shifted Enter key) with the same lim of the integral, both calculators return [0.504754156791 0.504066783923]. The correct value for the limit is the same as the integral from 0 to 1 of the integrand, which is 0.504067061906..., which Mathematica on my computer gives for both the limit and the integral from 0 to 1, and which various handheld calculators that I own, such as the two Primes and, using a very small value such as 0.001 for the lower limit of integration, others give approximately (different for different calculators). (My calculators other than the Prime won't return a value using 0 as the lower limit of integration, and don't have a "lim" function.) When I try to use the "approx" function with the integral from 0 to 1 of "sin(1/taylorx8...", or "sin/taylorx6415", the first mentioned results, I get an "Error:Syntax Error" on both Prime calculators. What is going on?

3 REPLIES 3
Joe_Horn
Level 8
650 635 124 222
Message 2 of 4
Flag Post
HP Recommended

I'm not sure that this answers your question, but SIN(1/X) is a notoriously nasty curve.  Using Prime's Function app's "Signed Area" (in the Plot / Fcn menu), you can see that the desired integral fluctuates wildly, getting worse as you approach zero:

 

signed-area

 

My guess is that you are running up against the accuracy limitations of each platform.  Prime's Home calculations are limited to 12 digit BCD mantissas.  Prime's CAS calculations are limited to 48-bit binary mantissas.  Mathematica's accuracy is user-adjustable.

 

Disclaimer: I do not work for HP. I'm just another happy HP calculator user.

-Joe-
Was this reply helpful? Yes No
Michael178
Author
Level 2
16 9 0 0
Message 3 of 4
Flag Post
HP Recommended

I knew that sin(1/x) fluctuated wildly as x goes to 0; that's why I chose it to check the Prime's "lim" function. (It's the function sin(1/x) which fluctuates between 1 & -1, and is in fact discontinuous at 0. The integral of sin(1/x) between any point a and another point y fluctuates correspondingly as y goes to 0, but the fluctuations decrease in amplitude to 0 as y approaches 0, since the period of sin(1/x) decreases to 0 as x goes to 0, so the integral is in fact continuous at y = 0.) What I mostly wanted to know was why the lim function doesn't get the limit of the integral between y and 1 of sin(1/x) as y approaches 0 to be the same as the "Signed area" and simple integration functions do, and even more what the "taylorx6427" in this screenshot is:

 

                                               Michael178_1-1602469357976.png

 

It doesn't seem to have anything to do with Taylor series.

(How did you get such a clear photo as you have in your post? Mine is fuzzy. I used HP Connectivity Kit to view the Prime screen on my computer, took and pasted a screenshot of it onto my computer, then just now magnified it, took another screenshot of it, and pasted it here. You had a better way- maybe fewer copy & pastes?)

 

I have discovered another case in which the "lim" function on the Prime works oddly, this time involving the integral of Sec(x) (the trigonometric Secant function) from y to 1 as y goes to 0. This is even stranger, since Sec(x) doesn't oscillate or otherwise behave badly in the interval [0,1]. It is singular only at + or - pi/2. Maybe I will post a question about this.

 

Michael

Was this reply helpful? Yes No
Joe_Horn
Level 8
650 635 124 222
Message 4 of 4
Flag Post
HP Recommended

Just a quick note regarding how to get perfect screen shots using the Prime Connectivity Kit. Never use your computer's own "screen capture" function. Use instead the "Get screen capture" function that's built into the Connectivity Kit:

 

(1) Right-click on your Prime's name (in the Calculators column on the left).

(2) Select "Get screen capture" from the popup menu.

(3) Create the desired display in your Prime.

(4) In the Screen Capture window, click the "Refresh" button.

(5) Click the "Save as..." button.

(6) Repeat steps 3 through 5 as desired.

 

Alternative: The Virtual Prime (emulator) has its own Screen Capture function which works directly and doesn't require you to run the Connectivity Kit.

-Joe-
Was this reply helpful? Yes No
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation