Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Prime suggestions

391 views
Skip to first unread message

Wes

unread,
May 1, 2013, 3:53:14 PM5/1/13
to
Tim,

A couple of items for consideration.

-------------------------------------------------
I) As a PreCalc teacher, I was pleased to see that the 39gII had the secant, cosecant, and cotangent functions built-in. When it comes to the arccot(x) function, there are three possible definitions for the range.

1) (0,pi) (continuous, acot(0)=pi/2)
2) (-pi/2,0) U (0,pi/2) (discontinuous, acot(0) is undefined)
3) (-pi/2,0) U (0,pi/2] (discontinuous, acot(0) = pi/2)

You mentioned that the math library is the same as the 50g while the programming language is the same as the 39gII. The 50g does not have ACOT, but the 39gII uses definition #3.

Today I went through my collection of 21 PreCalc/Trig/Analysis books (mostly recent evaluation editions along with a few really old ones).
5 textbooks did not mention arccot(x) at all
1 textbook used #3 (copyright 1965)
1 textbook implied #2 (copyright 1964)
14 textbooks used #1

All three definitions are "valid," but #1 is by far the most commonly taught in high schools. If the ACOT code is not set in stone, you may want to consider changing the range so as to match what textbooks are showing and what teachers and students are used to seeing.

-------------------------------------------------
II) Numeric Integration.
> > 1) Will numeric integration use Romberg or Gauss-Kronrod?
> If done in the "numerical" part of the system, it is the same as the math library from the 50g.
> If being done in the CAS, Gauss-Kronrod is used I believe. Not 100% sure on that.

> There was a C version of the HP math library...

It seems a bit odd to have two different algorithms for numeric integration. If there are C versions of each, why not just call the superior Gauss-Kronrod code for both situations. Or if need be, default to Gauss-Kronrod but have a separate romberg() function available.

In AP-Calc, we often have to integrate functions with absolute values which typically have cusps. Cusps can really trip up Romberg integration. One AP test a few years ago had an integral that the 50g took 33 minutes to complete in the default STD mode, which is a real bummer on a 50 minute section with 17 questions. (Yes, you can use FIX, but I've never known a student with any brand calculator who ever bothered with the MODE digits settings.)

"For example, consider Gaussian quadrature. This method is widely regarded as 'best'... But that would have left no space in the HP-34C for anything else, so a different method had to be found." ~William M. Kahan (HEWLETT-PACKARD JOURNAL AUGUST 1980)

Romberg made sense in 1979 on the 34c, but today on machines with oodles of memory, it seems quite out of place. I can also see it adding to the confusion if a numeric integral takes a short time in one part of the system, but a much longer time in another part.

-------------------------------------------------

Thanks for listening,
-wes

Erwin Ried

unread,
May 2, 2013, 10:43:22 PM5/2/13
to
+1 for Gauss-Kronrod (or at least consistency between numeric and
symbolic integration)

And +1 for the new hp calculator! I was just testing/reviewing the TI
CAS CX against the *last* hp last week for my blog with a little
sadness hhahaha http://goo.gl/Sj6CT :( but now hp is back into the
graphical calculators market! Pretty sweet!

Wes

unread,
May 3, 2013, 10:12:39 AM5/3/13
to
> +1 for Gauss-Kronrod (or at least consistency between numeric and
> symbolic integration)

Just for clarification, I was not asking for consistency between numeric and symbolic integration. Those are two different animals.

I was referring to consistency between numeric integration in the "numeric" (calculator?) part of the system and numeric integration in the CAS part of the system.

-wes

Erwin Ried

unread,
May 3, 2013, 1:35:24 PM5/3/13
to
Yes I know. I am not sure about the internals of these 2 operations,
but I will love to see that in the new generation the numeric
integration gives the exact same result as the symbolic one after
replacing the numbers.

After calculus I,II and III, the only thing I can remember being most
painful thing to deal with the hp was integration and differential
equations. The slight differences in the results is not a problem by
itself but it is a problem when checking the final expression against
some numbers (due my bad memory remembering math techniques from
classes, I always tried to took common sense paths and the hp was
always like having a staff of helpers to try any hypothesis... so a
0.01 difference can really make you think you are wrong :D).

John H Meyers

unread,
May 3, 2013, 6:53:16 PM5/3/13
to
On 5/1/2013 2:53 PM, Wes wrote:

> In AP-Calc, we often have to integrate functions with absolute value
> which typically have cusps. Cusps can really trip up Romberg integration.

Anything that trips up approximation by polynomials
can really trip up these methods.

However, if you split up the domain so that "cusps"
are at the endpoints of each part, then add the results,
Romberg will do much better. Infinite endpoint arguments
are also best handled with a change of variable
to produce a finite-range equivalent.

In fact, Kahan's HP Romberg implementation has no difficulty
even with infinite function values at the endpoints
(provided that the result of integration remains finite);
how does GQ or G-K do with that?

> I've never known a student with any brand calculator
> who ever bothered with the MODE digits settings
> [which indirectly specifies when to stop iterating,
> based on reasonably expected error bounds]

Are they going to start bothering if G-K replaces Romberg?

> I will love to see that in the new generation, the numeric
> integration gives the exact same result as the symbolic one
> after replacing the numbers.

"Replacing the numbers" presumes that you can get a symbolic result
at all, and numeric methods were devised for situations in which
you can't do symbolic integration, but still need numeric answers,
with user-specifiable influence over execution time vs. precision.

The very idea of "exactly equal" also requires the very same lack of
specifying a more generous error tolerance. Kahan's original Romberg methods
seem to be very good at giving correct answers within specified
tolerances (and error bound estimates) to reasonable problems,
whenever exact answers are known, except when there appear to be
slight bugs in the numeric integration implementation,
which I believe I once proved to exist in HP34C and HP15C.

[r->] [OFF]

Wes

unread,
May 4, 2013, 6:26:27 AM5/4/13
to
On Saturday, May 4, 2013 1:53:16 AM UTC+3, John H Meyers wrote:
> Anything that trips up approximation by polynomials
> can really trip up these methods.
>
> However, if you split up the domain so that "cusps"
> are at the endpoints of each part, then add the results,
> Romberg will do much better. Infinite endpoint arguments
> are also best handled with a change of variable
> to produce a finite-range equivalent.

But if you don't manually split up the domain, Gauss-Kronrod still handles it fine. GK uses a "divide and conquer" approach. If the result is not accurate enough on one pass, it recursively subdivides the domain and the cusp quickly gets isolated. The extra evaluations are concentrated only around the cusp where they're needed.

When Romberg sees that the result is not accurate enough, it recalculates the whole domain to higher and higher precision everywhere, even where it's not really needed.

> In fact, Kahan's HP Romberg implementation has no difficulty
> even with infinite function values at the endpoints
> (provided that the result of integration remains finite);
> how does GQ or G-K do with that?

Likewise, they do not evaluation the endpoints.

> > I've never known a student with any brand calculator
> > who ever bothered with the MODE digits settings
> > [which indirectly specifies when to stop iterating,
> > based on reasonably expected error bounds]
>
> Are they going to start bothering if G-K replaces Romberg?

No, but it won't matter. Even the problematic function I mentioned earlier evaluates to all 12 digits in ~0.5 seconds using an hpgcc2 GK program. I assume the Prime would be faster yet. It would be a rare function that would take more than a couple of seconds.

-wes

Wes

unread,
May 5, 2013, 4:04:26 PM5/5/13
to
On Saturday, May 4, 2013 1:26:27 PM UTC+3, Wes wrote:
> It would be a rare function that would take more than a couple of seconds.

On second thought, I'd like to retract that last statement. :-)

There are lots of integrands that don't play nice with numeric methods. Something like the integral of sin(x)/x from 0 to infinity is bound to give fits to any numeric integration algorithm.

-wes

math7

unread,
May 16, 2013, 6:07:15 PM5/16/13
to
I would like to see that you could see two applications at the same time on the screen of the HP Prime, or a split in the screen that is adjustable as in the Nspire, this is a very good feature to consider it would see immediately as to change something in the application of statistical impact such change in the graph screen or vice versa. This also exists in the Casio Classpad
0 new messages