$\sqrt{x^2.x}$ always has decimal portion starting ".000...49"

99 Views Asked by At

This is something I noticed years ago playing with a calculator.

$\sqrt{2^2+(2/10)} = 2.04939015319192$

$\sqrt{3^2+(3/10)} = 3.0495901363953815$

$\sqrt{4^2+(4/10)} = 4.049691346263317$

...

$\sqrt{65^2+(65/100)} = 65.0049998077071$

...

$\sqrt{325^2+(325/1000)} = 325.0004999996154$

Or, encoded in a little python program

import math
for i in range(0,10000):
    square = i ** 2
    num = float("%s.%s" % (square, i))
    print(math.sqrt(num))

First question is; how do you mathematically represent "round $x$ up to it's next biggest multiple of ten" so you could write a single equation for this?

Like a ceiling function, but for whole number values? Like $y = \sqrt{x^2 + \frac{x}{10\lceil x \rceil}}$? Or a function that "counts the digits" which you multiply by 10? $y = \sqrt{x^2 + \frac{x}{10*countdigits(x)}}$. Or another trick I'm missing?

Second question is, why is the decimal portion always staring with "0...049"!

2

There are 2 best solutions below

0
On BEST ANSWER

Expanding $\sqrt{n^2+h}$ in Taylor series around $h=0$ gives $$ \sqrt{n^2+h}=n+\frac{h}{2n}-\frac{h^2}{8n^3}+O(h^3) $$ When $h=\dfrac{n}{10}$, we get $$ \sqrt{n^2+\frac{n}{10}} \approx n+\frac{1}{20}-\frac{1}{800n} $$ So, the fractional part is a bit less than $1/20=0.05$, and the bit is less than $1/800<0.001$ for $n\ge 2$. Therefore, the fractional part is $0.049\cdots$.

The same argument holds for larger $n$ with the proper power of $10$.

0
On

$\sqrt{x^2+\frac{x}{10^n}}=x\sqrt{1+\frac{1}{10^nx}}=x(1+\frac{1}{10^n2x}+o(1/10^nx))=x+0.5\times 10^{-n}+o(1/10^nx)$

Thus this simple expansion shows the result is close to $\approx x.00\cdots05$, the first order term doesn't depend on $x$ actually.

Carrying the expansion of $(1+u)^\frac 12$ further would give more digits and surely the $0.00049$ would appear.

In particular notice that the second order term is negative, so the result is slightly less than $...05$.


Regarding your question about the number of digit, the formula is (for $x\ge 1$) $$\operatorname{numdigits}(x)=\lfloor\log_{10}(x)+1\rfloor$$