How to derive a function to approximate $\sqrt{3}$? The problem is to used fixed-point iteration method to find an approximation to $\sqrt{3}$. The equation from the book is $f(x) = \dfrac{1}{2}\left(x + \dfrac{3}{x}\right)$. It make senses to me however I realize there are other equations can be used to approximate $\sqrt{3}$ as well, for example $f(x) = 2x - \sqrt{3}$.
What I don't understand is based on what condition they came up with that equation? Is there a general approach to find a function to approximate a constant? Thank you.
 A: As others have already said, your first equation is derived from Newton's method. The idea of it is very simple, and it answers your last question. Basically, to approximate the location of a root of a function, we approximate the function locally by its tangent, find the tangents root instead, and that value is a decent approximation for the location of the desired root. It is a good exercise too use the idea to derive the formula for Newton's method. 
However, we can view the equation produced for square roots in a more elementary light. If $x_n>0$ is a decent approximation for $\sqrt{n}$, then $$ \frac{ x_n + n/x_n }{2} $$ will be even better. Why? If $x_n $ is an approximation for $\sqrt{n}$ slightly too small (big), then $ n/x_n$ is an approximation for $\sqrt{n}$ slightly too big (small) - and then we average them to get somewhere closer in between. I still remember from all the calculations I used to do with this that $19601/13860$ is a good approximation for $\sqrt{2}$.
A: There are many general approaches. One of the simplest and best is Newton's Method, which you will find in any calculus text, or by searching the web. 
By the way, I think your first formula should be $f(x)=(1/2)(x+(3/x))$, no?
A: The reason that the iteration $x\leftarrow \tfrac{1}{2}(x+3/x)$ converges so rapidly to $\sqrt{3}$ is because it is derived from Newton's method. Newton's method says that to find a root of a function $f(x)$, we pick a starting point and repeat the iteration
$$x \leftarrow x - \frac{f(x)}{f'(x)}$$
until we have achieved our desired accuracy. As long as certain conditions on $f$ are satisfied (its derivative doesn't vanish, for example) and our initial guess is close enough to the root, this will always converge to the correct answer, and moreover it exhibits quadratic convergence, which means that you approximately double the number of decimal places of accuracy after each step of the iteration.
To approximate the square root of a number $c$, we need a function whose root is the square root of $c$. A simple choice is
$$f(x) = x^2 - c$$
The Newton iteration which finds the root of this equation is
$$x \leftarrow x - \frac{x^2 - c}{2x}$$
which you can rearrange to give
$$x \leftarrow \frac{1}{2} \left( x + \frac{c}{x}\right)$$
which, if you take $c=3$, is exactly the iteration you asked about in your question.
A: Your suggestion to rely on the iteration of the function $f$ defined by $f(x)=2x-\sqrt3$ to compute $\sqrt3$ is not used in practice for at least two reasons. First it presupposes one is able to compute $\sqrt3$, in which case the approximation procedure is useless. Second, $\sqrt3$ is not an attractive point of $f$. This means that for every $x_0\ne\sqrt3$, the sequence $(x_n)$ defined recursively by $x_{n+1}=f(x_n)$ will not converge to $\sqrt3$, and in fact, in the present case $x_n\to+\infty$ or $x_n\to-\infty$ depending on whether $x_0>\sqrt3$ or $x_0<\sqrt3$.
By contrast, using $f(x)=\frac12\left(x+\frac3x\right)$ and starting, for example, from a positive rational $x_0$ produces a sequence $(x_n)$ of rational numbers whose computation does not require to know the value of $\sqrt3$ and which converges to $\sqrt3$. Additionally $(x_n)$ converges to $\sqrt3$ extremely fast since after a while, one step of the algorithm replaces the error by roughly its square, thus the rate of convergence is quadratic, in the sense that $x_{n+1}-\sqrt3$ is of the order of $(x_n-\sqrt3)^2$. 
If you try to simulate the 20 first terms for $x_0=1$, for example, you will observe this spectacular speed of convergence which roughly says that each new iteration doubles up the number of significant digits of the approximant.
A: Somewhat off-topic, but...
When I was a kid, we didn't have calculators yet, so we learned to compute sqrts on paper using the digit-at-a-time method. This cannot compete with Newton-Raphson, of course, but is simple enough to explain to a child.  Here's a Python program that uses this method and gives $\sqrt{3}$ to 10,000 places:
import sys

i,j,k,q,d = 3,1,1,1,0

while True:
  sys.stdout.write(str(q))
  d,i,k,q = d+1, (i-k*q)*100, 20*j, 0

  for x in range(10):
    q += 1
    if (k+q)*q > i:
      q -= 1
      break

  j, k = j*10+q, k+q
  if d >= 10000:
    break

A: The link below shows to some extent the rationale behind the formula you have provided as well as others - See in particular the "Babylonian method"
Approximating square roots
