home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / hp48 / 6294 < prev    next >
Encoding:
Internet Message Format  |  1992-12-13  |  3.6 KB

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