The Museum of HP Calculators

HP Forum Archive 18

 HP 50g a few questionsMessage #1 Posted by Jonathan Vogel on 25 Apr 2008, 6:47 p.m. Ok I have a couple questions about the HP 50g: 1) How can I solve ln(x)=x-2 Even in approx mode when I use "solvex" it returns "error: not reducible to a rational expression." How can I solve this without graphing? It is really a pain to graph with the 50g, so I have to bust out my ti-83 which isn't hard but I'd rather do it all on this calculator. 2) How can I find the area between two curves without setting up an integral? Like I want to find the area bounded by y=5sin(1/2x) and y=3 and y=0 ... But let's just say I was dumb and didn't know how to set up an integral to evaluate this. How can I graph these functions and calculate the area bounded between them? This would be rather useful for some things and to check integrals. Someone told me it was possible on the ti-89 so just wondering.

 Re: HP 50g a few questionsMessage #3 Posted by Karl Schneider on 26 Apr 2008, 3:33 p.m.,in response to message #1 by Jonathan Vogel Jonathan -- Quote: I have a couple questions about the HP 50g: 1) How can I solve ln(x)=x-2 Even in approx mode when I use "solvex" it returns "error: not reducible to a rational expression." How can I solve this without graphing? The error message, of course, results from algebraic intractability of the simple expression: There is no closed-form symbolic solution, so the answer must be obtained numerically. How to do that is the specific question you should be asking. I do not have an HP-50g, but I do have its predecessor HP-49G, which is almost identically organized. It gives the same error message when symbolic solution is attempted. The HP-49G and HP-50g have a numeric-solution menu "NUM.SLV", which provides an input form for providing an equation and a single numeric guess. The two solutions can be obtained separately as Hal suggested, with appropriate guesses. Not surprisingly, the "inflection point" of the input guess -- the dividing line for which result is provided -- is at or near x = 1, which is the root of the function's derivative. The techniques of max/min calculus show that f(1) = 1.00 is a local maximum. ```f(x) = ln(x) - (x-2) df/dx = 1/x - 1 = 0 -> x = 1 f(1) = ln(1) - (1-2) f(1) = 1 d2f/dx2 = -1/x2 d2f/dx2(1) = -1 ``` Quote: 2) How can I find the area between two curves without setting up an integral? At first I thought that this was a silly question, but again, your real query is how to obtain the correct result graphically on the HP-50g without a formal symbolic or numeric integration. Hal has provided an approach, but it seems to me like a replacement of fundamental mathematics with a sequence of procedures. The calculated "area" may or may not correspond with the visual area on the screen, because the scale of the axes might be quite different. Moving cursors isn't the best way to exactly specify numerical values, either. Hal stated, "I'm pretty sure it uses the same algorithm as the numerical integrator to do this." Maybe, maybe not. The simplest and quickest way to estimate the area is by basic quadrature -- Riemann sums of "sliver" rectangles -- using the already-calculated data points of the two curves (assuming that those were saved, but there's plenty of RAM for it). However, that's not the numerical-integration algorithm. Setting up an integral using the right-shifted (orange) integration function above "TAN" isn't too hard on the HP-50g: ```1 2 '3*X-2' 'X' ENTER (integral) ``` yields the correct result of 2.50 as the integral of f(x) = (3x-2).dx between 1.00 and 2.00. For the area between two curves, just define the integrand as the difference between the two functions, f(x) - g(x). There's also "INTVX" and "RISCH" for integration, underneath the "CALC" menu. It's more challenging to program a chained process of rootfinding and integration. The following archived thread concerned automated numerical solution as input to integration within a program -- using RPL-based calc's (like the HP-50g) versus using the earlier RPN-based calc's. ... and a subsequent follow-up: -- KS Edited: 27 Apr 2008, 4:01 p.m.

 Re: HP 50g a few questionsMessage #5 Posted by bt_schmidt on 27 Apr 2008, 7:39 p.m.,in response to message #4 by Jonathan Vogel Quote:I don't want to think when using a calculator... uh oh. ...bt PS. Don't you hate it when people quote out of context?

 Re: HP 50g a few questionsMessage #6 Posted by Jonathan Vogel on 27 Apr 2008, 8:45 p.m.,in response to message #5 by bt_schmidt Quote: uh oh. ...bt PS. Don't you hate it when people quote out of context? Huh?

 Re: HP 50g a few questionsMessage #7 Posted by Walter B on 28 Apr 2008, 2:12 a.m.,in response to message #6 by Jonathan Vogel Quote: Quote: Quote:I don't want to think when using a calculator... uh oh. ...bt PS. Don't you hate it when people quote out of context? Huh? Jonathan, are you sure you want to think when reading? d;)

 A few things, Jonathan... (HP 50g a few questions)Message #8 Posted by Karl Schneider on 27 Apr 2008, 10:33 p.m.,in response to message #4 by Jonathan Vogel This Forum is primarily intended as a place for discussion, not as a "quick free help" message board. (Have you tried comp.sys.hp48?) From the tell-tale careless and conversational manner in which you have phrased your questions and stated your replies, I would assume that you are a high-school student or college undergrad. Most of us here are middle-aged technical professionals. Two of us have graciously addressed your questions; I'm really not quite sure how to characterize your response -- Quote: Ok I have a couple questions Like I want to find the area bounded by y=5sin(1/2x) and y=3 and y=0 ... (????) How can I find the area between two curves without setting up an integral? ... But let's just say I was dumb and didn't know how to set up an integral to evaluate this. ... it still took me 15 minutes to actually figure out what you meant. That could have to do with my intelligence, your explanation, or the 50g's user friendliness. This alone proves my point. A 10 year old can easily graph on the TI-83. Try to do your method and compare it to the (actual) answer because I would get like .97 and the actual answer would be 1.93. ... Also Karl, I asked to find the area between two curves using the graphing utility to check my answers. I know how to do it using calculus (integrating) and I am pretty darn familiar with the standard integrating capabilities of the calculator but thanks for mentioning that. Now let me ask something else based on your last two links you sent me. No one owes you any assistance, so you ought to be more courteous in your requests. Here's another link, which contains some pearls of wisdom: Quote: How can I find the area between two curves without setting up an integral? ... But let's just say I was dumb and didn't know how to set up an integral to evaluate this. Until I read between the lines, the basic response that came to mind was along the lines of, "Hypothetically speaking, you should RTFM, and learn how to do it. This is fundamental mathematics." Quote: I want to find the area bounded by y=5sin(1/2x) and y=3 and y=0 ... Are you sure that you stated this correctly? What are the limits of x? Are you interested in the positive values of the function that are less than 3? Did you really mean "(1/2x)" -- which becomes (positive or negative) infinite as x approaches zero, and can make for a nasty integral that would be difficult to estimate by graphical methods? Or did you mean "(x/2)"? How exactly should Hal (or I or anyone else, for that matter) obtain your "actual" answer? The bottom line is, you really ought to invest more in thought, effort, and time to proofread before posting questions that will require time and effort from others to answer. As you might have gathered from the two archived links of 2004, I'm neither an expert about, nor an enthusiast of RPL-based (HP-28/48/49/50) calc's. I also find them difficult to use. I prefer the old, classic RPN-based models (e.g., HP-15C/42S/32SII). Now, as for your other questions: 1. How can I solve ln(x)=x-2 I'm having the same difficulties on the HP-49G. "SOLVE" or "SOLVEVX" are designed to find symbolic solutions, for which none exist in this problem. Setting flags -03 (numerical result) and -105 (approximate mode) only seemed to force their changing to the appropriate settings for symbolic solutions. These functions can find roots for polynomials, even when the symbolic solutions would be quite complicated (e.g., cubic and quartic). The key here might be "rational", as any polynomial can be factored into linear and quadratic terms (although the quadratic terms might not have any real-valued roots). A numeric-solution stack-based alternative to "NUM.SLV" is "ROOT" ```'LN(X)=X-2' 'X' 0.5 ROOT 'LN(X)=X-2' 'X' 1.5 ROOT ``` yield the two answers. If "SOLVEVX" fails, you can put 'X' and a random "guess" value onto the stack, and you will likely get a numeric answer. (Curiously, "ROOT" is missing from the HP-49G manual, although both the HP-48G and HP-49G have it.) The "guess" is used to direct the rootfinder toward the value you seek. There might be other roots that you don't want, or local minima/maxima that may foil the solver. If there is only one root in a monotonic function, the solver will find it, no matter what guess is provided. Rest assured that the solver algorithm (TI's or HP's) will use some guess to start the process... Quote: Is there a 50g program that will calculate the area between two curves based on the equations in stack 1 and 2? If you understand what's going on in the RPL program listed in my second link, that's a good template for a simpler one that will accomplish that. There are RPL experts here who could surely spoon-feed to you what you seek, but that's strictly their prerogative to do so... -- KS Edited: 28 Apr 2008, 2:44 a.m.

 Re: A few things, Jonathan... (HP 50g a few questions)Message #9 Posted by Jonathan Vogel on 28 Apr 2008, 6:47 p.m.,in response to message #8 by Karl Schneider I'm sorry I acted so rude. Honestly, there are no other forums that discuss HP calculators so this was basically my only choice. I also wasn't aware that this forum was for discussion only. As well... the user base for the 50g is so small that I can barely find ANYTHING when I research its features. I usually just stick with the 800 page manual. Since you guess don't enjoy me bothering you over petty things, can you guys suggest a place where I can ask questions like this? Again I apologize that I came off rude.

 Re: A few things, Jonathan... (HP 50g a few questions)Message #10 Posted by George Bailey (Bedford Falls) on 29 Apr 2008, 12:46 a.m.,in response to message #9 by Jonathan Vogel Quote: Since you guess don't enjoy me bothering you over petty things, can you guys suggest a place where I can ask questions like this? Again I apologize that I came off rude. This IS the right place for questions like yours. And you already worked on that rude thing, didn't you? ;-) In my opinion it was only a mild case anyway... Cheers, George Bailey