Problem with integral on WP 34s
|
09-08-2021, 01:43 AM
Post: #1
|
|||
|
|||
Problem with integral on WP 34s
Am I doing something wrong (quite possibly), or am I encountering a bug on the WP 34S?
The integral from -2 to 3 of 1/(3ROOT X) should equal ~.739 (My WP 34S comes up with 0). I used the following: LBL ‘F0’ FILL 3ROOT 1/X RTN I tried several other alternative programs, and they all produced “0”. |
|||
09-08-2021, 02:07 AM
Post: #2
|
|||
|
|||
RE: Problem with integral on WP 34s
What a strange. I type your program 'F0' on emulator and got 0.72406877411. My keystroke is this.
Code: (suppose you entered F0 program) S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX |
|||
09-08-2021, 03:48 AM
Post: #3
|
|||
|
|||
RE: Problem with integral on WP 34s
That is strange! I tried it on my iPad emulator, and on my DM 42 with the WP 34 loaded into the unit.
My iPad emulated is 34S 3.3T 3913 I’m running the program now on my HP 30b that was converted into a WP 34S, and the integral is taking a long time to converge (perhaps 25 minutes into the integration), and it may be converging on the correct answer. The DM 42, and the IPad 34S 3.3T 3913 quickly produce “0”. I will let the HP 30b converted unit continue to run a while longer. After it finishes (or I give up), I will check it’s version of the WP 34S software. |
|||
09-08-2021, 04:33 AM
Post: #4
|
|||
|
|||
RE: Problem with integral on WP 34s
My HP 30b WP 34S is version 3.3 3774. It gave up at the .724+ answer.
|
|||
09-08-2021, 04:35 AM
Post: #5
|
|||
|
|||
RE: Problem with integral on WP 34s
Curious as to if my WP 34S DM 42 and iPad versions do in fact, have a bug.
|
|||
09-08-2021, 05:50 AM
(This post was last modified: 09-08-2021 05:57 AM by toml_12953.)
Post: #6
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-08-2021 01:43 AM)lrdheat Wrote: Am I doing something wrong (quite possibly), or am I encountering a bug on the WP 34S? Is that 1/(x^(3/2)) ? If so, the answer is 1.387+1.139 i https://www.integral-calculator.com/ Tom L Cui bono? |
|||
09-08-2021, 06:12 AM
Post: #7
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-08-2021 04:35 AM)lrdheat Wrote: Curious as to if my WP 34S DM 42 and iPad versions do in fact, have a bug. I get 0 on the iPad but the correct value on the OSX emulator. The source code should be the same as far as I know (and I should know as I wrote them) but the firmware version is different. Unfortunately, I do not have the programming environment nor the time to debug it. |
|||
09-08-2021, 07:11 AM
Post: #8
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-08-2021 03:48 AM)lrdheat Wrote: That is strange! I tried it on my iPad emulator, and on my DM 42 with the WP 34 loaded into the unit. I used Windows emulator. (09-08-2021 05:50 AM)toml_12953 Wrote:(09-08-2021 01:43 AM)lrdheat Wrote: Am I doing something wrong (quite possibly), or am I encountering a bug on the WP 34S? I think it is 1/(x^(1/3)), Wolfram Alpha gives 4.31068-2.06209 i https://www.wolframalpha.com/input/?i2d=...om+-2+to+3 S.Korean / HP-50G | fx-570EX | fx-570CW | HP-200LX |
|||
09-08-2021, 11:28 AM
Post: #9
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-08-2021 06:12 AM)pascal_meheut Wrote: I get 0 on the iPad but the correct value on the OSX emulator. The source code should be the same as far as I know (and I should know as I wrote them) but the firmware version is different. There might not be a bug to debug. Most integration routine assumed no singularity within integral limits. (this is especially true for double-exponential integration, with sample points mostly on the edges) Convergence is based on previous estimate, not true result. (if we do know true result, there is no need to integrate ...) If we are lucky, "converged" result is close to true result. Unfortunately, we don't know how good the result really is. If not, routine may give up (thus the 0.0 result) We should break up integral to peices. In this case, surd(x,3) is odd function: ∫(1/surd(x,3), x=-2 .. +3) = ∫(x^(-1/3), x=+2 .. +3) = preval(x^(2/3)/(2/3), 2, 3) ≈ 0.7390 |
|||
09-08-2021, 11:49 AM
Post: #10
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-08-2021 07:11 AM)BINUBALL Wrote:(09-08-2021 03:48 AM)lrdheat Wrote: That is strange! I tried it on my iPad emulator, and on my DM 42 with the WP 34 loaded into the unit. "3 root" is the cube root but "3root" = x^(3/2) Tom L Cui bono? |
|||
09-08-2021, 02:03 PM
Post: #11
|
|||
|
|||
RE: Problem with integral on WP 34s
Doing the integral in parts is certainly a much better solution to a problem such as this!
|
|||
09-11-2021, 06:14 PM
Post: #12
|
|||
|
|||
RE: Problem with integral on WP 34s
More poor results, this with an endpoint. While the HP 30b unit converted to a WP 34S does fine, the WP 34S app for iPad produces an infinity error as does the WP 34S on the DM 42. Having the 1/0 occur at an endpoint precludes doing the integral in parts.
The integral from 0 to pi for 1/sqrt(1+cos(x)) (radian mode) should be 2*sqrt(2)~=2.8284 The HP 42S does fine as does the Free 42 app on my iPad. The iPad and DM 42 versions of WP 34S should be used with caution for these types of problems. |
|||
09-11-2021, 08:28 PM
Post: #13
|
|||
|
|||
RE: Problem with integral on WP 34s
Thanks to Albert Chan for pointing out my typo.
The integral is from 0 to pi of (sin (x))/sqrt (1+cos(x)). |
|||
09-12-2021, 04:00 PM
Post: #14
|
|||
|
|||
RE: Problem with integral on WP 34s
(09-11-2021 06:14 PM)lrdheat Wrote: More poor results, this with an endpoint. While the HP 30b unit converted to a WP 34S does fine, the WP 34S app for iPad produces an infinity error as does the WP 34S on the DM 42. Having the 1/0 occur at an endpoint precludes doing the integral in parts. Try setting Flag D - this allows for infinite or NAN results without halting program execution. Quoting from the integrate.wp34s xrom code file: Quote:// - if the user has set the D flag, many errors when evaluating theOn doing this, I get 2.8284 on my DM42 WP34S for your integral. Nigel (UK) |
|||
09-12-2021, 04:16 PM
Post: #15
|
|||
|
|||
RE: Problem with integral on WP 34s
A little more information: the integration routine was changed to the double exponential method in release 3893. To save people poking about in the code, here are the complete comments from the integration code file:
Quote:// Double Exponential Integration for the wp34s calculator Nigel (UK) |
|||
09-12-2021, 07:56 PM
Post: #16
|
|||
|
|||
RE: Problem with integral on WP 34s
Wow! Thanks, Nigel! That worked.
|
|||
09-12-2021, 08:10 PM
Post: #17
|
|||
|
|||
RE: Problem with integral on WP 34s
Nigel...is there any downside that I should be aware of with flag D set?
|
|||
09-12-2021, 08:41 PM
Post: #18
|
|||
|
|||
RE: Problem with integral on WP 34s
Glad it helped!
With flag D set, 1/0 is returned as infinity and the square root of -5 is NaN (when not using CPX). I don't think that this is a problem when working from the keyboard, but it does mean that a program that would be halted by an error will continue to run when Flag D is set. If a program's logic relies on it being halted by an error, this could be a problem. The first integral above \[\int_{-2}^3x^{-1/3}\,{\rm d}x\] still doesn't work properly even with Flag D set. The comments from the integration code state that Quote:the double exponential method relies on the function to beand so, with this integration method, the problem is unavoidable. The comments also suggest that the Romberg method might be better in this respect, but would in general be slower. Do you think it would be helpful to provide the old Romberg code as an alternative for situations like this? Nigel (UK) |
|||
09-12-2021, 08:53 PM
Post: #19
|
|||
|
|||
RE: Problem with integral on WP 34s
I do think that alternate methods would be great to have...unlikely I would imagine on the HP 30b due to limited space, but would be welcome on the DM 42 and iPad versions. How do I find the +Infinity/-infinity choices on the DM 42 version of WP 34S?
|
|||
09-12-2021, 09:28 PM
Post: #20
|
|||
|
|||
RE: Problem with integral on WP 34s
I have no control over the iPad version, but I'll look at adding the older Romberg method to the DM42.
To enter \(+\infty\) or \(-\infty\) on the DM42, do shift shift 5 to bring up the constants menu. Press up-arrow 3 or 4 times, and you'll find them. Nigel (UK) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)