Square Root of 2, Newton's method vs Euler's method

  Рет қаралды 392,765

blackpenredpen

blackpenredpen

Күн бұрын

Approximating Sqrt(2), Newton's Method vs Euler's Method
Check out Quahntasy on Optical Tweezers, • Nobel Prize in Physics...
sqrt(2), original raw file (uncut, unedited, full version): • Sqrt(2), Newton's Meth...
Newton's Method in details: • Newton's method and Om...
Euler's Method in details: • Euler's Method (introd...
⭐️Please subscribe for more math content!
☀️support bprp on Patreon: / blackpenredpen
Guess what my first job was! • My First Job Story ,
My simple setup: 😃 • My Simple KZbin Setu... ,
Check out my site & social media
😃 blackpenredpen...
😃 / blackpenredpen
😃 / blackpenredpen
Thank you for supporting! You're awesome and I know it!
blackpenredpen | 曹老師

Пікірлер: 736
@quahntasy
@quahntasy 5 жыл бұрын
Thanks a lot, blackpenredpen. I can’t even begin to explain how much your help meant to me.
@moamenashraf7064
@moamenashraf7064 5 жыл бұрын
Quahntasy - Animating Universe expecting good content. subscribed
@inyobill
@inyobill 4 жыл бұрын
As soon as I finish commenting on how much I enjoyed this presentation, I'm going to check out your content. Props to BlackpenRedpen for the courtesy.
@vedants.vispute77
@vedants.vispute77 3 жыл бұрын
Nice a lot!
@misweet5542
@misweet5542 3 жыл бұрын
D i thatI
@simonmultiverse6349
@simonmultiverse6349 2 жыл бұрын
Try Newton's method in RATIONAL ARITHMETIC, i.e. all numbers are of the form p/q where p and q are integers. It gets astonishingly accurate, astonishingly quickly. In fact this is giving you the same answer which you had before, i.e. root(2) = 1.4142135.... It's just that the answer comes out as an integer divided by another integer. The sequence goes: 1/1 3/2 17/12 577/408 665857/470832. That last one has an error of 4.5 x 10^(-5) This sequence is IDENTICAL to what you would get in real numbers, i.e. 1 1.5 1.4166666667 1.414215686 1.414213562
@arjitbose7373
@arjitbose7373 5 жыл бұрын
Engineering Students: sqrt(2) = 1.414 = 1
@jeremyrixon150
@jeremyrixon150 4 жыл бұрын
sqrt(2) = 1.414 = 1 = sin(x)
@grevel1376
@grevel1376 4 жыл бұрын
sqrt(2)=1.414=1 1^2=2=1+1
@RB-cl8tc
@RB-cl8tc 4 жыл бұрын
sqrt(8)=2sqrt(2)=2.828=3=e=pi => e/pi = e/sqrt(8) = sqrt(8)/pi = 1
@luizfelipefranco5381
@luizfelipefranco5381 4 жыл бұрын
ice_SZN take sqrt(2) = 2, no way it won’t handle And don’t forget: g = π^2
@nabeelkhan7506
@nabeelkhan7506 4 жыл бұрын
No we don't do that
@neilgerace355
@neilgerace355 5 жыл бұрын
I use Newton's method as he had much better hair.
@mithileshwadurkar8809
@mithileshwadurkar8809 5 жыл бұрын
He looks like markiplier
@gloystar
@gloystar 5 жыл бұрын
Dude, what kind of bias is that LOL
@PauloZancoski
@PauloZancoski 5 жыл бұрын
Kkkkkkkkkkkk I agree with you
@hsslay3237
@hsslay3237 3 жыл бұрын
Nah man I won't believe that he actually had that log hair for all I know he could be the one using a wig which he takes off while sleeping
@aashsyed1277
@aashsyed1277 3 жыл бұрын
314 aka pi likes
@redbaron827
@redbaron827 5 жыл бұрын
Why do you have a thermal detonator in your hand
@Skandalos
@Skandalos 4 жыл бұрын
What? Isnt that a regular psy amp?
@rayniac211
@rayniac211 4 жыл бұрын
@@Skandalos Isn't it?
@tomctutor
@tomctutor 4 жыл бұрын
@@rayniac211 Is it not?
@leechen1441
@leechen1441 4 жыл бұрын
You're all wrong. He doesn't use a thermonuclear detonator. He is using a droid from the future which is telling him what to say to the camera.
@tomctutor
@tomctutor 4 жыл бұрын
Ah Ah, but it ties up one hand so he has to keep twiddling his pen colors around like a one-hand card shuffle, and it must get soar too! ✍
@inyobill
@inyobill 4 жыл бұрын
You remind me how much fun Math has been for me over my years. I was never a whiz, reached my level of incompetence at the advanced undergraduate level, but it's fun and interesting to see your, Mathologer, and a few others' discussions. I was born in 1948, 71 as of this comment.
@ThatLooksLikeARake
@ThatLooksLikeARake 2 жыл бұрын
happy 73rd birthday :)
@TheGeckoIsKing
@TheGeckoIsKing 2 жыл бұрын
I would love to talk to you sometime. What field did you study and where did it take you after school?
@inyobill
@inyobill 2 жыл бұрын
@@TheGeckoIsKing I Went to San Diego State 1966-1971 when the Computer Science department was one Fortran class in the Math Dept. Which, of course, I signed up for and loved. After graduation I sort of drifted around a bit trying to find an interesting position. I went back to school, taking several C. S. courses. My friend who worked for a conpany contracting software services to the Navy suggested I put my app in with them. I worked with them for a couple of years, becoming a hot-shit Cobol programmer (no kidding). I was invited to work directly for the Navy, doing Avionics Software Engineering. I did that for 34 years, mostly legacy systems coded in Assembly. It was great, even junior engineers participate in the entire process from system engineering to full-up testing. I do not Grok O. O. systems, they make little sense to me. Very long response, apologies for that.
@marztel9856
@marztel9856 2 жыл бұрын
@@inyobill that's sounds very interesting I bet that you have a lot of curious stories
@ThePharphis
@ThePharphis 5 жыл бұрын
IIRC newton's method basically doubles the precise number of digits at each step. It also has the advantage (in this situation) of being able to pick up where you left off - you can always add more accuracy by iterating for longer, but with Euler's you need to start over.
@Tranbarsjuice
@Tranbarsjuice 5 жыл бұрын
Little strange and unfair to compare two methods which are designed for two completely different things. Newton’s method - finds roots numerically Euler’s method - finds numerical solution to differential equations. Would have made more sense to compare Newton’s method to the secant method or some other numerical root solver :)
@angelmendez-rivera351
@angelmendez-rivera351 5 жыл бұрын
TranbärsJuice It is not unfair since he used both methods within their respective designed realms of application. I think the problem is not the comparison itself, but the rigor with which each method was applied.
@mohamedmagdy3602
@mohamedmagdy3602 4 жыл бұрын
@Herr Vorragend I understood what you said after reading it three times.
@kyrlics6515
@kyrlics6515 4 жыл бұрын
@Herr Vorragend lollll
@BruceBalden
@BruceBalden 4 жыл бұрын
Maybe look at Mueller’s method or Sidi
@andreimiga8101
@andreimiga8101 4 жыл бұрын
@Herr Vorragend why don't you delete the extra comments?
@membrillo1896
@membrillo1896 4 жыл бұрын
Lmao just draw an unit square and measure the diagonal with a ruler
@blackpenredpen
@blackpenredpen 4 жыл бұрын
Been there, done that
@pendragon7600
@pendragon7600 4 жыл бұрын
You got a ruler that can measure to 5 decimals?
@membrillo1896
@membrillo1896 4 жыл бұрын
@@pendragon7600 you don't? What a pleb
@pendragon7600
@pendragon7600 4 жыл бұрын
@@membrillo1896 I don't need one because I can measure perfectly by sight alone
@Mrwiseguy101690
@Mrwiseguy101690 4 жыл бұрын
@@pendragon7600 You can use a compass and draw a circle with radius 1, then measure the length of the cord between two points separated by 90 degrees.
@brianl80371
@brianl80371 3 жыл бұрын
Start with 1.4 squared = 1.96. Then 2 = (1.4 + epsilon)^2 = 1.96 + 2.8 epsilon + epsilon^2, throw out last term. Then epsilon = 0.04/2.8 = 0.0143 So then 1.4 + epsilon = 1.4143 after one iteration. Keep going . . . This method actually does simplify to the Newton method but is more intuitive, in my opinion.
@Keithfert490
@Keithfert490 2 жыл бұрын
Yeah, as you pointed out, this is just Newton's method using a starting point of sqrt(1.96)=1.4 instead of sqrt(1)=1
@zrfireks
@zrfireks 5 жыл бұрын
Another great method I found, with iteration: Say you wanted the square root of A. x = sqrt(A) x^2 = A x = A/x 2x = A/x + x x = (A/x + x)/2 So the formula we'd use is x_n = (A/x_{n-1} + x_{n-1})/2 Then iterate, begin maybe with x_0 = 1 or something you're sure is close, easy enough. Using a calculator, you just put in your first guess, then '=' to set your initial ANS value, then type the formula, using 'ANS' instead of 'x'. Then just spam that '=' key until the result in your calculator stops changing. Done. Extra, play around with a 'b' variable where we can say x = A/x (b+1)x = A/x + bx x = (A/x + bx)/(b + 1) x_n = (A/x_{n-1} + bx_{n-1})/(b + 1) 'b' can be anything
@blackpenredpen
@blackpenredpen 5 жыл бұрын
Thanks of the comment. Yes, I actually know about that. That will be my continuation video to my inf. cont. fraction of sqrt(2) video and my Omega constant video. www.wolframalpha.com/input/?i=1%2B1%2F(2%2B1%2F(2%2B1%2F(2%2B1%2F(2%2B1%2F(2%2B1%2F2))))
@grawuka6900
@grawuka6900 5 жыл бұрын
Your first formula is exactly the same as the Newton method, the extra formula loses the quadratic convergence rate so i would avoid it
@Koisheep
@Koisheep 5 жыл бұрын
In fact, that's called a fixed point method, because you write x=f(x) for some function f. In your case, f(x)=(A/x+bx)/(b+1)
@EnteiFire4
@EnteiFire4 5 жыл бұрын
It's the Babylonian method! The way I visualize it is with a "starting rectangle" of area A and with a base of length x0. That means that the height is A/x0. If you take the average of both side, your new value (let's name it x1) will be between x0 and A/x0, and A/x1 too! So you have another rectangle with base x1, height A/x1 and an area of A, where the base and the height are closer to each other than in our starting rectangle. So each time you repeat that process, you get a rectangle with a base and a height closer to each other. In other words, your rectangle gets "squarier".
@zrfireks
@zrfireks 5 жыл бұрын
I love that way of visualising it!
@alffox2838
@alffox2838 4 жыл бұрын
Much prefer the Casio Method.
@examination4088
@examination4088 3 жыл бұрын
me too
@TehFilmFanatic
@TehFilmFanatic 5 жыл бұрын
Euler's Method isn't used for this purpose though; you got an inaccurate estimate for sqrt(2), but you also got estimates for the sqrt of 1.2, 1.4, 1.6 and 1.8. Newton's Method got you an accurate estimate of sqrt(2), but you learned nothing about the other values. Euler's Method and Newton's Method are used for different problems, and it's not fair to apply Euler's Method to a roots problem and then be disappointed when it doesn't produce as accurate a result as you would have hoped with that step size.
@blackpenredpen
@blackpenredpen 5 жыл бұрын
Luke Longworth (hehe, I know, that's the secret. This video is for both math and entertainment purpose. )
@angelmendez-rivera351
@angelmendez-rivera351 5 жыл бұрын
It is not unfair, as he actually used each method within their own realm of application, and he obtained different consequences as a result. Euler’s method can be refined.
@zhangjackson7837
@zhangjackson7837 5 жыл бұрын
@@blackpenredpen 你好喜欢用括号啊
@blackpenredpen
@blackpenredpen 5 жыл бұрын
Zhang Jackson 哈哈 被發現了
@ishworshrestha3559
@ishworshrestha3559 4 жыл бұрын
Yuu
@nickmichael7206
@nickmichael7206 5 жыл бұрын
Try using both methods for a system of ordinary differential equations, and try using RK45 instead of vanilla Euler. That's where Euler methods are most effective. Newton's method and other fixed point iterative methods are pretty much the best for most solvers in numerical analysis.
@radadadadee
@radadadadee 2 жыл бұрын
Both shine at different objectives. Newton is great for finding roots, RK is great for numerical integration.
@MathIguess
@MathIguess 4 жыл бұрын
For some reason, I find it really cool when you say "well well"... it feels like you're a detective and you just figured out a big part of a case xD really cool!
@chandankar5032
@chandankar5032 5 жыл бұрын
You are doing too much effort for youtube...3-4 videos in 24hours... Hats off to you... Hopr u reach a million soon
@bradryan8071
@bradryan8071 4 жыл бұрын
For "Well Behaved" functions ( ie. polynomials, trig, etc ) Newton's Method is excellent at approximating the root very quickly, especially if you do a bit of work in advance and smartly come up with a good initial value. For example: solve ( cos(x) = x ) , when you draw a graph of cos(x) and y= x together, you can see that they cross each other to the left of x = 1. Thus an initial guess of x = .8 will zero in on the root of .739 085 very quickly. Love Newton's Method for getting roots fast.
@soubhagyarajkhandual
@soubhagyarajkhandual 2 жыл бұрын
Those "Well behaved" functions need an actual name. They have so many names like good functions or nice functions etc.
@carultch
@carultch Жыл бұрын
@@soubhagyarajkhandual I think infinitely differentiable analytic function is the term. Infinitely differentiable means no order of differentiation ever has a discontinuity. Analytic means that it is possible for a Taylor series to model the function. An example of a non-analytic function is a function where all derivatives equal zero at the point in question, and the Taylor series would give you a constant.
@lorenwilson8128
@lorenwilson8128 4 жыл бұрын
Very nice demonstration of the two methods. I solve a lot of cubic equations (equations of state), which are solved even faster using a third order Newton's method. This method is attributed to Hailey of Hailey's comet fame, and uses the first and second derivatives. The generalized method is known as Householder's method.
@tomctutor
@tomctutor 4 жыл бұрын
Interesting historical context thanks
@kennethgee2004
@kennethgee2004 5 жыл бұрын
It seems that Euler's formula needs to be integrated because h needs to be 1/ infinity to give an very tiny step. that looks exactly like how we take a limit and figured out to perform integrations. While Newton's formula is an iterative process in which you can stop at any atribary point. The interesting part is that as the iterations tend toward infinity that the rate of change in the approximation tends towards zero. There seems to be some connection between the two. Is there a hybrid formula that uses both concepts?
@_DD_15
@_DD_15 5 жыл бұрын
Recommended to my dog. He said you are cool ;) Still not at his level tho.
@evanclark8932
@evanclark8932 5 жыл бұрын
Wow we just learned Newton's method in class today.
@DeGuerre
@DeGuerre 4 жыл бұрын
Also worth looking at Goldschmidt's method. Let Y be your initial approximation to sqrt(n). Start with: x0 = n/Y, y0 = 1/2Y Then iterate: ri = 0.5 - xi yi x_{i+1} = xi + xi * ri y_{i+1} = yi + yi * ri Then the x's will converge to sqrt(n) and the y's will converge to 1/2sqrt(n). This is interesting because n doesn't appear anywhere in the iteration loop!
@annaisabanana6848
@annaisabanana6848 5 жыл бұрын
I like the method of: sqrt(2) = 1 + a 2 = (1+a)^2 2 = 1 + 2a + a^2 Since a is small, ignore a^2 2 = 1 + 2a a = 1/2 sqrt(2) = 1.5 then repeat like sqrt(2) = 1.5 + b solve for b after ignoring b^2 term, continue doing this to get some very good rational approximations of sqrt2 that approach it very fast (4 iterations and you are already very close)
@EnteiFire4
@EnteiFire4 5 жыл бұрын
In the end, it should give the same this as Newton's method. sqrt(2) = x_n + h 2 = (x_n + h)^2 2 = x_n^2 + 2*h*x_n +h^2 Since h is small, ignore h^2 2 = x_n^2 + 2*h*x_n h = (2 - x_n^2)/2x_n So x_(n+1) = x_n + (2 - x_n^2)/2x_n If you factor out -1 from the annoying fraction to get x_(n+1) = x_n - (x_n^2 -2)/2x_n Which is exactly Newton's method!
@Israel220500
@Israel220500 5 жыл бұрын
@@EnteiFire4 Yes, it is actually the babilonian method. The results are the same, but the particular case of finding the square root was discovered thousands of years before Newton.
@robertveith6383
@robertveith6383 2 жыл бұрын
@@EnteiFire4 The 2x_n has to be inside grouping symbols.
@Rtong98
@Rtong98 5 жыл бұрын
Newton will win for sure, got good vibes
@gheffz
@gheffz 4 жыл бұрын
Ha! Yes, I figured it was Newton, too ... but both incredible geniuses... especially considering the tools and knowledge of the day they had to work with.
@sammyfromsydney
@sammyfromsydney 2 жыл бұрын
Though I've never done a numerical analysis course, I knew Newton's approximation would win. I was first exposed to it as an adult through learning about the Fast inverse square root in the source code for the Quake computer game.
@cfgauss71
@cfgauss71 5 жыл бұрын
Sir Isaac Newton delivers the knockout punch!
@ffggddss
@ffggddss 5 жыл бұрын
As you were posing this contest, all I could do was smile and think, "This is gonna be a blowout!!" Fred
@blackpenredpen
@blackpenredpen 5 жыл бұрын
ffggddss : ) Yay!
@timross3841
@timross3841 2 жыл бұрын
Basically, you have 5 approximations with the Newton method, but only 1 with the Euler method. The second approximation would be Euler with a smaller step size. What I am getting at is, I am a big fan of Aitken's delta^2 process. This requires a series of estimates that will converge to the target. The Euler steps here don't converge; they only converge as a series of estimates taken with progressively small step sizes. Aitken's method for accelerating convergence can produce astounding results. For example, if you apply it iteratively to estimates of pi/4, you can get to 10+ digits using only odd numbers through 31 or 33 (e.g. 1 - 1/3 + 1/5 - 1/7 ...) You can get to pi^2/6 with the Bessel function with only a few thousand base iterations, if you take the sequence of estimates as powers of 2; e.g. 1, 2, 4, 8, 16, 32 etc to 1024 or 2048 - and then apply Aitken iteratively to those estimates. (Normally, you get 1 digit per power of 10, so 6 digits would require a million or more terms of the base sequence.) Here, I would suggest taking Euler using h=1, 0.5. 1/3, 1/4, then 1/5. Then I would compare the results of the convergences when accelerated with Aitken. Maybe I will do that, but not now.
@gheffz
@gheffz 4 жыл бұрын
They both do!!! Thinking of the tools they had to work with ... what an incredible feat by both ... both exceptional geniuses... with the pendulum leaning towards Newton in this round.
@abebuckingham8198
@abebuckingham8198 2 жыл бұрын
If you know the function and the derivative finding the zero isn't so hard. When all you know is the differential equation you can't even use Newton's method. Euler's method is more general and useful in application for this reason.
@markgigiel2722
@markgigiel2722 4 жыл бұрын
The 1.414 value is also used in sinusoidal electrical power calculations. RMS (root mean square) effective power vs Peak power. Certain numbers are magical.
@yigiteldek
@yigiteldek 2 жыл бұрын
fellow electric student here 👋
@ahad-pubgm6745
@ahad-pubgm6745 5 жыл бұрын
Your videos are great and informative. Keep up the good work!
@mohghz1840
@mohghz1840 5 жыл бұрын
Wow, today I have studied the Newton method in Numerical Analysis class , and by chance I see this video. Great video 👍
@nafrost2787
@nafrost2787 4 жыл бұрын
If you know ln(2), there is another way you can approximate sqrt(2) with euler's method, use the function y = 2^x which at x=0.5 equals sqrt(2). It's defining differential equation is y' = y*ln(2) and you know that y(0) = 2^0 = 1, so if you know ln(2), this is also a way to approximate sqrt(2). I programmed all 3 ways on python, euler's method with y=2^x is more accurate than with y=sqrt(x), but still newton's method wins.
@williambunter3311
@williambunter3311 4 жыл бұрын
I hardly understood a word, but I found this utterly fascinating!!
@chip.rollinson
@chip.rollinson 5 жыл бұрын
How about using the partial fractions from the continued fraction for sqrt(2) that you demonstrated 3 weeks ago? 1, 3/2 (1.5), 7/5 (1.4), 17/12 (1.416666), 41/29 (1.41379), 99/70 (1.41429), 239/169, (1.4142), 577/408 (1.4142156), 1393/985, 3363/2378, 8119/5741, 19601/13860, 47321/33461, 114243/80782, 275807/195025, 665857/470832.... wait, Newton's Method starting with 1 hits a few of these but much much quicker. Newton for the win!
@blackpenredpen
@blackpenredpen 5 жыл бұрын
Chip Rollinson yup. I plan to do that too in a few weeks.
@PsychoticusRex
@PsychoticusRex 5 жыл бұрын
Look up "Numerical Methods", it's a core computer science course and is typical of modern calculative approaches to projections and machine learning. If you can't do something algebraically, you're stuck with numerical techniques. good luck. It's as Aid-Climbing is to free climbing, certain win, not graceful.
@adambilge2834
@adambilge2834 4 жыл бұрын
It was at about this level of math when I decided to be a history major.
@magicianwizard4294
@magicianwizard4294 4 жыл бұрын
lmfao
@bobnavonvictorsteyn9017
@bobnavonvictorsteyn9017 3 жыл бұрын
My guy is clearly interested in math. Why do you think he got this far?
@okaro6595
@okaro6595 5 жыл бұрын
Here is a way to calculate the square root on a calculator without using the square root. First enter 1 and press = (or EXE). then enter (ans+xx/ans)/2 where xx is the number you want to take the root of and then press = a few times. This requires a calculator with line entry. Lets say yu want to calculate sqrt 2, you get 1.5 1.416666 1.414215686 1.414213562 and the last doe snot change anymore. You can of course start with a better estimate. I thought this method would be good if you have a calculator without a square root bit I found simple squaring of estimates and adjusting them faster.
@bendriver3242
@bendriver3242 3 жыл бұрын
This is the same as the NR method in the video. Also called Heron’s method and familiar to the ancient Greeks.
@dansf2
@dansf2 2 жыл бұрын
I have a TI-30 from my high school days and I pressed 2 and the sqrt key, and that was much faster than either approach.
@blue_blue-1
@blue_blue-1 5 жыл бұрын
Euler will be better. - Wrong. But am I right that it is the root-sign, which lets you think of a wing?
@jasperlanda5276
@jasperlanda5276 2 жыл бұрын
Regardless of the fact that both methods have different purposes, the choice for x0 and by extension the convergence area are relevant. Of course the initial guess must be somewhat accurate, though choosing x0 < 0 would result in convergence to -sqrt(2) instead, to give an example
@teambellavsteamalice
@teambellavsteamalice 2 жыл бұрын
I did expect Euler's to be nowhere near the first four steps but be pretty close on the fifth x=2.0 step. Did you have a video on approximating roots? It was very easy (for roots below 1000) with this nice trick. You just need to know the squares of 1-32. The formula is: y1 = y0 + ∆ / 2*y0 with y0^2 the closest squared number and ∆ = y^2 - y0^2 Take y=√200. y0 = 14 and ∆ = y^2 - y0^2 = 200 - 196 = 4 y1 = 14 + 4 / 2*14 = 14 1/7 You can derive this by writing y as y0+f and squaring this. y^2 = (y0+f)^2 = y0^2+f^2+2*y0*f f
@russchadwell
@russchadwell 5 жыл бұрын
Did Newton actually write it that way, or was this done somehow with his favorite geometric method instead?
@gloystar
@gloystar 5 жыл бұрын
Great video as always! .. I'd like to see Newton's method for finding imaginary roots of polynomials (say 3rd degree for instance) if you please.
@walterbushell7029
@walterbushell7029 4 жыл бұрын
The expression for Newton's Method for sqrt can be simplified to x[n+1]=(x[n]+c/x[n])/2 where c is the number of which we want the square root. In this form the method is almost intuitive. Also for floating point computations, we have a quick method of .getting a great first approximation. Mearly cut the exponent in half. Also in the NR method the error is determined only by the last step
@alexhenson
@alexhenson Жыл бұрын
Euler's main use is approximating curves, not finding solutions (and from that you can also solve diff. equations). I think Newton's method is the fastest method for this, right?
@muskyoxes
@muskyoxes Жыл бұрын
"Is Newton going to win?" - he already gave you twice as many digits as you wrote down, so yeah
@ΕυσταθίοςΔραγώνας
@ΕυσταθίοςΔραγώνας 4 жыл бұрын
Winer heron with heron's formula : √a=(n+a/n)/2
@Soupie62
@Soupie62 4 жыл бұрын
Start with X=1, Y=1, and h=1. Euler gives X = 1.5. Square to give Y = 2.25. and h= -0.25. Using this variation, h gets smaller each time around, and you can stop when you have the accuracy you want.
@calculus988
@calculus988 Жыл бұрын
I have never seen anything this beautiful ❤
@MasterMindmars
@MasterMindmars 4 жыл бұрын
And the winner is... Newton. Very interesting explanation and comparison. Thanks
@_QWERTY2254
@_QWERTY2254 Жыл бұрын
newton's method seems like a pd (proportional-derivative) controller algorithm, there is something that i barely remember about approximating a computer simulation, it was like 1/6*X1+2/6*X2+2/6*X3+1/6*X4 = X2 in short summing the values that computed using what we got at that point with 1,2,2,1 coefficients and getting our next value... maybe it can approximate quicker than that
@DilipKumar-ns2kl
@DilipKumar-ns2kl 3 жыл бұрын
It would have been a nice thing , if you had included a third method! It is a balancing method. It simply states:- X(n+1)= 1/2{X(n)+(N/X(n)} In present case, N=2, put n=1 & X(1)=1 X(2)=1/2{1+2/1}=1.5 X(3)=1/2{1.5+2/1.5}=1.4166666666 X(4)=1.414216018454 X(5)=1.414213562375 X(6)=1.41421356237 Above is the value of √2. Please comment.
@numbdigger8558
@numbdigger8558 2 жыл бұрын
This is the same as newton's method...
@therealrealludwigvanbeethoven
@therealrealludwigvanbeethoven 2 жыл бұрын
You're using Newton's method.
@angelmendez-rivera351
@angelmendez-rivera351 5 жыл бұрын
The complaints that comparing both methods to each other as they are designed for different applications is an invalid complaint. He used both methods fairly, within their respective realms of application. Yes, Euler’s method is designed to solve differential equations, but solving the differential equation that he wrote on the board is identical to finding the square root of 2 in this case. In fact, as he himself clarified in the video, the problem is not the usage of the method, but rather the step size that he chose for the method. You must understand both methods have different convergence rates. Perhaps, next time, before complaining, pay more attention to the video instead of saying nonsense and criticizing a perfectly fine video.
@DxRzYT
@DxRzYT 2 жыл бұрын
I used Euler's method and has the value of h as 0.01, thus needing to use the formula 100 times. After doing this, i found the value of sqrt(2) to be approximately 1.414827967. After using Newton's method 3-4 times, it was clearly more accurate than Euler's method. I'll have to go with Newton on this one 👀
@williamwong5627
@williamwong5627 2 жыл бұрын
My method is easy and accurate. I ask my teacher CASIO.
@GodwynDi
@GodwynDi 2 жыл бұрын
I think Euler will win, but I prefer the Newton method. Being able to start the function and just do iterations to get closer and closer just seems more natural to me.
@ISoldßinLadensViagraOnEbayఔ
@ISoldßinLadensViagraOnEbayఔ 11 ай бұрын
No, WHO WINGS?
@marshalls36
@marshalls36 2 жыл бұрын
90 degrees traingle with twod sides 1000 mm, slope = 1414.x mm
@Mrwiseguy101690
@Mrwiseguy101690 4 жыл бұрын
There's also the binary search method. Consider the interval [a,b] where f(a) is a different sign than f(b). Find the midpoint of the interval, if the sign of the function at that x value is the same as the sign of f(a), then the new interval becomes [f((a+b)/2),f(b)], otherwise the new interval becomes [f(a),f((a+b)/2)]. The final answer is the midpoint of the final interval. Starting with a = 1 and b = 2: [1,2] -> [1,1.5] -> [1.25,1.5] -> [1.375,1.5] -> [1.375, 1.4375] -> [1.40625, 1.4375], so the final answer is 1.421875. It's not as accurate, but it requires no calculus and it gives you more control over how accurate you want the approximation to be. Since the size of the interval halves every iteration, you get 1 decimal digit of precision for about every 4 iterations (because log_2(10) is about 3.3).
@sevret313
@sevret313 5 жыл бұрын
Are there any function where doing it one way is easy and the other way hard, and vice versa? Given that you find different derivatives?
@thatkindcoder5347
@thatkindcoder5347 3 жыл бұрын
Sad brain noises
@harshsrivastava9570
@harshsrivastava9570 5 жыл бұрын
Unlisted? Damn, I clicked fast!
@mencken8
@mencken8 2 жыл бұрын
That’s what I said to myself the minute I jumped out of bed this morning, “Newton or Euler?” Because I just had to know the square root of bleedin’ two before I had any coffee…..
@rob876
@rob876 4 жыл бұрын
x^2 = 2 x = 2/x 2x = x + 2/x x = 0.5(x + 2/x) x[n+1] = 0.5(x[n] + 2/x[n]) ...Newtons method derived not using calculus.
@Soupie62
@Soupie62 4 жыл бұрын
If you started with a closer guess for Euler, the increments would be smaller and the final answer would be better. Start with: X = 2.25, Y = 1.5 and do 5 steps of -0.05. Or: X = 1.96, Y = 1.4 and do 5 steps of 0.008 Also- Newton's method is the best known, but Halley's method gives more digits per iteration.
@DaanSnqn
@DaanSnqn 5 жыл бұрын
I always recommend you for mathematical background to people trying to understand quantum mechanics. You forgot these.
@lawrencejelsma8118
@lawrencejelsma8118 Жыл бұрын
What about Pythagoreans Theorem saying walking northwest at π/4 or 45 degrees any distance means moving the square root of that distance north or east formulations? They are all geometric cos(∆=π/4) and sin(∆=π/4) geometrically finding those positive only distance square roots.
@lemaxdeculture-chainesecon6415
@lemaxdeculture-chainesecon6415 4 жыл бұрын
Congratulations from France
@shadrachhamner1439
@shadrachhamner1439 2 жыл бұрын
Awesome the connection between equations and where they come from should be made while we are learning to solve them
@mehrdadmohajer3847
@mehrdadmohajer3847 4 жыл бұрын
Hi. it was interesting. i´ d say EULER . the fact it is not answering , because of value of " h ". As we know dx = 0 in Eulers formula, & dx > 0 according to Newtons . So by appling " h " to the Eulers equation, you get the wrong result.
@hamzagezici1731
@hamzagezici1731 4 жыл бұрын
I do that to find squareroot of numbers For example=Sqrt(2) (Sqrt(2) ×10^n)/10^n (n is how many digit you want after the point) For example n=2 (Sqrt2 × 10^2) / 10^2 Sqrt (20000)/100 (sqrt 20000=《141-145》) Take 141 141/100=1,41
@phonixausderasche538
@phonixausderasche538 2 жыл бұрын
The Heron-Iteration-Method works much simpler: x1 = 0.5 * (x0 + a/x0) => x2 = 0,5(x1 + a/x1) => x3 = … and so on! [a = x^2]; End if x(n) = x(n-1)
@edgarbonet1
@edgarbonet1 2 жыл бұрын
This is exactly equivalent to Newton's method applied to square roots. Only Newton's method is more general than only computing square roots.
@bartoszwojtowicz8770
@bartoszwojtowicz8770 5 жыл бұрын
I like approximating it this way: Let's choose first term somewhat close to true value - let's say x=2. Then we just iterate f(x) = 1/x + x+2. I believe it's using Banachs fixed point theorem. The inverse might be hard to calculate without calculator tho
@ditang1162
@ditang1162 2 жыл бұрын
Oldton: I pick starting point 0 BGM: To be continued
@Alvar2398
@Alvar2398 2 жыл бұрын
Newton ALWAYS wins (if it converges XD) Edit: Euler's method is just not made for calculating specific values, just for integrating a differential equation. Nevertheless, I would've never thought of using it like this. Really cool video!
@tadghie6193
@tadghie6193 Жыл бұрын
You win this time Newton, Euler gang will be back soon!
@tomscott3
@tomscott3 4 жыл бұрын
euler was the greatest mathematical mind of all time
@erik-ic3tp
@erik-ic3tp 4 жыл бұрын
Why him? Why not Archimedes or Euclid? :)
@RipleySawzen
@RipleySawzen 5 жыл бұрын
Seeing how Newton's works, it's going to be better because his method gets more precise as you keep stepping, while Euler's method compounds the imprecision of the previous steps
@KingGisInDaHouse
@KingGisInDaHouse 5 жыл бұрын
Here's how I do it. 1)y=x^2 dy/dx=2x deltaY/deltaX~2x deltaX/deltaY~1/2x deltaX~deltaY/2x ~ indicates approximately equal to due to lack of keyboard features 2) for sqrt of 2 say y=2 and guess x let's say x=1.5 Y(1.5)=2.25 deltaY=2-2.25=-.25 deltaX~-.25/2(1.5) deltaX~-1/12 X+deltaX~1.5-1/12=1+5/12=1.4167 Use x+deltaX as your new x value and keep doing the process. It's the same as Newtons method but with different notation
@robertveith6383
@robertveith6383 2 жыл бұрын
That would be 1/(2x), because of the Order of Operatiions. And that would be deltaX ~ -.25/[2(1.5)], for the same reason.
@mychevysparkevdidntcatchfi1489
@mychevysparkevdidntcatchfi1489 5 жыл бұрын
What happened to Raphson?
@wordsexplained7565
@wordsexplained7565 5 жыл бұрын
Chevy SparkEV Newton was having a case with Raphson, he was a man that like Descartes got a lot of trouble to end his "college", Newton as I said had the case with him and to help his good friend rise in life, told to the royal society that Raphson created the method, after a few years Euler was studying the books that came from the europe math and found this method, the conclusion he got was that Raphson didn't discovered the method, so the famous man called this method not from Raphson, but " Newton-Raphson method"
@mychevysparkevdidntcatchfi1489
@mychevysparkevdidntcatchfi1489 5 жыл бұрын
Video omits Raphson is my q.
@DjVortex-w
@DjVortex-w 5 жыл бұрын
Show how to approximate the Lambert W function using Netwon's method.
@blackpenredpen
@blackpenredpen 5 жыл бұрын
WarpRulez I did already. Check description. I showed how to approximate W(1)
@gloystar
@gloystar 5 жыл бұрын
I think he already did that in an other video if I recall correctly. Not sure though.
@igoranisimov6549
@igoranisimov6549 2 жыл бұрын
Euler method is "initial value problem". One could use higher fourth order Runge-Kutta method
@undefound8954
@undefound8954 3 жыл бұрын
Best method used by students of 2020-21 --> calculator
@davidalexander4505
@davidalexander4505 2 жыл бұрын
I think I prefer Euler's method because it requres less knowledge about the function. All we need is an ODE and an initial condition. Thanks for this video, this explains a bit better how it's possible to numerically solve ODEs!
@BloobleBonker
@BloobleBonker 3 жыл бұрын
Yay! Three cheers for Newton
@tincanmaniac1931
@tincanmaniac1931 4 жыл бұрын
Thanks man. I missed both of these in IB HL because I was sick.
@chimetimepaprika
@chimetimepaprika 5 жыл бұрын
This is awesome! Sweet comparison!
@blackpenredpen
@blackpenredpen 5 жыл бұрын
: )
@toferg.8264
@toferg.8264 5 жыл бұрын
10/7 ~~ 2^0.5 100/49 ~~ 2
@user-vx1wt4hb5l
@user-vx1wt4hb5l 4 жыл бұрын
Now just prove 2^0.5 is rational and you're done
@ytrichardsenior
@ytrichardsenior 4 жыл бұрын
Good tutorial.. Very complete
@nikitakipriyanov7260
@nikitakipriyanov7260 4 жыл бұрын
Euler's method like this will overshoot. You'll get a value larger than the real value. This is because on each step you approximate function with its tangent line, and we know that this estimate on each step will lie over the real function. On each step this error will accumulate. It is kinda strange to see how someone calculates numerical value of a function by numerically integrating its derivative (while there were other, much better methods to do so). Let's do Runge-Kutta of order 4 then! By the way, you could have been simplified Newton's step function to the xn = xp/2 + 1/xp. This will immediately give us a series of rational approximations to the sqrt(2): 1, 3/2, 17/12, 577/408, et cetera. This Newton method is what actually is used by computers to calculate square roots. The step function they use is: xn = (xp+a/xp)/2, where a is the value whose root you're searching for.
@EAtheatreguy
@EAtheatreguy 3 жыл бұрын
I think the reason why Newton's method won out is simple. With Euler's method, your bad approximations compound as you do more work, getting you further and further away from the original function. With Newton's method, your bad approximations turn into better and better approximations as you plug the new result back into the formula.
@boguslawszostak1784
@boguslawszostak1784 2 жыл бұрын
The reason is simple: the example is specially selected for Newton's method to win. Newton's method calculates one value using the value of the function and derivative at the points obtained in the following steps. This is often very difficult or very laborious. Euler's method computes the approximate value of the function at EVERY point (x0 + h * n) using the differential equation y '= F (x, y), which value is often easier to calculate. Just try both methods to compute sqrt (x) for x = 1,2, 1,4,1,6, 1,8, and 2 to see why Newton's method won. In order to achieve the assumed accuracy, the Euler method must compute the values of the function at all intermediate points without using a formula assigning a value, which is sometimes a disadvantage but is often an advantage. For example, Newton's method of calculating the value of exp (1) shows the problems, the Euler method will simply use the equation y '= y
@adamp9553
@adamp9553 4 жыл бұрын
Newton's method is the simplest and converges the fastest-doubles in accuracy every step. I've used the modified divide and average method since I was a kid. :)
@claytonbenignus4688
@claytonbenignus4688 5 жыл бұрын
I like the way you "fast forward" between steps. Nothing worse than tedious calculation.
@jimschneider799
@jimschneider799 3 жыл бұрын
I tried this doing four-point Runge_Kutta, and even that only gave 6 correct digits at five steps, while Newton's method gave 24. The moral of the story - if you have a well-behaved function with a well-behaved derivative, it's tough to beat Newton's method.
@saultube44
@saultube44 4 жыл бұрын
Win 8.1-bit Calculator says, sqrt(2)=1.4142135623730950488016887242097, so Euler since X3, 5 correct decimals, the rest are unnecessary just for more precision, interesting, didn't know about these Methods. I think the key difference is that Euler uses derivatives and that are like finite elements or Integration method, you need very small and lots of points to make a good approximation, while Newton was just following the function on its tangent point, much more direct and precise.
@helloitsme7553
@helloitsme7553 5 жыл бұрын
How I would do it cause I'm not that creative: 1^2=1, 2^2=4. Mm it must lay between 1 and 2. How about 1.5? 1.5^2=2.25 so it's between 1 and 1.5 what about 1.3? And so on
@zwz.zdenek
@zwz.zdenek 5 жыл бұрын
1. It's slower, 2. you take the assumption that the function is growing for granted.
@helloitsme7553
@helloitsme7553 5 жыл бұрын
@@zwz.zdenek i didnt say my method is good 😂 but d/dx(x^2)=2x which is always positive for positive x so it is always increasing
@uthoshantm
@uthoshantm 5 жыл бұрын
That's called binary search. You roughly need 10 iterations for every two additional decimal accuracy.
@tantarudragos
@tantarudragos 5 жыл бұрын
@@uthoshantm this, you are quite literally using the textbook deifinition of binary search
@bramvanreusel4687
@bramvanreusel4687 2 жыл бұрын
Newton converges quadratically, meaning the amount of correct numbers DOUBLES every step. Euler’s method isnt even necessarily numerically stable with the current stepsize (i didnt check), meaning it is barely a stable way to even approximate sqrt(2). The smaller stepsize is really important
@vj3565
@vj3565 2 жыл бұрын
Excellent video!
@maskedman8368
@maskedman8368 4 жыл бұрын
who else thought the video wasnt of balckpenredpen until this man appeared😂🤣
@WolfgangBrehm
@WolfgangBrehm 2 жыл бұрын
Newton has quadratic convergence, so not knowing anything about Eulers method I guess Newton is going to win because that's hard to beat.
@imsounak19
@imsounak19 Жыл бұрын
Expectation:- I love Newton, I'll use Newton's Method. Reality:- If I have a calculator, I will use neither 😂😂😂
@tv..6531
@tv..6531 3 жыл бұрын
루트 2의 근사값은 [조화평균
@ddikodroid
@ddikodroid 5 жыл бұрын
the music is relaxing
@reidflemingworldstoughestm1394
@reidflemingworldstoughestm1394 2 жыл бұрын
I think I would integrate the derivative of y=root(x) from 0 to 2.
Newton's method (introduction & example)
20:53
blackpenredpen
Рет қаралды 189 М.
A Proof That The Square Root of Two Is Irrational
17:22
D!NG
Рет қаралды 6 МЛН
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1,1 МЛН
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 119 МЛН
Самое неинтересное видео
00:32
Miracle
Рет қаралды 2,7 МЛН
POV: Your kids ask to play the claw machine
00:20
Hungry FAM
Рет қаралды 18 МЛН
First time solving an A-Level maths exam! (90 minutes, uncut)
1:31:13
blackpenredpen
Рет қаралды 192 М.
Newton's method and Omega Constant
21:58
blackpenredpen
Рет қаралды 254 М.
so you want a VERY HARD math question?!
13:51
blackpenredpen
Рет қаралды 1 МЛН
if x+y=8, find the max of x^y (Lambert W function)
12:59
blackpenredpen
Рет қаралды 738 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 5 МЛН
life changing quadratic formula
10:46
Dr Peyam
Рет қаралды 1,5 МЛН
e to the pi i for dummies
15:51
Mathologer
Рет қаралды 3,3 МЛН
Why π^π^π^π could be an integer (for all we know!).
15:21
Stand-up Maths
Рет қаралды 3,4 МЛН
my all-in-one calculus question (uncut)
18:13
blackpenredpen
Рет қаралды 235 М.
АЗАРТНИК 4 |СЕЗОН 2 Серия
31:45
Inter Production
Рет қаралды 1,1 МЛН