Improper Integrals with the HP-15C LE & CE
|
11-14-2023, 04:13 PM
(This post was last modified: 11-14-2023 04:25 PM by Commie.)
Post: #21
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-14-2023 03:09 PM)Werner Wrote: That defines the function x/(sqrt(1)), which is just x. You can just use RTN then. My code defines 1/sqrt(x) and is strictly integrated between 0 and 1 and gives 2.0000 the answer. |
|||
11-14-2023, 04:45 PM
Post: #22
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-14-2023 04:13 PM)Commie Wrote:(11-14-2023 03:09 PM)Werner Wrote: That defines the function x/(sqrt(1)), which is just x. You can just use RTN then. It seems noboby (including me) can reproduce your result. Would you mind to do this little test: 10 ENTER GSB (the label you are using) and report the result? J-F |
|||
11-14-2023, 05:51 PM
Post: #23
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-14-2023 03:56 PM)Namir Wrote:(11-14-2023 03:09 PM)Werner Wrote: That defines the function x/(sqrt(1)), which is just x. You can just use RTN then. Hi Namir, yes I know, but he insists he's right.. so I thought I'd have a go at it, to no avail, it seems. Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
11-14-2023, 06:09 PM
Post: #24
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-14-2023 04:45 PM)J-F Garnier Wrote:(11-14-2023 04:13 PM)Commie Wrote: My code defines 1/sqrt(x) and is strictly integrated between 0 and 1 and gives 2.0000 the answer. Gives 10.0000 |
|||
11-14-2023, 06:26 PM
Post: #25
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
My apologies, I've checked the integration limits are indeed 0 to 1 which as Namir first stated he gets 0.5, this is indeed what I get now. My sincere apologies gents.
Because the lower integration limit is 0, I thought not to check the y, using the exchange key to force y to zero, I now get 0.5 as Namir first stated, so back to the drawing board. Cheers Darren |
|||
11-14-2023, 06:29 PM
Post: #26
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
Okay.. time to explain a little bit how the defining function used in integration (and solve, btw) works.
The integration routine calls the function to evaluate f(x). To that end, it fills the stack with the values of x - and your routine must produce f(x). Take your routine, I put the stack contents right next to it: X Y Z T LBL 10 x x x x 1 1 x x x SQRT 1 x x x / x x x x RTN There you are. As you demonstrated yourself as well, calling the routine with x=10, returns 10. So you essentially defined f(x)=x. That still doesn't solve your claim that, when integrating from 0 to 1, you obtain *2* instantly (you should get 0.5, as Namir said) If instead you take Namir's definition: X Y Z T LBL 10 x x x x 1/X 1/x x x x SQRT 1/sqrt(x) x x x RTN This is the proper way to define f(x)=1/sqrt(x). Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
11-14-2023, 06:52 PM
Post: #27
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
Using y^x instead of 1/x, where x=-0.5 gives 1.9999
Takes about 1 minute to complete. |
|||
11-14-2023, 07:49 PM
Post: #28
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
I just want to point out that the integral 1/sqrt(x) =2.sqrt(x)
It's easy to see that 2(sqrt(1)-sqrt(0))=2 exactly with a bit of thought before reaching for the hp15c ce. Cheers Darren |
|||
11-15-2023, 11:18 AM
Post: #29
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-13-2023 05:30 PM)Namir Wrote: intgeral of 1/sqrt(x) for x = 0 to 1 (exact is 2) Tried HP 15C CE at FIX 6. Solved in less than 3 hours. Result: 1,999999 Changing result to FIX 9: 1,999998943 How long it takes for FIX 9? |
|||
11-15-2023, 02:34 PM
Post: #30
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
I started calculating the integral of 1/sqrt(x) for x = 0 to 1 with the display setting FIX 9, after about three hours of operation the calculator turned off.
When turned on, the display shows 0,649347907 |
|||
11-15-2023, 10:14 PM
Post: #31
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-15-2023 11:18 AM)Voldemar Wrote:(11-13-2023 05:30 PM)Namir Wrote: intgeral of 1/sqrt(x) for x = 0 to 1 (exact is 2) I experinced similar delays the more digits the FIX command displayed. After several minutes I stopped the calculators so the batteries don't drain. |
|||
11-15-2023, 10:36 PM
Post: #32
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-15-2023 10:14 PM)Namir Wrote:(11-15-2023 11:18 AM)Voldemar Wrote: Tried HP 15C CE at FIX 6. Solved in less than 3 hours. Regarding batteries: I am still running with the original set since I got my test unit in April, despite some long program execution. Much better life than the LE, which lasted no more than 3 month and died without warning. |
|||
11-15-2023, 10:46 PM
Post: #33
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-15-2023 10:36 PM)Divasson Wrote:(11-15-2023 10:14 PM)Namir Wrote: I experinced similar delays the more digits the FIX command displayed. After several minutes I stopped the calculators so the batteries don't drain. Thank you! Good to know!! Namir |
|||
11-17-2023, 10:33 AM
(This post was last modified: 11-17-2023 11:05 AM by J-F Garnier.)
Post: #34
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-15-2023 11:18 AM)Voldemar Wrote:(11-13-2023 05:30 PM)Namir Wrote: intgeral of 1/sqrt(x) for x = 0 to 1 (exact is 2) Using the HP 15c emulator, which is an accurate 15c LE simulation (including the bugs) but about 500x faster °: FIX 5: 3s 1.99999 (1.999991771) FIX 6: 23s 1.999999 (1.999998943) FIX 7: 3min 1.9999997 (1.999999672) FIX 8: >3h w/o result So FIX 7 would take about one full day on the CE (several months on the original 15C !), Don't try to use FIX 8 and FIX 9, it will not end before months on the CE and will for sure just kill the batteries. It seems that the algorithm doesn't converge to the target accuracy, and never ends as discussed in this thread: Some questions about INTEG. BTW, the HP emulator for Windows, despite its age (2012) is probably the fastest existing Nut CPU emulator (I mean: true microcode simulation, not functional HP-15c simulation). I'm using it regularly and it's a bit surprising to me that it is not more widely used except by a handful of emulator-centric guys. Maybe one reason is that it is not so trivial to find it in hpcalc.org (you have to look deeply in the torrent section). It would deserve a more visible place. Note that I made (more than 10 years ago now) a 192-register version of it, that I released last year, leading to the 15c CE extended memory modes. J-F ° : using a single core of my Ryzen5 machine with Win11. |
|||
11-17-2023, 11:29 AM
Post: #35
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
Thank you for the timing results! They sure look like some sort of exponential rise in time as one increases the displayed fIX digits.
Namir |
|||
11-17-2023, 12:56 PM
Post: #36
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-17-2023 10:33 AM)J-F Garnier Wrote: So FIX 7 would take about one full day on the CE (several months on the original 15C !),Tried FIX 9 and FIX 7, in both attempts the calculator turned off after about 3 hours of operation. Is it the case that the calculator does not work for more than 3 hours? |
|||
11-17-2023, 01:07 PM
Post: #37
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-17-2023 12:56 PM)Voldemar Wrote:(11-17-2023 10:33 AM)J-F Garnier Wrote: So FIX 7 would take about one full day on the CE (several months on the original 15C !),Tried FIX 9 and FIX 7, in both attempts the calculator turned off after about 3 hours of operation. It's a special feature, not in the manual, which I call: "Move along with your life, there is no point at all to let this run any longer". If you really need this result, pick a better device to calculate it for you... but I am known to have little patience... --Bob Prosperi |
|||
11-17-2023, 01:24 PM
Post: #38
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE | |||
11-17-2023, 02:10 PM
(This post was last modified: 11-17-2023 02:31 PM by Chumango.)
Post: #39
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
I tried this with a 35S and after letting it crunch for a while I interrupted it so as to not chew up batteries. I did this with a DM41X connected to the USB and it took about 2 min 15 sec and gave 1.999870530 when set to Fix 4. On first try it took about 7 minutes, but I noticed after that the USB was not connected. The USB port is very finicky and the cord comes loose very easily (tested with another cord with the same results).
My 41C would probably take a very long time to do this. |
|||
11-17-2023, 02:58 PM
(This post was last modified: 11-17-2023 03:00 PM by J-F Garnier.)
Post: #40
|
|||
|
|||
RE: Improper Integrals with the HP-15C LE & CE
(11-17-2023 01:07 PM)rprosperi Wrote:(11-17-2023 12:56 PM)Voldemar Wrote: Tried FIX 9 and FIX 7, in both attempts the calculator turned off after about 3 hours of operation. In that case, which tool (in the HP calculator class) may numerically evaluate the integral with more than the 6 decimal places that the 15c CE can (slowly) provide ? J-F |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 4 Guest(s)