home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!spool.mu.edu!uwm.edu!ogicse!news.u.washington.edu!news.uoregon.edu!nntp.uoregon.edu!stevev
- From: stevev@miser.uoregon.edu (Steve VanDevender)
- Newsgroups: comp.sys.hp48
- Subject: Re: SOLVE questions
- Message-ID: <STEVEV.92Dec13165745@miser.uoregon.edu>
- Date: 14 Dec 92 00:57:45 GMT
- Article-I.D.: miser.STEVEV.92Dec13165745
- References: <1992Dec13.201910.11279@gn.ecn.purdue.edu>
- Distribution: usa
- Organization: University of Oregon Chemistry Stores
- Lines: 65
- NNTP-Posting-Host: miser.uoregon.edu
- In-reply-to: hoeferbe@gn.ecn.purdue.edu's message of Sun, 13 Dec 92 20:19:10 GMT
-
- In article <1992Dec13.201910.11279@gn.ecn.purdue.edu>
- hoeferbe@gn.ecn.purdue.edu (Bernard Everett Hoefer) writes:
-
- I do not understand what my HP48SX is doing when I try
- to solve the following equation.
-
- X*INV(TAN(X))=-4.8749269433
-
- I get X: 14.4622844612 as the answer, but that is not the
- answer I want. For some reason, the calculator starts its guesses
- between +1 and -0, then jumps to +1 and +5, then +11 and +32 and
- finally narrows it down to 14.4622844612.
- Why does it ignore 2.64454252521 (the answer I am looking
- for) while it is between 1 and 5?
- Second question: when I limit the guessing between
- 0 and 6.28 (since I am in radians) the calculator jumps right over the
- guessing between 0 and 6.28, and starts looking between 6.28 and 163,
- then 163 to 293!
- I understand that the calculator looks for a sign reversal,
- but it is skipping over two of them when I limit it from 0 to 6.28.
- Can anybody explain why it jumps around so (seemingly) randomly?
-
- You will find comfort and solace on pages 276-282 of The Fine
- Manual (if you have the two-volume manual; if you have the more
- recent one-volume edition you will have to look up the topic of
- "How the HP Solve Application Works" yourself).
-
- What is happening is that the pairs of guesses that you are
- providing have function values that are both of the same sign.
- When this happens, the solver will effectively draw a line
- between the guesses, find where that line intersects the X-axis,
- and replace one of the limits with that. If you give a pair of
- guesses, the search is not necessarily limited to the region
- between them.
-
- For example, if you give the guesses 0 and 6.28, then you get the
- function values 0 and (approx.) -1971. It then runs a line
- through (0, 0) and (6.28, -1971) to obtain a new guess, but by
- then it is far enough afield that it won't get a principal value
- solution.
-
- One way to make sure you get an solution in the range you want is
- to evaluate the function several times in the range of the
- desired solution values. If you find a pair of initial guesses
- that yield function values of different sign then you will be
- more likely to have the solver converge on a solution between
- those guesses. In general, one guess, or two guesses very close
- to each other, will work better than two widely separated
- guesses.
-
- Another good way to make sure that you find the solution you want
- is to graph the function, then ask for a root in the range of the
- desired solution. You will also get a more accurate picture of
- the function or see whether two guesses really have just one root
- between them, one or more, or even none.
-
- Using the EXPR= key in the solver will also help tell you whether
- a solver-located sign reversal is likely to be a root (left and
- right sides match closely) or a disjunction (left and right sides
- are of widely different values).
- --
- Steve VanDevender stevev@greylady.uoregon.edu
- "Bipedalism--an unrecognized disease affecting over 99% of the population.
- Symptoms include lack of traffic sense, slow rate of travel, and the
- classic, easily recognized behavior known as walking."
-