Home > HP > Calculator > HP 15c Manual

HP 15c Manual

    Download as PDF Print this page Share this page

    Have a look at the manual HP 15c Manual online for free. It’s possible to download the document as PDF or print. UserManuals.tech offer 1114 HP manuals and user’s guides for free. Share the user manual or guide on Facebook, Twitter or Google+.

    							 Appendix D: A Detailed Look at _ 221 
     
    As  discussed  in  section  13,  page  186,  the  occurrence  of  other  situations  in 
    the  iteration  process  indicates  the  apparent  absence  of  a  function  zero.  The 
    reason  is  that  there  is  no  way  to  logically  predict  a  new  estimate  that  is 
    likely  to  have  a  function  value  closer  to  zero.  In  such  cases, Error  8 is 
    displayed. 
    You should note  that  the  initial  estimates  you provide  are  used to begin the 
    prediction  process.  By  permitting  more  accurate  predictions  than  might 
    otherwise  occur,  properly  chosen  estimates  greatly  facilitate  the 
    determination of the root you seek. 
    The _ algorithm  will always find  a  root  provided  one  exists 
    (within the overflow bounds), if any one of four conditions are met: 
     
     Any  two  estimates  have  function 
    values with opposite signs. 
      
     
     The function is monotonic, meaning 
    that f(x) either  always  decreases  or 
    else  always  increases  as x is 
    increased. 
        
    						
    							222 Appendix D: A Detailed Look at _ 
     
     
     The  functions  graph  is  either 
    convex  everywhere  or  concave 
    everywhere. 
      
     The  only  local  minima  and 
    maxima  of  the  functions  graph 
    occur  singly  between  adjacent 
    zeros of the function. 
     
    In addition, it is assumed that the _ algorithm will not be interrupted 
    by an improper operation. 
    Accuracy of the Root 
    When  you  use  the _ key  to  find  a  root  of  an  equation,  the  root  is 
    found accurately. The displayed root either gives a calculated function value 
    (f(x)) exactly equal to zero or else is a 10-digit number virtually adjacent to 
    the  place  where  the  functions  graph  crosses  the x-axis.  Any  such  root  has 
    an accuracy within two or three units in the 10th significant digit. 
    In  most  situations  the  calculated  root  is  an  accurate  estimate  of  the 
    theoretical  (infinitely  precise)  root  of  the  equation.  However,  certain 
    conditions can cause the finite accuracy of the calculator to give a result that 
    appears to be inconsistent with your theoretical expectation.    
    						
    							 Appendix D: A Detailed Look at _ 223 
     
    If  a  calculation  has  a  result  whose  magnitude  is  smaller  than 
    1.000000000×10-99,  the  result  is  set  equal  to  zero.  This  effect  is  referred  to 
    as  ―underflow.‖  If  the  subroutine  that  calculates  your  function  encounters 
    underflow for a range of x and if this affects the value of the function, then a 
    root  in  this  range  may  be  expected  to  have  some  inaccuracy.  For  example, 
    the equation 
    x4 = 0 
    has  a  root  at x =  0.  Because  of  underflow, _ produces  a  root  of  
    1.5060  -25 (for  initial  estimates  of  1  and  2).  As  another  example, 
    consider the equation 
    l / x2 = 0 
    whose  root  is  infinite  in  value.  Because  of  underflow, _ gives  a  root 
    of 3.1707  49 (for  initial  estimates  of  10  and  20).  In  each  of  these 
    examples,  the  algorithm  has  found  a  value  of x for  which  the  calculated 
    function  value  equals  zero. By  understanding  the  effect  of  underflow,  you 
    can readily interpret results such as these. 
    The  accuracy  of  a  computed  value  sometimes  can  be  adversely  affected  by 
    ―round-off‖  error,  by  which  an  infinitely  precise  number  is  rounded  to  10 
    significant  digits. If  your  subroutine  requires  extra  precision  to  properly 
    calculate  the  function  for  a  range  of x,  the  result  obtained  by _ may 
    be inaccurate. For example, the equation 
    | x2 – 5 | = 0 
    has  a  root  at  x  = .  Because  no  10-digit  number exactly equals ,  the 
    result  of  using _ is Error  8 (for  any  initial  estimates)  because  the 
    function  never  equals  zero  nor  changes  sign.  On  the  other  hand,  the 
    equation 
    [(|x| + 1) + 1015]2 = 1030 
    has no roots because the  left  side  of the equation is always  greater than the 
    right side. However, because of round-off in the calculation of 
    f(x) = [(|x| + 1) + 1015]2 - 1030, 
     5 5  
    						
    							224 Appendix D: A Detailed Look at _ 
     
    the  root 1.0000 is  found  for  initial  estimates  of  1  and  2.  By  recognizing 
    situations  in  which  round-off  error  may  influence  the  operation  of _, 
    you can evaluate the results accordingly and perhaps rewrite the function to 
    reduce the effects of round-off. 
    In  a  variety  of  practical  applications,  the  parameters  in  an  equation – or 
    perhaps  the  equation  itself – are  merely approximations. Physical 
    parameters  have  an  inherent  accuracy  (or  inaccuracy).  Mathematical 
    representations  of  physical  processes  are  only  models  of  those  processes, 
    accurate  only  to  the  extent  that  the  underlying  assumptions  are  true.  An 
    awareness  of  these  and other  inaccuracies  can  be  used  to  your  advantage. 
    By  structuring  your  subroutine  to  return  a  function  value  of  zero  when  the 
    calculated  value  is  negligible  for  practical  purposes,  you  can  usually  save 
    considerable time in finding a root with _ – particularly for cases that 
    would normally take a long time. 
    Example: Ridget  hurlers  such  as  Chuck  Fahr  can  throw  a  ridget  to  heights 
    of  105  meters  and  more.  In  fact,  Fahr’s  hurls  usually  reach  a  height  of 
    107 meters.  How  long  does  it  take  for  his  remarkable  toss, described  on 
    page 184 in section 13, to reach 107 meters? 
    Solution: The desired solution is the  value of t at  which h = 107. Enter the 
    subroutine  from  page  184  that  calculates  the  height  of  the  ridget.  This 
    subroutine can be used in a new function subroutine to calculate  
    f(t) = h(t) – 107. 
    The following subroutine calculates f(t): 
    Keystrokes Display  
    | ¥ 000– Program mode. 
    ´b B 001–42,21,12 Begin with new label. 
    G A 002–   32 11 Calculates h(t). 
    1 003–       1  
    0 004–       0  
    7 005–       7 Calculates h(t) –=107.=
    - 006–      30  
    |n 007–   43 32   
    						
    							 Appendix D: A Detailed Look at _ 225 
     
    In  order  to  find  the  first  time  at  which  the  height  is  107  meters,  use  initial 
    estimates of 0 and 1 second and execute _ using B. 
    Keystrokes Display 
    | ¥   Run mode. 
    0 v 0.0000  Initial estimates. 1 1 
    ´ _ 
    B 
    4.1718  The desired root. 
    ) 4.1718  A previous estimate of the root. 
    ) 0.0000  Value of f(t) at root. 
    It  takes  4.1718  seconds  for  the  ridget  to  reach  a height  of  exactly  107 
    meters. (It takes approximately two seconds to find this solution.) 
    However,  suppose  you  assume  that  the  function h(t) is  accurate  only  to  the 
    nearest  whole  meter.  You  can  now  change  your  subroutine  to  give f(t) =  0 
    whenever  the  calculated  magnitude  of f(t) is less  than  0.5  meter.  Change 
    your subroutine as follows: 
    Keystrokes Display 
    | ¥ 000- Program mode. 
    t “ 006 006–      30 Line before n instruction. 
    | a 007–   43 16 Magnitude of f(t). 
    . 008–      48  Accuracy 
    5 009–       5 
    | T 7 010–43,30, 7  Test for x > y and return  
    zero if accuracy >  
    magnitude (0.5 > | f(t) | ). | ` 011–   43 35  
    | T 0 012–43,30, 0  Test for x ≠ 0 and restore=
    | K 013–   43 36  f(t) if value is nonzero.  
    						
    							226 Appendix D: A Detailed Look at _ 
     
    Execute _ again: 
    Keystrokes Display 
    | ¥   Run mode. 
    0 v 0.0000  Initial estimates. 1 1 
    ´ v B 4.0681  The desired root. 
    ) 4.0681  A previous estimate of the 
    root. 
    ) 0.0000  Value of modified f(t) at root. 
    After  4.0681  seconds,  the  ridget  is  at  a  height  of  107  ±  0.5  meters.  This 
    solution, although different from the previous answer, is correct considering 
    the  uncertainty  of  the height  equation.  (And  this  solution  is  found  in  just 
    under half the time of the earlier solution.) 
    Interpreting Results 
    The  numbers  that _ places  in  the  X-,  Y-,  and  Z-registers  help  you 
    evaluate the results of the search for a root of your equation.* Even when no 
    root is found, the results are still significant. 
    When _ finds  a  root  of  the  specified 
    equation,  the  root  and  function  values  are 
    placed in the X- and Z-registers. A function 
    value  of  zero  is  the  expected  result. 
    However,  a  nonzero  function  value is  also 
    acceptable  because  it  indicates  that  the 
    functions  graph  apparently  crosses  the x-
    axis  within  an  infinitesimal  distance  from 
    the  calculated  root.  In  most  such  cases,  the 
    function  value  will  be  relatively  close  to 
    zero. 
                                                               * The  number  in  the  T-register  is  the  same  number  that  was  left  in  the  Y-register  by  the final  execution  of your function subroutine. Generally, this number is not of interest.   
    						
    							 Appendix D: A Detailed Look at _ 227 
     
    Special consideration is required for a different 
    type  of  situation  in  which _ finds  a  root 
    with  a  nonzero  function  value.  If  your 
    functions  graph  has  a  discontinuity  that 
    crosses  the x-axis, _ specifies  as  a  root 
    an x-value adjacent to the discontinuity. This is 
    reasonable  because  a  large  change  in  the 
    function  value  between  two  adjacent  values  of 
    x might  be  the  result  of  a  very  rapid, 
    continuous  transition.  Because this  cannot  be 
    resolved by the algorithm, the root is displayed 
    for you to interpret. 
    A  function  may  have  a pole, where  its 
    magnitude  approaches  infinity.  If  the  function 
    value changes sign at a pole, the corresponding 
    value  of x looks  like  a  possible  root  of  your 
    equation,  just  as  it  would  for  any  other 
    discontinuity crossing the x-axis.  However,  for 
    such  functions, the  function  value  placed  into 
    the  Z-register  when  that  root  is  found  will  be 
    relatively large. If the pole occurs at a  value of 
    x that  is exactly represented  with  10  digits,  the 
    subroutine  may try that value  and halt prematurely  with an error indication. 
    In  this  case,  the _ operation  will  not  be  completed.  Of  course,  this 
    may  be  avoided  by  the  prudent  use  of  a  conditional  statement  in  your 
    subroutine. 
    Example: In  her  analysis  of  the  stresses  in  a 
    structural  component,  design  consultant  Lucy 
    I.  Beame  has  determined  that  the  shear  stress 
    can be expressed as 
     
    where Q is  the  shear  stress  in  newtons  per 
    square  meter  and x is  the  distance  from  one  end  in meters.  Write  a 
    subroutine  to  compute  the  shear  stress  for  any  value  of x. Use _ to 
    find the location of zero shear stress. 
    
    
    1410for1000
    100for350453Q
    23
    x
    xxx     
    						
    							228 Appendix D: A Detailed Look at _ 
     
    Solution: The  equation  for  the  shear  stress  for x between  0  and  10  is  more 
    efficiently programmed after rewriting it using Horners method: 
    Q = (3x–45Fx2 + 350 for 0 < x < 10. 
    Keystrokes Display  
    | ¥ 000– Program mode. 
    ´ b 2 001–42,21, 2  
    1 002–       1 
    Test for x range. 0 003–       0 
    |£ 004–   43 10 
    t 9 005–   22  9 Branch for x ≥ 10. 
    | ` 006–   43 35  
    3 007–       3  
    * 008–      20 3x. 
    4 009–       4  
    5 010–       5  
    - 011–      30 (3x – 45). 
    * 012–      20  
    * 013–      20 (3x –=45Fx2. 
    3 014–       3  
    5 015–       5  
    0 016–       0  
    + 017–      40 (3x – 45)x 2 + 350. 
    | n 013–   43 32 End subroutine. 
    ´ b 9 019–42,21, 9 Subroutine for x ≥ 10. 
    ‛ 020–      26  
    3 021–       3 103=1000. 
    | n 022–   43 32 End subroutine. 
    Execute _ using  initial  estimates  of  7  and  14  to  start at  the  outer  end 
    of the beam and search for a point of zero shear stress. 
      
    						
    							 Appendix D: A Detailed Look at _ 229 
     
     
    Keystrokes Display 
    | ¥   Run mode. 
    7 v 7.0000  Initial estimates. 14 14  
    ´_ 2 10.0000  Possible root. 
    ))  1,000.0000  Stress not zero. 
    The  large  stress  value  at  the  root  points  out  that  the _ routine  has 
    found  a  discontinuity.  This  is  a  place  on  the  beam  where  the  stress  quickly 
    changes  from  negative  to  positive.  Start  at  the  other  end  of  the  beam 
    (estimates of 0 and 7) and use _ again. 
    Keystrokes Display   
    0 v 0.0000  Initial estimates. 7 7 
    ´ _ 2 3.1358  Possible root. 
    )) 2.0000 -07 Negligible stress. 
    Beames  beam  has  zero  shear  stress  at 
    approximately  3.1358  meters  and  an 
    abrupt change of stress at 10.0000 meters. 
     
     
     
     
     
    When  no  root  is  found  and Error  8 is displayed,  you  can  press − or  any 
    one  key  to  clear  the  display  and  observe  the  estimate  at  which  the  function 
    was  closest  to  zero.  By  also  reviewing  the  numbers  in  the  Y- and  Z-
    registers,  you  can  often  determine  the  nature  of  the  function  near  the  root 
    estimate and use this information constructively.   
    						
    							230 Appendix D: A Detailed Look at _ 
     
    If the  algorithm  terminates  its  search  near  a 
    local  minimum  of  the  functions magnitude, 
    clear  the Error  8 display  and  observe  the 
    numbers  in  the  X-,  Y-,  and  Z-registers  by 
    rolling  down  the  stack.  If  the  value  of  the 
    function  saved  in  the  Z-register  is  relatively 
    close  to  zero,  it  is  possible  that  a  root  of 
    your  equation  has  been  found – the  number 
    returned  in  the  X-register  may  be a 10-digit 
    number very close to a theoretical root. You 
    can  explore  this  potential  minimum  further  by  rolling  the  stack  until  the 
    returned  estimates  are  back  in  the  X- and  Y-registers  and  then  executing 
    _ again  using  these  numbers  as  initial  estimates.  If  an  actual 
    minimum  has  been  found, Error  8 will  again  be  displayed  and  the  number 
    in  the  X-register  will  be  approximately  the  same as  before,  but  possibly 
    closer to the actual location of the minimum. 
    Of  course,  you  may  deliberately  use _ to  find  the  location  of  a  local 
    minimum  of  the  functions  magnitude.  However,  in  this  case  you  must  be 
    careful  to  confine  the  search  in  the  region  of  the  minimum.  Remember, 
    _ tries hard to find a zero of the function. 
    If  the  algorithm  stops  searching  and 
    displays Error  8 because  it is  working on a 
    horizontal  asymptote  (when  the  value  of 
    the  function  is  essentially  constant  for  a 
    large  range  of x),  the  estimates  in  X- and 
    Y-registers  usually  are  significantly 
    different  from  each  other.  The  number  in 
    the  Z-register  is  the  value  of  the  potential 
    asymptote.  If  you  execute _ again 
    using  as  initial  estimates  the  numbers  that 
    were  returned  in  the  X- and  Y-registers,  a 
    horizontal  asymptote  may  again  cause Error  8, but  with  numbers  in  the  X- 
    and Y-registers that will differ from the previous numbers. The value of the 
    function  in  the  Z-register  would  then  be  about  the  same  as  that  obtained 
    previously.    
    						
    All HP manuals Comments (0)

    Related Manuals for HP 15c Manual