Approximation of square roots

317 Views Asked by At

Recently, I've seen a YouTube video where they approximate square roots real quick. They use this approximation : $$\sqrt{x} \approx \lfloor \sqrt{x} \rfloor+\dfrac{x-(\lfloor \sqrt{x} \rfloor)^2}{2\lfloor \sqrt{x} \rfloor}$$

I want to know the math behind this approximation. Can someone help me out?

2

There are 2 best solutions below

0
On BEST ANSWER

Let, $n \in N $

Suppose, we want to evaluate $\sqrt{n^2+c}$ $$\implies \sqrt{n^2(1+\dfrac{c}{n^2})}$$ $$\implies n \sqrt{1+\dfrac{c}{n^2}}$$ Now, we shall use the binomial expansion for $\sqrt{1+\dfrac{c}{n^2}}$

We know, $\sqrt{1+\dfrac{c}{n^2}}=1+\dfrac{c}{2n^2}-\dfrac{c^2}{8n^4}+\cdots$

So, $n \sqrt{1+\dfrac{c}{n^2}}=n+\dfrac{c}{2n}-\dfrac{c^2}{8n^3}+ \cdots$

Therefore, we can say, $\sqrt{n^2+c}=n+\dfrac{c}{2n}+\cdots$

From there we get the approximation, $\sqrt{x} \approx \lfloor x \rfloor + \dfrac{x-(\lfloor \sqrt{x} \rfloor)^2}{2\lfloor \sqrt{x} \rfloor}$

0
On

Source: How to find square roots

Imagine you have a square of area $x$. The first estimate of the side length is about $\lfloor\sqrt x\rfloor$, sounds reasonable?

But then that's an underestimation of that side length, because the estimated $\lfloor\sqrt x\rfloor\times\lfloor\sqrt x\rfloor$ square $\square$ is missing an L-shaped region $\blacksquare$, whose area is $\left(x-\lfloor\sqrt x\rfloor^2\right)$!

$$\left.\begin{array}{ccccccc} \square&\square&\square&\square&\square&\square&\blacksquare\\ \square&\square&\square&\square&\square&\square&\blacksquare\\ \square&\square&\square&\square&\square&\square&\blacksquare\\ \square&\square&\square&\square&\square&\square&\blacksquare\\ \square&\square&\square&\square&\square&\square&\blacksquare\\ \square&\square&\square&\square&\square&\square&\blacksquare\\ \blacksquare&\blacksquare&\blacksquare&\blacksquare&\blacksquare&\blacksquare&\blacksquare\\ \end{array}\quad\right\}\sqrt{x}=\lfloor\sqrt x\rfloor^2+\ldots?$$

Then the next estimate is to pretend that the L-shaped region is just two $\lfloor\sqrt x\rfloor\times\left( \frac{x-\lfloor\sqrt x\rfloor^2}{2\lfloor\sqrt x\rfloor}\right)$ rectangles. This give an over-estimated side length of the square

$$\begin{align*} l &= \sqrt{x}\\ &\approx \lfloor\sqrt x\rfloor+\frac{x-\lfloor\sqrt x\rfloor^2}{2\lfloor\sqrt x\rfloor} \end{align*}$$