HP 50g a few questions « Next Oldest | Next Newest »

 ▼ Jonathan Vogel Junior Member Posts: 5 Threads: 2 Joined: Mar 2008 04-25-2008, 06:47 PM 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. ▼ Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 04-26-2008, 11:30 AM Hi Jonathan, There are some equations that even the mighty 50G can't solve symbolically, but remember the 50G also has a wonderful numerical solver, which easily solved your equation ln(x)=x-2 to x=.158594, and x=3.14619. Granted, I had to put in two suggestions for x so that both zero crossings could be found, but thats not a big deal. To get the area between two curves, what I do is build my two expressions in stack levels 1 and 2 (set them equal to zero so they'll graph predictably). Put them into a list by hitting the "up" button twice, hit next, and hit >list on the menu. Now drop your interactive stack arrow down to the list you just made (down button once), and COPY. Exit interactive stack (Enter key) and go to the plot environment, highlight the EQ: field and paste. Set up the plot window, etc. and draw. You'll get your 2 curves. Now select the FCN tab, and put the cursor at the left border of the region you want the area for. Hit the AREA menu key, and move the cursor to the right border of your desired region. Hit AREA one more time, and the the machine will figure the area between the 2 curves, (or if only 1 curve is plotted, the area between the curve and the X axis). I'm pretty sure it uses the same algorithm as the numerical integrator to do this. I would submit that graphing on the 50G is not "a pain" if you do two things: 1. Build your equations on the stack using RPN keystrokes (much more efficient than wollowing through that algebraic environment in the plot application) Use copy and paste to get the equation into the plot app, or store it into a variable. 2. If you're going to plot more than one equation simultaniously, after getting them into separate stack registers, let the calculator deal with the syntax hassles of putting them into a list (which is what the plot app requires) by using that >LIST function in the interactive stack menu. Typing nested sets of brackets, syntax and such on a calculator makes me mad enough to eat nails, so I've elevated avoiding that stuff to a fine art. Just out of curiousity, what makes a TI-83 (supposedly) so much easier to plot with? Best regards, Hal Karl Schneider Posting Freak Posts: 1,792 Threads: 62 Joined: Jan 2005 04-26-2008, 03:33 PM 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. Jonathan Vogel Junior Member Posts: 5 Threads: 2 Joined: Mar 2008 04-27-2008, 06:50 PM Thanks for the responses. I'll try to address each of your thoughts: 'Just out of curiousity, what makes a TI-83 (supposedly) so much easier to plot with' Hal, You gave a pretty long explanation on how to easily graph with the HP 50g and even after reading it a few times 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. You hit Y= at the top ... type in your two equations and hit graph. Boom, easy. And if I want to find the intersection all I do is hit 2nd calc --> 5 (whatever number is intersection). Usually if I do this on the 50g I have to mess with the Window quite a bit and I can't even access the window from the graph view!! What's up with that? I have to exit it first. The only reason I'd think the 50g is easier is when it comes to extremely large complicated equations and at this point the only advantage would be RPN. I attempted to use your method to find area between two curves and got the wrong answer multiple times. Try to do your method and compare it to the actually answer because I would get like .97 and the actual answer would be 1.93. Thank you both for suggesting the numerical solver however I hate having to guess. I don't want to think when using a calculator... if the equations can be graphed and the intersection calculated... why can't that method be used instead when the calculator realizes it can't solve the equation symbolically (like the ti-89). Also even after I get over the fact I have to guess... when I do this and finally get an answer (after a long enough period of time which equates to the amount of time it would've taken for me to take out my ti-83 and find intersections of the two graphs) I realize that I have to purge my X value! Usually I don't realize this until I start trying to use the x variable... which can be annoying. 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. Is there a 50g program that will calculate the area between two curves based on the equations in stack 1 and 2? Thanks. ▼ bt_schmidt Junior Member Posts: 35 Threads: 5 Joined: Aug 2007 04-27-2008, 07:39 PM 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? ▼ Jonathan Vogel Junior Member Posts: 5 Threads: 2 Joined: Mar 2008 04-27-2008, 08:45 PM Quote: uh oh. ...bt PS. Don't you hate it when people quote out of context? Huh? ▼ Walter B Posting Freak Posts: 4,587 Threads: 105 Joined: Jul 2005 04-28-2008, 02:12 AM 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;) Karl Schneider Posting Freak Posts: 1,792 Threads: 62 Joined: Jan 2005 04-27-2008, 10:33 PM 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. ▼ Jonathan Vogel Junior Member Posts: 5 Threads: 2 Joined: Mar 2008 04-28-2008, 06:47 PM 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. ▼ George Bailey (Bedford Falls) Senior Member Posts: 335 Threads: 12 Joined: Dec 2007 04-29-2008, 12:46 AM 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 Karl Schneider Posting Freak Posts: 1,792 Threads: 62 Joined: Jan 2005 04-29-2008, 12:57 AM Jonathan -- I never said that you were "rude". (There have been only a few genuinely and chronically rude visitors over the years -- part of the reason an account is required for posting.) I did suggest that you be more considerate in posting queries by formulating them more precisely, stating them clearly and completely, and proofreading them carefully. Judging from content in your last two posts, I believe that you can do that. It can be rather annoying, after having made the effort to provide an informative and responsive answer to the questions as they were stated, then be told in so many words, "Thanks, but I already knew that", or, "I'd rather not do that." It represents a considerable shift of burden from the questioner to the respondents. While the primary intent of the Forum is discussion, "how to" questions -- particularly for difficult or unusual tasks -- are certainly not out of line. Accepted etiquette as described in the "How To Ask Questions" link should apply. I would have phrased your two original questions this way: 1. Is there any symbolic solution for "ln(x)=x-2", and is there a way to force a numeric solution using SOLVEVX if no symbolic solution exists? 2. How can I estimate the area between two curves using the sets of plot data, instead of integration? On the subthread ending in "Jonathan, are you sure you want to think when reading? d;)": We technical professionals do expect people to think when using their calculators, rather than to blindly accept whatever output is provided. Providing a starting point (or "guess") for numerical rootsolving is not only reasonable, it's good practice for the reasons I stated. The TI-82 allows the user to provide one or two guesses for SOLVE, as does the HP-50g. Trust me, nothing is "petty" with the RPL-based models. RPL can make difficult tasks easy, but they tend to make easy tasks difficult. I have no intent of becoming truly proficient with my three RPL-based calc's. I bought them for their capabilities, but I've learned only enough about them to get by. The TI models are designed for scholastic use; I also find them more straightforward. Your tip on graphing with the TI-83 was helpful, and I applied it successfully on my used TI-82. Quote: Honestly, there are no other forums that discuss HP calculators so this was basically my only choice... can you guys suggest a place where I can ask questions like this? The best place for run-of-the-mill "how-to" questions regarding the HP-48 and its successors is the newsgroup comp.sys.hp48, as I had previously stated. It gets a lot of traffic, so some searching will be necessary. Best regards, -- Karl S. Edited: 29 Apr 2008, 1:01 a.m. James M. Prange (Michigan) Posting Freak Posts: 1,041 Threads: 15 Joined: Jan 2005 04-29-2008, 01:20 AM For all RPL models, the comp.sys.hp48 usenet group is probably the best place to search for answers or ask questions. If you have a news client installed, you may be able to access it through an NNTP server, or you can access it through your web browser at http://groups.google.com/group/comp.sys.hp48/. I recommend that you search for an answer in that Google archive (all the way back to 1991), and then, if you don't find it, ask on the newsgroup. Another excellent place to find information, programs, and libraries for RPL models is http://www.hpcalc.org/. Regards, James Giancarlo (Italy) Member Posts: 223 Threads: 19 Joined: Jun 2005 04-29-2008, 07:11 AM Hi Jonathan. You may also want to have a look at the HP website Forum. Hope this helps. Best regards. Giancarlo Hal Bitton in Boise Senior Member Posts: 291 Threads: 43 Joined: Jun 2007 04-28-2008, 02:51 AM Hi again Jonathan, Concerning finding the area between 2 separate graphs, I miss-spoke when I said the 50G would find it simply by using the AREA function in the plot environment. My appologies. Because the SHADE function will color the area between two plots, I implicated the AREA routine as having like functionality, which it does not. The area function appears to only find the area between the graph of one equation at a time and the x axis. So the workaround would be to find the area under the curve of the first equation, then like wise for the next equation (use the NXEQ menu button, which is in the plot FCN tab, to call up the next equation...and you can leave the boundary markers where they were for the first equation). You can then exit to the stack, where both area results will be, and simply take the difference. A possibly more elegant method would be to combine your two equations into a single expression (equation 1) minus (equation 2)...(easily done if you're working in the stack), the graph of which will be a composite curve of the difference of the two equations. Then a single AREA routine will suffice.Hope this is of use to you.Best regards, Hal

 Possibly Related Threads... Thread Author Replies Views Last Post HP Prime questions: I/O and Meta programming Andy Gryc 2 1,006 10-31-2013, 11:22 PM Last Post: Andy Gryc HP-41 questions x34 4 1,200 09-28-2013, 05:15 PM Last Post: x34 HP Prime two questions about function app dg1969 0 580 09-27-2013, 11:14 AM Last Post: dg1969 HP Prime Questions Clayton Workman 23 3,937 09-25-2013, 11:19 AM Last Post: Clayton Workman Questions about building a RAM card for hp 48 Waon Shinyoe (China) 0 748 07-09-2013, 09:53 PM Last Post: Waon Shinyoe (China) HP-71b questions jerome ibanes 6 1,592 07-01-2013, 05:03 PM Last Post: Namir HP 41 Mcode related Questions Michael Fehlhammer 4 1,286 05-10-2013, 07:09 PM Last Post: Michael Fehlhammer An unusual HP 71B - questions Doug (NYC) 8 1,875 01-16-2013, 08:14 AM Last Post: Doug (NYC) Optimization questions - HP-15C Marcel Samek 49 7,410 11-08-2012, 07:45 AM Last Post: Luiz C. Vieira (Brazil) HP-15C/DM-15CC Memory questions x34 2 1,032 07-24-2012, 06:28 PM Last Post: Jeroen Van Nieuwenhove

Forum Jump: