Lagrange Interpolation

  Рет қаралды 30,452

Dr Peyam

Dr Peyam

5 жыл бұрын

Lagrange Interpolation Formula
In this video, I present the extremely neat Lagrange Interpolation Formula, which gives a clean formula for a polynomial that goes through given points. And I do this purely using linear algebra techniques, which illustrates how powerful this subject actually is!
For instance, here I find the polynomial of degree 2 that goes through (1,2), (2,3), and (4,11).
It's not too good to be true - it's too good and it's true! Enjoy!
Check out my Vector Spaces playlist: • linear algebra vector ...
Subscribe to my channel: / drpeyam

Пікірлер: 85
@Ensivion
@Ensivion 5 жыл бұрын
this is a neat way to construct any degree polynomial, super intuitive the way presented it but I could see how it's confusing if you write it out abstractly
@fernandobezerrademenezes1622
@fernandobezerrademenezes1622 3 жыл бұрын
Highly instructive. Congratulations for your great videos!!
@luishumbertoninoalvarez2287
@luishumbertoninoalvarez2287 5 жыл бұрын
Thanks Dr. Peyam, great explanation!!!
@bogdancorobean9270
@bogdancorobean9270 5 жыл бұрын
I find it hard to believe that there's anything in math that could take you 10 years to understand :) But I see your point, sometimes the simplest things are hardest to really grasp. Also, I love how linear algebra just pops up everywhere, especially if you're trying to calculate stuff or do anything "practical".
@DendrocnideMoroides
@DendrocnideMoroides Жыл бұрын
I mean he would never be able to understand the hardest parts of math, but Lagrange Interpolation Formula is quite easy to understand maybe it would take 10 hours at most to understand it along with its proof
@AakibKaushar
@AakibKaushar Жыл бұрын
Most satisfying video of Lagrange's Polynomial so far.
@tingweixia
@tingweixia 4 жыл бұрын
Very helpful and understandable for my seminar facharbeit( project). Many appreciation!
@jiyoonpark5022
@jiyoonpark5022 4 жыл бұрын
Am I the only one who constantly looks for his videos after searching something??? Love his lectures!!!
@mireksoja9063
@mireksoja9063 4 жыл бұрын
From the educational point of view it is a very good explanation.Thank you.
@MrCigarro50
@MrCigarro50 5 жыл бұрын
highly used in statistics for smoothing curves. Thank you Dr. Peyam.
@rob876
@rob876 5 жыл бұрын
Would that not be cubic spline interpolation?
@franciscovinueza5320
@franciscovinueza5320 5 жыл бұрын
Clear explanation thank you!
@abdolkarimmehrparvar6583
@abdolkarimmehrparvar6583 Жыл бұрын
wow , that was a solid explanatin, thank you . could you make a video for newton interpolation as clear as this one?
@JPK314
@JPK314 5 жыл бұрын
It's worth noting that there isn't a polynomial for every set of pairs; the x coordinate needs to be different for each member of the set. In this case, this is equivalent to assuming the denominators are nonzero or assuming a function (not necessarily polynomial) of x exists which goes through those points
@yogitajindal3149
@yogitajindal3149 2 ай бұрын
Very helpful Thank you Sir 🙏🏻🙏🏻
@shaharyar4093
@shaharyar4093 Жыл бұрын
I have no idea what's going on after the 9:00 mark, But the first 9 minutes were extremely helpful. Thanks!
@soumyachandrakar9100
@soumyachandrakar9100 5 жыл бұрын
This is interesting. I just learned something new 🙂
@dattchan2913
@dattchan2913 2 жыл бұрын
Thanks a lot, it took me so long to get it
@dgrandlapinblanc
@dgrandlapinblanc 4 жыл бұрын
Interesting. Thank you.
@curtiswfranks
@curtiswfranks 5 жыл бұрын
I love that intro.
@mumuniamina3604
@mumuniamina3604 2 жыл бұрын
wow this man is amazing!
@tedcruz7495
@tedcruz7495 4 жыл бұрын
You just saved my life i love you
@drpeyam
@drpeyam 4 жыл бұрын
❤️
@Andrew-xm8xt
@Andrew-xm8xt 4 жыл бұрын
Good Job
@namannarang4208
@namannarang4208 5 жыл бұрын
I first saw this technique in a very basic polynomial question in my book i.e something like f(x) has some degree say 4 sat f(1)=3 f(2)=5 f(3)=7 find f(4)
@yajurphullera9396
@yajurphullera9396 5 жыл бұрын
If we let p(x) = (x-1)(x-2)(x-3) + 2x + 1, it would satisfy the given conditions.
@IFearlessINinja
@IFearlessINinja 5 жыл бұрын
Any time I see things like this, I like to think of outlandish hypotheticals that might relate to the new method I've learned. I'd imagine it would be possible to extend this to infinitely many points. If you were to trace e^x, for example, would you just arrive with the taylor series? Assuming it does, what if you tried it with a polynomial that doesnt have a taylor series of finite convergence interval? What would it do? Maybe it would it become a sinusoidal wave of infinite magnitude, and a period equal to the distance of your points? But then what if chose points that approached infinite density? Probably some dumb questions in there, but I thought I'd share my thought process. I always have fun thinking about things like that
@Xnichfrytk
@Xnichfrytk 5 жыл бұрын
That's not dumb , that's how people discover new things. Keep on going with your thought experiments
@newtonnewtonnewton1587
@newtonnewtonnewton1587 5 жыл бұрын
Very nice video thanks D peyam السلام عليكم
@armandoski-g
@armandoski-g 3 жыл бұрын
Hi! Could you please do a lecture on Vandermonde matrix? I really enjoy your explanations, please don't stop making videos :))
@drpeyam
@drpeyam 3 жыл бұрын
There are 3 videos on Vandermonde on my channel!
@armandoski-g
@armandoski-g 3 жыл бұрын
@@drpeyam what, where do you hide those treasures?
@drpeyam
@drpeyam 3 жыл бұрын
Just search Vandermonde Determinant dr Peyam
@ethancheung1676
@ethancheung1676 5 жыл бұрын
It is a similar process to partial fraction, except the denominator and numerator is interchanged
@drpeyam
@drpeyam 5 жыл бұрын
Wow! Never thought of it that way, thanks!
@GhostyOcean
@GhostyOcean 5 жыл бұрын
I don't have time atm to watch the whole video and see why you're doing it this way, but the way I learned to solve for a unique polynomial of degree n given (n+1) points is to solve Xc=y where X is the matrix of exponents of x (x0^0, x0^1,...,x0^n; x1^0, x1^1,...,x1^n;...;xn^0,xn^1,...,xn^n), c is the coefficient vector (c0, c1,...,cn) and y is the vector of y's (y0,y1,...,yn). You solve using RREF to find the coefficients.
@drpeyam
@drpeyam 5 жыл бұрын
But imagine you have a 30x30 system!
@RiaziMohandesi
@RiaziMohandesi 2 жыл бұрын
خیلی مخلصیم
@colehines3675
@colehines3675 5 жыл бұрын
If you write each of these as a system of equations (p(x_0)=y_0, p(x_1)=y_1, and p(x_2)=y_2), couldn't you write that in the form of a Vandermonde matrix of input variables times a vector of polynomial coefficients equals an output vector (V(x_0,x_1,x_2)A=Y)? If so, how could you take the inverse of the Vandermonde matrix to solve this problem? How easy is it to apply this for higher dimensions (points)? I've done two points and it worked, but I can't know how I can apply this for a variable amount of points. I could write python code for it, but I'd like to see if there is some interesting theory behind it.
@drpeyam
@drpeyam 5 жыл бұрын
Good luck solving that system, especially if it’s a degree 30 polynomial. This formula is much more elegant
@sendhelp8441
@sendhelp8441 Жыл бұрын
1:20 to 3:18
@wondeworku1284
@wondeworku1284 5 жыл бұрын
great for explanation sorry please this question solve it please using the numbers x0=-1 and x1=1. find the second interpolating polynomial for f(x) 1/1+x by lagrange form of interpolating polynomial.
@abdulalhazred5924
@abdulalhazred5924 5 жыл бұрын
no u
@GreenMeansGOF
@GreenMeansGOF 5 жыл бұрын
Right away my first question was: “can you use any 3 points to form a parabola?” And I feel like my answer is yes and no. For example {(0,0),(1,1),(1,-1)} do not form a y=f(x) parabola but instead an x=f(y) parabola. Also {(0,0),(0,1),(1,0)} probably form a parabola at a 45 degree angle(I haven't checked). So now my question is: “what are the requirements for this question?” Are we only looking for points that satisfy parabolas y=f(x)? If so, then there are definitely some restrictions(take 3 colinear points for example, which do not form a parabola).
@drpeyam
@drpeyam 5 жыл бұрын
The beautiful thing is all you need is the x coordinates of the points are all distinct
@GreenMeansGOF
@GreenMeansGOF 5 жыл бұрын
And non-colinear, correct?
@drpeyam
@drpeyam 5 жыл бұрын
You don’t even need non colinear!
@GreenMeansGOF
@GreenMeansGOF 5 жыл бұрын
Ok. I see what you are saying. The Lagrange formula works even for colinear points. However, the result is a linear function and not a quadratic.
@drpeyam
@drpeyam 5 жыл бұрын
No, not even that! If you have n+1 points, then there is a polynomial of degree n that goes through the points. So if you have 3 even colinear points, you can find a parabola going through them
@alwysrite
@alwysrite 5 жыл бұрын
nice shirt, did you find it at "CrossRoads" store?
@drpeyam
@drpeyam 5 жыл бұрын
Thanks!!! It’s a Calvin Klein shirt I bought at Macy’s
@alwysrite
@alwysrite 5 жыл бұрын
Still a nice shirt , but my comment was meant as a joke because it looks like a road with the broken white line divider ! : )
@drpeyam
@drpeyam 5 жыл бұрын
Oh! I thought you meant Crossroads Clothing Company 😂
@rob876
@rob876 5 жыл бұрын
So, using Lagrange interpolation, the simplest polynomial that goes through (x₀, y₀) and (x₁, y₁) is y = y₀(x - x₁)/(x₀ - x₁) + y₁(x - x₀)/(x₁ - x₀) or y = x(y₀ - y₁)/(x₀ - x₁) + (x₀y₁ - x₁y₀)/(x₀ - x₁) i.e. a straight line with gradient (y₀ - y₁)/(x₀ - x₁) and y-intercept (x₀y₁ - x₁y₀)/(x₀ - x₁) (Why does the y-intercept look like the cross product of (x₀, y₀) and (x₁, y₁)? ) I use this method to find the next number in a sequence when I've failed to see a sufficiently simple pattern.
@drpeyam
@drpeyam 5 жыл бұрын
Yeah, exactly! And it looks like a cross product because it can actually be written as a determinant, just like the cross product can
@rob876
@rob876 5 жыл бұрын
@@drpeyam Ah yes, because ax + by + c = 0, ax₀ + by₀ + c = 0 & ax₁ + by₁ + c = 0 have to be satisfied simultaneously, det[[x, y, 1], [x₀, y₀, 1], [x₁, y₁, 1]] = 0.
@coreyplate1001
@coreyplate1001 5 жыл бұрын
Does this imply that every single possible combination of unique points in R2 can be described by some polynomial function?
@drpeyam
@drpeyam 5 жыл бұрын
Yeah! As long as the x coordinates are distinct
@coreyplate1001
@coreyplate1001 5 жыл бұрын
@@drpeyam www.desmos.com/calculator/npfey8glyg
@drpeyam
@drpeyam 5 жыл бұрын
So cool!!!! Thank you!!!
@coreyplate1001
@coreyplate1001 5 жыл бұрын
@@drpeyamenjoy ^__^
@helloitsme7553
@helloitsme7553 5 жыл бұрын
So at the end you proved the fundamental theorem of algebra? Cool
@noahtaul
@noahtaul 5 жыл бұрын
Not exactly, the Fundamental Theorem of Algebra says every polynomial has EXACTLY n roots. What Dr P did here was prove that it has AT MOST n roots. The difficult part is showing that it has even one root at all!
@helloitsme7553
@helloitsme7553 5 жыл бұрын
@@noahtaul oh yeah counting complex roots yeah you're right excuse me
@phyarth8082
@phyarth8082 5 жыл бұрын
e, sin, cos, tan ultimate Lagrange polynomials
@abdolvakilfazli2488
@abdolvakilfazli2488 3 жыл бұрын
I did not get the last point.
@ZahraZobydii
@ZahraZobydii 4 жыл бұрын
Good job and thanks🙏 during the video I was wondering :are u persian or Indian?
@drpeyam
@drpeyam 4 жыл бұрын
Persian
@ZahraZobydii
@ZahraZobydii 4 жыл бұрын
Dr Peyam nice, keep up the good work 😍
@foreachepsilon
@foreachepsilon 5 жыл бұрын
What happens when the three points are colibear?
@drpeyam
@drpeyam 5 жыл бұрын
You get a polynomial of degree 1 (a line), which is still of degree less than or equal to 2
@foreachepsilon
@foreachepsilon 5 жыл бұрын
Dr Peyam so the quadratic terms annihilate each other. Interesting cuz that’s not as immediately apparent.
@rob876
@rob876 5 жыл бұрын
@@foreachepsilon try (1,1), (2,2) & (3,3) y = 1.(x-2)(x-3)/2 - 2.(x-1)(x-3) + 3.(x-1)(x-2)/2 y = x
@pnachtwey
@pnachtwey 5 жыл бұрын
You can also solve for 3 unknowns using 3 equations.
@sijanbhandari7569
@sijanbhandari7569 3 жыл бұрын
I am preparing for next month's exam. does it really take 10 years to understand?. :(
@drpeyam
@drpeyam 3 жыл бұрын
Yep
@josemaria_landa
@josemaria_landa 4 жыл бұрын
9:38 you said lagrange multiplier XD
@drpeyam
@drpeyam 4 жыл бұрын
LOL 😂
@stephenwhite1214
@stephenwhite1214 2 жыл бұрын
I hate everyone who disliked this video
@RiaziMohandesi
@RiaziMohandesi 2 жыл бұрын
شما ایرانی هستید، درسته؟
@drpeyam
@drpeyam 2 жыл бұрын
Bale!
@RiaziMohandesi
@RiaziMohandesi 2 жыл бұрын
@@drpeyam خوشوقتم. لحجه ی سلیس انگلیسی شما نشون میده خارج از ایران زندگی می کنید.
@marce3893
@marce3893 5 жыл бұрын
Much needed reminder for cultural appropriators that Lagrange was actually Italian 😠
Zorn’s Lemma and Basis
27:20
Dr Peyam
Рет қаралды 18 М.
Replacement Theorem Proof
25:08
Dr Peyam
Рет қаралды 6 М.
Can You Draw A PERFECTLY Dotted Circle?
00:55
Stokes Twins
Рет қаралды 44 МЛН
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 1,6 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 27 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 5 МЛН
Richard Swinburne - Mysteries of Free Will
5:32
Closer To Truth
Рет қаралды 230
Lagrange Interpolation
6:54
Dr. Will Wood
Рет қаралды 135 М.
Legendre polynomials
11:09
Dr Peyam
Рет қаралды 35 М.
Interpolation - Lagrange Polynomials
15:39
The Math Guy
Рет қаралды 61 М.
Lagrange Interpolating Polynomials
11:04
J Chang
Рет қаралды 285 М.
Useful functions for game designers - Lagrange Interpolation
18:01
The Art of Code
Рет қаралды 17 М.
This integral will have you on the floor 🤣🤣
3:29
Dr Peyam
Рет қаралды 58 М.
Lagrange interpolation formula for unequal intervals
9:31
Techlearners By Neeraj Saxena
Рет қаралды 95 М.
Newton Interpolation and Divided Differences
14:03
Dr. Will Wood
Рет қаралды 33 М.
Can You Draw A PERFECTLY Dotted Circle?
00:55
Stokes Twins
Рет қаралды 44 МЛН