▼
Posts: 4
Threads: 1
Joined: Jan 1970
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.
▼
Posts: 118
Threads: 17
Joined: Oct 2007
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
▼
Posts: 4
Threads: 1
Joined: Jan 1970
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.
▼
Posts: 120
Threads: 9
Joined: Aug 2005
When trying to solve for W did you enter a value for D first?
▼
Posts: 4
Threads: 1
Joined: Jan 1970
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]
[7]
Which then ask me what variable to solve for. To pick W I do
[1]
To give me W. It then asks for a value for D. If I want 12
[12]
It then gives the error LOG(0).
I'm pretty sure I am doing something wrong, but not sure what.
▼
Posts: 363
Threads: 22
Joined: Jul 2007
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
▼
Posts: 120
Threads: 9
Joined: Aug 2005
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.
▼
Posts: 363
Threads: 22
Joined: Jul 2007
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.
Posts: 1,477
Threads: 71
Joined: Jan 2005
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
Posts: 177
Threads: 12
Joined: Jan 1970
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
Posts: 166
Threads: 28
Joined: Aug 2007
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
▼
Posts: 363
Threads: 22
Joined: Jul 2007
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.
▼
Posts: 68
Threads: 1
Joined: Jul 2005
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.
Posts: 4
Threads: 1
Joined: Jan 1970
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.
▼
Posts: 1,792
Threads: 62
Joined: Jan 2005
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
Posts: 97
Threads: 25
Joined: Jan 1970
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
|