home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / sci / math / 15158 < prev    next >
Encoding:
Text File  |  1992-11-18  |  1.8 KB  |  58 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!sun-barr!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!ira.uka.de!rz.uni-karlsruhe.de!ipfs.bau-verm.uni-karlsruhe.de!vhansen
  3. From: vhansen@ipfs.bau-verm.uni-karlsruhe.de (Wolfgang von Hansen)
  4. Subject: Re: Square root of a number
  5. Message-ID: <1992Nov18.114710.28333@rz.uni-karlsruhe.de>
  6. Sender: usenet@rz.uni-karlsruhe.de (USENET 'No news is bad news' News System)
  7. Organization: IPF, University of Karlsruhe
  8. References: <1992Nov15.194049.1@woods.ulowell.edu>
  9. Date: Wed, 18 Nov 1992 11:47:10 GMT
  10. Lines: 46
  11.  
  12. In article <1992Nov15.194049.1@woods.ulowell.edu> buxamusaa@woods.ulowell.edu writes:
  13. >
  14. >Please could someone help me with an assignment that I have to do.
  15. >It is a very general question, though the answer could be quite lengthy.
  16. >"Discuss methods for finding the square root of a number."
  17. >
  18. >What I am looking for are all possible methods/alogrithms for this.
  19.  
  20. My preferred method for such algorithms is Newtons iteration:
  21.  
  22. Problem: For a given function f find x, so that f(x) = 0.
  23.  
  24.                    f(x)
  25. Solution: x <- x - -----
  26.                    f'(x)
  27.  
  28. The starting value of x must be chosen near enough to the desired
  29. result. Otherwise you might get a different result or need quite
  30. a lot of iterations. Repeat the iteration until the accuracy e
  31.  
  32. e = |x - x   |
  33.       i   i-1
  34.  
  35. is reached. Turning to square root we seek x with
  36.  
  37.                  2         2
  38. x = sqrt(a) <=> x = a <=> x - a = 0.
  39.  
  40.                           2
  41. From this we get f(x)  = x - a
  42.                  f'(x) = 2x.
  43.  
  44. Filling this into our iteration formula we receive
  45.  
  46.           2        2   2
  47.          x - a   2x - x + a   1 /    a\
  48. x <- x - ----- = ---------- = - |x + -|
  49.           2x         2x       2 \    x/
  50.  
  51.          1 /    a\
  52. <=> x <- - |x + -|
  53.          2 \    x/
  54.  
  55. I hope that this is helping.
  56.  
  57. - Wolfgang
  58.