I would love to see you show a visualisation for the generalized version of this like Newton's method of approximation.
@MathVisualProofs19 күн бұрын
Is a good idea.
@samiam696218 күн бұрын
OMG! You guys are such nerds!
@MathVisualProofs18 күн бұрын
@@samiam6962guilty
@CostinBeiu16 күн бұрын
A much simpler approximation is to see that 150 is between 144 and 169. So the result is greater than 12. Thus, the approximate value is 12+ (150-144)/(12+13) . 12+6/25, which is 12.24.
@BenjAvendany15 күн бұрын
@@samiam6962 says the 5 yr old
@MellencePeanut16 күн бұрын
Since a year ago, I am really interested about that function, but I interpret it as L(x) = a + (x-a^2)/2a, wherein a is the nearest whole number to the square root of x, because those are just the same thing. If you repeat it a lot of times or make a lot of iterations, the result will become much more accurate. Here is an example: 1st iteration: (using the function you showed in the video) √3 = √4 + (1/(2√4))(3-4) => √3 = 2 - 0.25 => √3 = 1.75 (accurate to 1 decimal digit) 2nd iteration: (using my interpretation about the function) √3 = 1.75 + (3 - 1.75^2)/(2 * 1.75) => √3 = 1.75 - 0.0625/3.5 => √3 = (98 - 1)/56 => √3 = 97/56 ≈ 1.7321 (accurate to 3 decimal digits) 3rd iteration: (also using my interpretation about the function) √3 = 97/56 + (3 - (97/56)^2)/(2 * 97/56) => √3 = 97/56 - (1/3136)/(194/56) => √3 = 97/56 - 1/5432 => √3 = (9409 - 1)/5432 => √3 = 9408/5432 ≈ 1.7319 (accurate to 2 decimal digits) Sometimes, that really happens (number of accurate decimal digits decrease), but notice that if the second last digit in the approximation (1.7319) is rounded off, it will become 1.7320, which is accurate to 4 decimal digits. And so on... I remember watching a video from MindYourDecisions a month ago saying that this algorithm is also used by modern computers to calculate square roots. Using my paper for computing and my calculator, the 4th iteration of doing the function on the squareroot of 3 is 18817/10864 is approximately 1.7320508, and it is accurate to 7 decimal digits! Also for my calculations for √267, the result of the first iteration is 16.34375. :) Bonus: Back then, I watched a video of Tecmath about approximating cube roots, and I saw there that the ∛x = a + (x - a^3)/3a^2, wherein a is the cube root of the nearest cube number to x, that can be rewritten as L(x) = ∛a + (1/3(∛a)^2)(x - a), which looks related to the function in your video that can also be rewritten as L(x) = √a + (1/(2(√a)^1))(x - a). Notice something? The radical power obviously changed, but the power of the variable in the coefficient in the denominator of one of the factors of the product to be added to the nth root of a increased by 1, that can be seen here: √a became ∛a^2. Does that mean the approximation method for the 4th root of x is equal to ∜a + (1/4(∜a)^3)(x - a) or L(x) = ∜a + (1/4(∜a)^3)(x - a)? I tried it with ∜50, with a as 81 (50 is nearer to 81 than 16), and the result in the first iteration was 293/108, which when powered by 4, is 7370050801/136048896 or approximately 54.17207, only off by 4 and a bunch of decimal numbers. But when I tried to do the 2nd iteration, I don't know if this was my fault but the result was really far away (in the millions digit) and even is a negative number. That's all, thank you! 🙂
@Dom-kp6ur16 күн бұрын
It’s because the formula comes from the Taylor expansion. The coefficients for the fourth root of x is very different from the square root, and i don’t have the space to argue why but you may need to include higher order terms to get a decent approximation
@KuldipChandJari11 күн бұрын
How did u type cube root and fourth root
@MellencePeanut11 күн бұрын
@@Dom-kp6ur Alright, thank you! :)
@MellencePeanut11 күн бұрын
@@KuldipChandJari I just searched on the internet and copied those symbols from some websites. (from the websites Symbol Hippo and HotSymbol, respectively.) :)
@redpepper7410 күн бұрын
@@KuldipChandJariIf you’re on windows an easy way to type a lot of math symbols is to use win+period to bring up the symbol menu. Otherwise you can just put “Unicode cube root symbol” in a search engine and copy the character from somewhere
@Salamander87619 күн бұрын
Thank you for making square roots easier to calculate.
@brahmbandyopadhyay6 күн бұрын
Sarcasm or no?
@daliasprints979819 күн бұрын
This is my favorite trick for approximating sqrt. It even works decently rounding to nearest (optionally even) power of two (computationally dirt cheap) as the point to expand at.
@jaja47_coolness19 күн бұрын
I'm a nerd so I make it a series every time 😞
@daliasprints979819 күн бұрын
It doesn't give a precise value but it's great when the need for a sqrt comes from needing an upper bound for a buffer size or a partition size to guarantee a particular big-O or anything like that.
@StratosFair17 күн бұрын
But how do you find the closest perfect square for large numbers ?
@daliasprints979817 күн бұрын
@@StratosFair I don't. I find the closest power of two. Which is just a clz.
@hamzavictor238514 күн бұрын
This is where that formula came from. Nice
@ilovee27119 күн бұрын
You can also use newton-raphson's method (on f(x) = x²-a to find sqrt(a)), which is not very complicated, but can approximate very well within a few iterations!
@coderamen66619 күн бұрын
This method is actually very similar to Newton-Raphson
@ilovee27118 күн бұрын
@coderamen666 Yes, it is pretty similar, (both use a linear approximation) but it's a bit different.
@CrisFelixTolentino15 күн бұрын
16.34375 or 523/32
@whoff5919 күн бұрын
x² = (a + b)² = a² + 2ab + b² You can take a : your first approximation b : the rest, or the difference And probably a >> b , a much bigger than b , so : x² = (a + b)² ~ a² + 2ab 2ab ~ x² - a² ==> b ~ (x² - a²)/(2a) In this case 144 is a square number just below 150, so x² = 150 x = a+b a² = 144 x² = 150 ~ a² + 2*a*b = 144 + 2*12*b 150 ~ 144 + 24b 6 ~ 24b b ~ 6/24 = 0.25 So x ~ a+b = 12.25 I think it's the same equation for approximation as in the video, but it's another approach, isn't it ?
@sajidrafique37513 күн бұрын
no...he is using taylor series but only two terms..
@danielsaldivar562219 күн бұрын
It is a nice exercise in a calculus class. In general math just use the calculator in your phone.
@MathVisualProofs19 күн бұрын
Sure, But this has been used in various other settings where computing multiple square roots can be faster by only using this linear approximation (like rendering backgrounds in video games )
@danielsaldivar562216 күн бұрын
@ you’re right, In that case use Maple or Mathematica.
@muralisaripalli16418 күн бұрын
A quadratic approximation improves accuracy.
@kepperbeegames12 күн бұрын
Achievement unlocked: How did we get here?
@KrasBadan15 күн бұрын
Even better: try adding 1 to the denominator. You'd be surprised about how good this approximation is. What it does is it linearly interpolates the graph between perfect squares. By graphing them, we can see that the maximum error is much, much lower. [√x]+(x-[√x])/2[√x] vs [√x]+(x-[√x])/(2[√x]+1) [] means whole part. Here's how to derive the thing in the video without calculus. Let's divide √x in whole and fractional part. [√x]=a x=a²+d √x=√(a²+d)= √(a²+d+d²/4a²-d²/4a²)= √((a+d/2a)²-d²/4a²) Notice how small the d² term is, and it is amplified even further by √. So we ignore it. √x≈√(a+d/2a)²=a+d/2a Why does adding 1 improve it? Well, according to the law of odd numbers, the differences between consecutive squares are consecutive odd numbers. It means that if we are currently at the point of the graph (a², a), in order to go 1 on the y-axis, we need to go 2a+1 on x axis. If we do that, we'll find ourselves at the (a²+2a+1, a+1) point. Easy to see that we stay on the graph. And would you look at that, by adding +1 to the denominator we're doing just that! By increasing d, we linearly move d to the right and d/(2a+1) up. So we'll trace a straight path between two perfect squares. It's so cool, I think it deserves to have its own video.
@راكانالسلمي-ح7ظ14 күн бұрын
Can we use Taylor series ?
@MathVisualProofs14 күн бұрын
This is the first order Taylor series (linear approximation). You can use higher order as well but this approximation is decent as is.
@amirammar668719 күн бұрын
Taylor series when n = 1, x0 = a P_n(x) = f(x0) + f’(x0) ( x-x0) + ( f’’(x0) ( x - x0)**2 ) /2! + …… + ( f^n(x0) ( x -x0)**n ) /n!
@stephenwithaph156614 күн бұрын
that's more like it! Immediately what I thought of when I saw L(x) defined as the first 2 indeces of the Taylor series. Interesting to know that just 2 indeces is generally good enough for a solid approximation of this function.
@cyberawm115819 күн бұрын
16 + 267-256/32 ≈ 16.343 There is a simpler way to write it as √(a+b) where a is perfect square. Then the approximate will be = n + b/2n, where n = √a. Actually just a few days ago, I was bored & lazy and just asked chatgpt the same thing
@barnowlcom19 күн бұрын
I get 275. Does it need parentheses?
@cyberawm115819 күн бұрын
@@barnowlcom If you put the part of parenthesis inplace of 1, then you don't need it
@krishnachoubey864819 күн бұрын
Ah, yes. Actually I derived the same thing through some simple continuous fractions fuckery. You can also put the approximation obtained from the equation, back into the equation, to get a better approximation. Also, the equation can be expressed in a clean way like- √n ≈ (n + s²)/2s Where, s² ≤ n < (s+1)²
@Kiran_Nath13 сағат бұрын
√267 ≈ 16.344
@goldmathshow4 күн бұрын
use square root to calculate square root
@error_6o610 күн бұрын
I'm not sure if anyone's noticed this, but this method is actually mathematically equivalent to the visual method.
@opufy6 күн бұрын
That’s fun😮
@izzabelladogalini18 күн бұрын
Isn't this pretty much the same as using the the two known squares either side of the target as demonstrated in your other video?
@MathVisualProofs18 күн бұрын
Yep. Essentially the same but this one has a better justification (and provides justification for the other one for the most part)
@izzabelladogalini18 күн бұрын
@MathVisualProofs agreed, nearer to a technical proof
@beaumatthews64116 күн бұрын
Equivalent to (x^2+a^2)/(2a)
@KrasBadan14 күн бұрын
I just watched your previous video and it is exactly about what I was talking about in my previous comment damn
@deleted-something2 күн бұрын
(16+11/32)^2! (Without the factorial I guess)
@samiam696218 күн бұрын
Nerds!!!!!! I love you all
@insearchof909012 күн бұрын
Dear friend, Share me such formula for cube root as well.
@RohitSingh-rw8cz19 күн бұрын
I my only doubt is how did you plot the tangent equation?is it a general equation?
@undecorateur19 күн бұрын
Yes it is The tangent line of a function on a point a is described by the equation : y = f'(a) (x - a) + f(a)
@MathVisualProofs19 күн бұрын
The tangent line passes through the point (a, f(a)) and has slope given by the derivative, which is f’(a).
@RohitSingh-rw8cz18 күн бұрын
Ok i got it now thanks everyone This method is mostly good when your slope is ~0, high slope approximation will be give more inaccurate ans Am i correct?
@aadhvikguitarcovers65616 күн бұрын
This formula is obtained using taylor series. Although this is only a linear approximation, the taylor series gives you the formula for every degree
@belv176718 күн бұрын
newtons method and eulers method are better to approx.
@geraltofrivia942414 сағат бұрын
Not in one step like this one
@sajidrafique37513 күн бұрын
Thanks to Taylor Series
@algodoomarbleracing13 күн бұрын
i used the method to find the square root of 267 as shown at the end of the short. i got 16.34375
@Krageon-Offline6 күн бұрын
16+(11/32)
@muhtah673513 күн бұрын
Is the formula always the same The l(x) one I dont understand Pls help
@muhtah673513 күн бұрын
And I'm quite confused where some of the other stuff comes from
@randomdudeexe9 күн бұрын
This is the taylor series expansion
@MathVisualProofs9 күн бұрын
This is just the first order Taylor polynomial (which is the linear approximation). Taylor series is infinite series.
@Paul-s2r4t16 күн бұрын
The exact root is 5 * square root of 6.
@peterburch110813 күн бұрын
Why would you put a square root in a function which is supposed to simulate finding a square root?
@MathVisualProofs13 күн бұрын
The idea is you use the square root at a nearby known perfect square. That’s how the calculus works. So to find square root of x, you are using square root of a twice where root(a) is a known quantity.
@Somerandomchap19 күн бұрын
Can't you just put a McLaurin series and just evaluate it to, like, the fifth/sixth time?
@MathVisualProofs19 күн бұрын
Maclaurin series for root(x) isn’t possible. But this is the first order Taylor poly and we could do higher order Taylor polynomials as well but not sure the accuracy they give is worth it.
@Somerandomchap19 күн бұрын
@@MathVisualProofs Oh because d/dx[sqrt(x)]=x^(-1/2). That makes sense. :)
@MathVisualProofs18 күн бұрын
@@Somerandomchap :)
@johnpinckney72697 күн бұрын
Taylor series
@Fadhw18 күн бұрын
Make sense
@imaginaryunitlord18 күн бұрын
oh yeah you don't know sqrt(150) but you know sqrt(150) its a joke btw
@chinchang511714 күн бұрын
To be honest, I am not a fan of this method. square root of 150 is about 12 + 1/24(150-144). How are u going to work out 12 + 1/24(150-144)? U need to press the calculator, right? And if u are going to press the cal, y dun u press square root of 150 in the first place??
@MathVisualProofs14 күн бұрын
150-144 is 6. 6/24 is 1/4. So the answer is 12.25. No calculator needed
@brokedude999913 күн бұрын
What the Hell did You just say?? For those of Us that don't speak Advanced Nerd- Huh??