Equation problem in Hp32II « Next Oldest | Next Newest »

 ▼ Ravinder Walia Junior Member Posts: 4 Threads: 1 Joined: Jan 1970 01-06-2006, 12:09 PM Hello everyone, I have a HP32II and stored an equation D=10xLOG(W/0.001) If I try solving the equation for D, by pressing EQN and then enter everything is fine. However I can't get it to work for to solve W. I just got this calculator and don't have a manual. I can use the number crunching fine but this is my first attempt at storing an equation. Any help greatly appreciated. ▼ Antoine M. Couëtte Member Posts: 118 Threads: 17 Joined: Oct 2007 01-06-2006, 12:19 PM Assuming that "LOG" is the Napier Logarithm - if decimal, there is one constant to multiply with - and assuming that I correctly rewrote your equation, did you attempt solving for W with W=1000 EXP (D/10)? Antoine ▼ Ravinder Walia Junior Member Posts: 4 Threads: 1 Joined: Jan 1970 01-06-2006, 12:55 PM I think that the rearranged equation would be W=0.001xALOG(D/10) and if I put this in, it works fine to solve for W. What I wanted to do is enter the first equation which was D=10xLOG(W/0.001) And then use this single equation to solve for either W or D. I thought that there was a way to do this, but maybe there isn't. ▼ Chris Dean Member Posts: 120 Threads: 9 Joined: Aug 2005 01-06-2006, 01:03 PM When trying to solve for W did you enter a value for D first? ▼ Ravinder Walia Junior Member Posts: 4 Threads: 1 Joined: Jan 1970 01-06-2006, 01:20 PM I entered the equation D=10xLOG(W/0.001) Then I did [LEFT SHIFT] [STO] This brings up the equation. Then I pick to solve for W by [LEFT SHIFT]  Which then ask me what variable to solve for. To pick W I do  To give me W. It then asks for a value for D. If I want 12  It then gives the error LOG(0). I'm pretty sure I am doing something wrong, but not sure what. ▼ Norris Senior Member Posts: 363 Threads: 22 Joined: Jul 2007 01-06-2006, 01:52 PM I tried this equation on a 33S, which should be functionally equivalent to a 32SII as far as equations go, and had no problem solving the equation in question for D=12 (for the record, W=0.158489319246). I also have a 32SII, but it's at home, so I can't try that until tonight ▼ Chris Dean Member Posts: 120 Threads: 9 Joined: Aug 2005 01-06-2006, 02:10 PM I actually make the answer W=3.3201169223e-3 for D=12. I am sorry but I cannot be of any more assistance as I do not have a 32SII and cannot replicate your problem. Edited: 6 Jan 2006, 2:13 p.m. ▼ Norris Senior Member Posts: 363 Threads: 22 Joined: Jul 2007 01-06-2006, 02:31 PM Quote:I actually make the answer W=3.3201169223e-3 for D=12 You are using a natural (base-e) logarithm (LN function). But the equation appears to call for a base-10 logarithm (LOG function). My initial answer also needs correction. For a base-10 logarithm, W=0.0158489319246, not 0.158489319246. I used the SHOW function on the 33S to get all the digits, but I forgot that that the display drops leading zeros. Oops. Edited: 6 Jan 2006, 2:37 p.m. Katie Wasserman Posting Freak Posts: 1,477 Threads: 71 Joined: Jan 2005 01-06-2006, 02:41 PM You can tell the calculator to look for a solution within a certain range in order to avoid it trying to calculate log(x); where x<=0. To do this store one limit, say 1 in this case, in W and put the other limit, say .01 in this case, in the x register. So you would do: 1 STO W .01 ENTER EQN (select your equation) SOLVE W D=12 R/S I get W=1.58489319 E -2 John Smitherman Member Posts: 177 Threads: 12 Joined: Jan 1970 01-06-2006, 02:26 PM Ravinder, here is a link to the 33s manual which provides the same information as the 32sii manual on how to handle equations: http://h10032.www1.hp.com/ctg/Manual/c00251639.pdf Regards, John Ben Salinas Member Posts: 166 Threads: 28 Joined: Aug 2007 01-06-2006, 02:48 PM So, after a bit of fooling around, I think I found the solution. The 32sii uses a numerical approximation (Newton's Method?) to solve equations. It calls for guesses. The two bounds the 32sii (and consequently, the 33s) use are the number stored in the variable (W, in this case) and the number stored on the top of the stack (the screen). Before, you probably had either 0, or a negative number stored in one of these. Try putting a small number in each. I put 1 in W (5 or 10 should also work fine) and 1E-5 on the stack. If you limit the interval it has to solve over, then it will solve quicker. -Ben ▼ Norris Senior Member Posts: 363 Threads: 22 Joined: Jul 2007 01-06-2006, 03:10 PM I would have expected the 33S to behave in the same manner as the 32SII. Yet I can't duplicate the LOG(0) error on the 33S with the equation D=10xLOG(W/0.001) and D=12. It doesn't seem to matter what kind of numbers are initially stored in W, or left on the X-register. Positive, negative, or zero, large or small...the 33S responds almost immediately with W=0.0158 regardless. Needless to say, this is very frustrating. What I am I doing wrong ?? Why won't my calculator give me an error message, instead of the correct answer ?!? Edited: 6 Jan 2006, 3:17 p.m. ▼ Eamonn Member Posts: 68 Threads: 1 Joined: Jul 2005 01-06-2006, 06:08 PM Hi Norris, It may be that the HP-33s first attempts to re-arrange the equation so that it can directly solve for a real root. If it cannont do this, then it uses an iterative method (see appendix D of the HP-33s manual). The HP-32sII, if I recall correctly, always uses an iterative method to solve for the root. I remember some discussion on this site about solving A=SQR(B) on the HP33s and that it could not directly find the negative root of B without some re-shuffling of the equation so that it could not be solved directly. Sorry, I don't have a link to this discussion. The equation in the original post can be re-arranged and solved directly - I suspect that is why it doesn't matter what initial values are in the X register and the W variable on the HP-33s, but it does matter on the HP-32sII. Best Regards, Eamonn. Ravinder Walia Junior Member Posts: 4 Threads: 1 Joined: Jan 1970 01-06-2006, 06:13 PM I think that the idea put forward by Ben is correct. I managed to follow his instructions and the equation solves. I think that for an equation this simple it's not worth it, but at least I understand it a bit better now. For those that might have been interested in what the equation was, it's a conversion from Watts to dBm, both units of power and used in radio frequency engineering. Time to go and play some more. ▼ Karl Schneider Posting Freak Posts: 1,792 Threads: 62 Joined: Jan 2005 01-07-2006, 01:22 AM A few good points by several people in this thread. I'll try to sum it all up. To recap, the problem was to solve the equation ```D = 10 * LOG(W/0.001) ``` for D = 12.0 on an HP-32SII in Equation mode. Indeed, the HP-32SII solves only iteratively, unlike the HP-33S, which will return an algebraically-derived direct solution if it deems possible. The 32SII will use the stored value of the variable to be solved, and the value in the x-register as the first guesses for the solution. This is true when solving an equation or a program. In equation mode, when the user enters 12 as the prompted value of D, that unfortunately is one of the guesses for the solution of W. Pre-storing a positive value for W that is less than, or close enough to the solution W = 0.001*(10^1.2) = 0.015849 will ensure that the algorithm will converge. A larger pre-stored value will cause the algorithm to project the next guess for W from the first two guesses into the undefined non-positive region, causing an error. Pre-storing a positive value of W that is less than the actual solution will bound it between 12, bringing convergence. Pre-storing W = 0.02 will also work. However, Pre-storing W = 0.1 will fail, as the next projection of W -- based on function values calculated at W = 0.1 and W = 12.0 -- is negative. One way to get around this problem is to enter the equation as a program, so that two legitimate guesses can be entered. The methods of the HP-33S are more adroit: It will solve the equation directly. -- KS Tizedes Csaba [Hungary] Member Posts: 97 Threads: 25 Joined: Jan 1970 01-09-2006, 02:31 AM Hi, try this (I have an HP32SII, but not here, so I can't to try now...): ```D = 10*LOG(W/0.001) is equal D/10 = LOG(W)+3 and SOLVE it --- and you can to substitue L=LOG(W), if it is not working: D/10 = L+3 then SOLVE for L and W=10^L ``` Csaba

 Possibly Related Threads... Thread Author Replies Views Last Post Equation Library/App for the Prime Harold A Climer 3 372 10-30-2013, 10:14 AM Last Post: CompSystems Equation Library on the PRIME Harold A Climer 0 215 10-26-2013, 10:01 AM Last Post: Harold A Climer Meltiple Equation Solver PRIME Vs. HP 50G Harold A Climer 5 442 10-07-2013, 05:11 PM Last Post: CR Haeger EOT--TI N-Spire Equation Limit Matt Agajanian 2 298 09-22-2013, 12:37 PM Last Post: Matt Agajanian Does Prime Have a Multiple Equation Solver? Norman Dziedzic 2 277 09-20-2013, 09:43 AM Last Post: Norman Dziedzic Equation of the parabola given three points Gerson W. Barbosa 27 1,486 09-18-2013, 01:58 PM Last Post: Gerson W. Barbosa HP 50g: Customize Your Equation Library Software49g 2 304 05-27-2013, 12:39 PM Last Post: Software49g A very long HP-17BII equation Gerson W. Barbosa 22 1,274 04-19-2013, 12:37 AM Last Post: Gerson W. Barbosa Web Equation Thomas Klemm 3 286 03-21-2013, 03:16 AM Last Post: Nick_S Tangent's equation program for HP39gII Mic 22 1,277 03-01-2013, 11:14 AM Last Post: Tim Wessman

Forum Jump: 