Interpolation - Cubic Splines - example

  Рет қаралды 245,589

The Math Guy

The Math Guy

6 жыл бұрын

This video looks at an example of how we can interpolate using cubic splines, both the Natural and clamped boundary conditions are considered.
Text Book: Numerical Analysis by Burden, Faires & Burden

Пікірлер: 136
@noel2000lw
@noel2000lw 3 жыл бұрын
Best explanation on the Internet! Finally solved my problem with 4 Data-points!
@alexverwoert8444
@alexverwoert8444 2 жыл бұрын
good for u man i wish
@asifahmed1801
@asifahmed1801 2 жыл бұрын
Thanks a lot, you have given a better explanation than any one in the internet .
@adammed8667
@adammed8667 2 жыл бұрын
4th equation in the matrix, b1 should be equal to zero, and c1=-1. Anyway, thanks for the video, very very very helpful!!
@sirpsychosexy
@sirpsychosexy Жыл бұрын
Thank you, that had me fucked up for 30 minutes
@joeychou5212
@joeychou5212 5 жыл бұрын
Thank you so much! You made a good explanation of cubic spline. I suffer a lot from understanding the concepts in numerical analysis and using Mathematica. I hope that I could have found your videos earlier for this semester.
@benjamindeworsop8348
@benjamindeworsop8348 4 жыл бұрын
Awesome video. No fluff, just straight explanation
@SSuchti4
@SSuchti4 Жыл бұрын
one of the videos that shows me how higher math works spot on. Thank you dude, you filled wholes in my understanding i couldn't fill myself :)
@davidirimia6463
@davidirimia6463 4 жыл бұрын
You are a hero! My homework was this exact same exercise, same parameters! :D
@benm9355
@benm9355 4 жыл бұрын
This video was incredibly helpful, thank you!
@saranga4603
@saranga4603 3 жыл бұрын
You saved like One and Half days of mine. Thank you
@iftakharalam1650
@iftakharalam1650 5 жыл бұрын
you are the best explainer among the cubic spline lecture videos. also, you are the great explainer. Thanks for making this type of video. our professors are very lazy to explain.
@the-Math-guy
@the-Math-guy 5 жыл бұрын
Thank you for taking the time to give such a nice comment. Appreciate it!!
@thiripimallarapu7227
@thiripimallarapu7227 4 жыл бұрын
OMG! Iam actually searching for this exact question.so,my problem is over☺☺.Thank you so much!👌👌
@gerling-sprigadegbr8918
@gerling-sprigadegbr8918 Жыл бұрын
Dankeschön, endlich habe ich die Lösung! Wirklich einzigartig online. Das war sehr anschaulich und die Sprachbarriere war kein Problem.
@gontle0118
@gontle0118 9 ай бұрын
Thank you so much.I was struggling to understand but after your clear explanation I think I’m ready for the test👍
@norrisleung666
@norrisleung666 5 жыл бұрын
Very nice. Learnt a lot. I think the example can be more clear if the input and output have distinct value. The polymial passing through (1,2) (2,3) (3,5), and we are considering intervals [1,2] and [2,3] (on x axis), which is kind of confusing since one may think the "2" comes from the point (1,2) and the "3" comes from the point (2,3). Anyway, great video!! Thank you
@the-Math-guy
@the-Math-guy 5 жыл бұрын
Thank you Norris, that is great feedback I will take that into account if I get a chance to revise this video at some point. Thank you
@norrisleung666
@norrisleung666 5 жыл бұрын
@@the-Math-guy thanks for replying. Another question, i was wondering, using this method, will C0 always be 0?? Since for and point (a,b), S0(x) should have a term d0(x-a)^3, when wr apply the boundary condition, [S0(a)]´´=0 will always imply 2c0=0.
@akkismart1149
@akkismart1149 5 жыл бұрын
@@norrisleung666 Possibly c0 = 0 provided it satisfies the condition of natural spline. Please correct if I am wrong. check kzbin.info/www/bejne/rX6wm3ltoL2hjaM
@kevinweitgenant5300
@kevinweitgenant5300 3 жыл бұрын
wow. thank you. I was confused exactly by this!
@spudr2192
@spudr2192 2 жыл бұрын
Yup, same here, this confused me too!
@Hansly_rz
@Hansly_rz 5 жыл бұрын
really helpful... calculus one professor had us do a project explaining cubic spline which is, in my opinion, way off the scale here. You saved my day thank you so much
@Drunk_iitian
@Drunk_iitian 4 жыл бұрын
love you...you are the superhero...i was actually searching for this equation...
@unsignedperson476
@unsignedperson476 5 жыл бұрын
You save me. Clear explanation thanks for the tip
@helenab.6893
@helenab.6893 5 жыл бұрын
Thank you sooo much!!! I have to write a program for Cubic Splines for university but I had no clue about Cubic Splines. This was so helpful :)
@rimshaalam2499
@rimshaalam2499 4 жыл бұрын
Hi Halena! Can you plz help my why we take only two intervals means 3 points 1 2 3 what about 5... Why we don't take this one... And how S0(1) is equal to 2? Plz reply me must...
@pauliusvainoras7787
@pauliusvainoras7787 4 жыл бұрын
@@rimshaalam2499 There are three points and in order to connect them we need to functions ( in previous video it's explained ). S0(1)=2, because as you see S0(x)=a0+b0(x-x0)+c0(x-x0)^2+d0(x-x0)^3, using the given data ( point (1;2) ) we know that if we input 1 we get 2. So this point is starting point so we can call it x0=1; y0=2. So function S0(x) functions between x0 and x1. So as we input x=1 to S0(1) we get =a0+b0(1-1)...=a0; also we know from data that this function node is (1;2), so S0(1)=y0=2
@forzahorizon4eliminator206
@forzahorizon4eliminator206 Жыл бұрын
what the hell you've helped me soo much and its only today that i realized i didn't subscribe to your channel wow am sorry...and thanks for the work you are helping us a lot and making things easy for us we appreciate man
@surjandogra6512
@surjandogra6512 Жыл бұрын
Done very nicely. Only one suggestion: Show the final results in plot form and indicate on the plot different polynomials being used in different segments. Then emphasize smooth interpolation curve is created and if there are overshoots/undershoots, talk about that too. Nicely done. Thanks.
@sergebyusajabo2138
@sergebyusajabo2138 4 жыл бұрын
Good job bro. Now I understand how it is done.
@YuzuAndGin
@YuzuAndGin 4 жыл бұрын
Great video and clear explanation, would have really appreciated if you had simplified down the polynomials at the end.
@adamm4942
@adamm4942 4 жыл бұрын
How do you get the boundary conditions for s''(both 0 and 1)? is this a natural polynomial? I thought that would only work for the first derivatives being = to 0
@the-Math-guy
@the-Math-guy 6 жыл бұрын
Thanks Tim, appreciate it!!
@capitalp761
@capitalp761 5 жыл бұрын
how do we find the values of other unknowns? the video is great but not complete.. please share
@chrischoir3594
@chrischoir3594 3 жыл бұрын
great video, but I'm just curious where did you learn this? is there some book I can buy?
@byD3stroy
@byD3stroy 6 жыл бұрын
Hi, thank you for this video! I've a question, how do you get the values of b0, d0, b1, etc when you got the matrix?
@GemaPratamaAditya
@GemaPratamaAditya 4 жыл бұрын
vayne
@syedabishosainrizvi7817
@syedabishosainrizvi7817 2 жыл бұрын
بھای دل جیت لیا، زبردست
@timharig
@timharig 6 жыл бұрын
Underrated. Name looks foreign but speaks perfect English. All of the other videos are by Indians with strong accents. Good explanation. Please vote up.
@norrisleung666
@norrisleung666 5 жыл бұрын
The "s" sound is ear piercing though...
@anthonyng3705
@anthonyng3705 4 жыл бұрын
Please help, why we just have 3 points, what s about point number 5?
@ajipboy
@ajipboy 5 жыл бұрын
YOU SAVE ME ! Thanks a lot!
@booysenbafana4358
@booysenbafana4358 5 жыл бұрын
Thank you so much... I'm going to nail my exam today
@DrWillWood
@DrWillWood 3 жыл бұрын
so useful thank you!
@sanakhanbano
@sanakhanbano 5 жыл бұрын
can we use the direct cubic interpolation instead of this one . can you upload direct method @themathguy
@ummehani4344
@ummehani4344 3 жыл бұрын
thank you so much great work.
@lordhazimuka5232
@lordhazimuka5232 2 жыл бұрын
Maybe you can also tell us how you solved the augmented matrix. The rest i understand though.
@user-kf7pp1qh3x
@user-kf7pp1qh3x 2 жыл бұрын
what a nice explanation! thanks
@johng5295
@johng5295 5 жыл бұрын
Thanks in a million!!!!!!!!!!!
@poppyblop484
@poppyblop484 3 жыл бұрын
Sorry to ask, but do you wear a cape? If not, you should, because ur a hero
@hosseinkorani6807
@hosseinkorani6807 5 жыл бұрын
Thanks man! Helped a lot:))
@Dan-id8uy
@Dan-id8uy 5 жыл бұрын
Nicely done!
@nourailham2544
@nourailham2544 2 жыл бұрын
What about the convergence of the estimator cubique spline ! Do you have any video or reference explain that?!!!
@tabbycutex
@tabbycutex 3 жыл бұрын
how can I solve the matrix formed on a calculator to get the values of the unknowns?
@albaraaabuyassen
@albaraaabuyassen 2 жыл бұрын
Man, I love you ❤
@juustgowithit
@juustgowithit 6 жыл бұрын
You’re my savior
@the-Math-guy
@the-Math-guy 6 жыл бұрын
So happy to hear that!! Thank you
@yasserhadj3335
@yasserhadj3335 3 жыл бұрын
please what is the difference between the natural and the cubic spline in terms of interpolation? does one have a bigger error than the other?
@sidrarashid5594
@sidrarashid5594 3 жыл бұрын
I Am very grateful to u very well explained and clear my topic
@rimshaalam2499
@rimshaalam2499 4 жыл бұрын
Can you plz help me about why you don't take interval (3,5)....and how S0(1) is equal to 2....plz reply me..
@ajiwibowo8736
@ajiwibowo8736 2 жыл бұрын
why is the second derivatiive equals to zero? doesnt it supposed to be equal each other i.e S''1(1)=S''2(3)?
@nozomuitot
@nozomuitot 10 ай бұрын
Where did the 2c0 + 6d0 = 2c1 equation in the construction of clamped cubic come from
@packardrazor9382
@packardrazor9382 4 жыл бұрын
Thanks bro... It's amazing explanation
@baldEagle_
@baldEagle_ 5 жыл бұрын
cant Thank you!! in words.
@Cetra29
@Cetra29 6 жыл бұрын
Hi, your video is awesome! It is pretty much the only thing that really helps me through this topic. I am a total newbie when it comes to splines though and need this knowledge only for one single exam and right now am really troubled when it comes to knowing when and how to use certain things. Any help would be greatly appreciated. You have used an example with three points where two overlapping spots existed. What about three points where only one point overlaps. Do I have to approach this differently or can it be done exactly the same way? I do not understand this right now but I think just doing it the same way might not lead to a satisfying conclusion? Or maybe it still is right but that's the problem, as much of a beginner I am here, I cannot really say what's adequate here. Thanks in advance!
@the-Math-guy
@the-Math-guy 6 жыл бұрын
Hi, thank you for the message and glad you found the video helpful. Ok in answer to your question first can you give me an example of what you have in mind for the three points with 1 overlap?
@Cetra29
@Cetra29 6 жыл бұрын
Hi, wow, thank you for answering so fast. Actually I think I already found a way to solve it by understanding your video a bit more, so getting more used to the basics and then going back to check what was given to us formula-wise for the exercise. Basically it is an example where (x0, y1), (x1,y1), (x2, y2) had identical y0 and x1 like in your example the "2" is but not an identical y1 and x2 like in your example the "3" is (that is what I meant with "overlapping"; I just meant identical numbers as it seemed so important). I was wondering if its still possible to do stuff the same way but when trying out a bit more and understanding a bit more of what was given to me I saw that it is all about the same process. But definitely thank you for providing us with a video! It definitely helped!
@the-Math-guy
@the-Math-guy 6 жыл бұрын
Actually that has no effect on the method in my example that is just a coincidence. The method will work for any set of values but the place where the overlap is the x values. So when you connect say (x1,y1), (x2,y2) and (x3,y3) there are two splines and (x2,y2) is a part of the both splines thats the only thing to keep in mind when it comes to repeating values. Hope this makes sense. You are most welcome
Жыл бұрын
Congratulations teacher for the explanation
@ferdzcastle
@ferdzcastle 3 жыл бұрын
Great explanation. You have just accidentally interchanged the element (4,3) with element (4,4) of coefficient matrix.
@fatimazohrabechlaghem7680
@fatimazohrabechlaghem7680 3 жыл бұрын
Noticed the same. Was looking for a comment to point it out !
@Methzvamp
@Methzvamp 4 жыл бұрын
Thank you so much
@ahmetkarakartal9563
@ahmetkarakartal9563 2 жыл бұрын
thank you so much
@donnaguerrero5588
@donnaguerrero5588 3 жыл бұрын
Good day! Can you please help me to solve having 4 data points?
@sohaibkhan779
@sohaibkhan779 6 жыл бұрын
thankyou... it helped me.. well explained
@sheikharshad7502
@sheikharshad7502 6 жыл бұрын
Sohaib Khan ap sa ya question hn gya TN plz mje btae k last matrix kse solve kia
@sheikharshad7502
@sheikharshad7502 6 жыл бұрын
Plz plz plz
@TScreator777
@TScreator777 4 жыл бұрын
Thanks great help
@freezinfire
@freezinfire Жыл бұрын
Thank you very much sir.
@catherinehiggins4526
@catherinehiggins4526 2 жыл бұрын
Great video man, at 8:13 why is the S"(3) and not S"(2) ? Thanks
@AbdulQadeer-jf7iw
@AbdulQadeer-jf7iw 3 жыл бұрын
Can anybody tell why we have not taken [3,5]
@izen4276
@izen4276 3 жыл бұрын
7:18 hard to understand how So''(1)=0?
@lancelofjohn6995
@lancelofjohn6995 2 жыл бұрын
Nice lecture!
@Enola8866
@Enola8866 Жыл бұрын
why we have not taken the interval (3,5)???
@nitnelavspetorials
@nitnelavspetorials 4 жыл бұрын
If I have to find a Quadratic Spline and I am also given the 3 points, do I have to calculate the second derivatives?
@nitnelavspetorials
@nitnelavspetorials 4 жыл бұрын
I found myself. I also knew S0'(-1) = 0, that's why I didn't need the second derivatives. VERY USEFUL VIDEO. THANKS FOR POSTING IT
@avibank
@avibank 6 жыл бұрын
Awesome
@sujatamaiti4903
@sujatamaiti4903 3 жыл бұрын
Thank you sir
@realberkeboy
@realberkeboy 2 жыл бұрын
hello first of all thanks for the video. But i didnt understand how did you find the values of b0 d0 b1... after writing the matrices. Can you explain to me? Thank you
@sandisosenzo
@sandisosenzo Жыл бұрын
I haven't tried it myself yet but row reduction should give u the answer u need
@pavelperina7629
@pavelperina7629 3 жыл бұрын
Can you make links between some videos, it's hard to navigate from basics to next part and vice versa when videos are 4 years old.
@the-Math-guy
@the-Math-guy 3 жыл бұрын
Thanks for your suggestion actually if you go to the playlist for this course all videos are in sequence.
@pablocaiza.
@pablocaiza. 4 жыл бұрын
gracias amigo
@Adrian-sr2bu
@Adrian-sr2bu 3 жыл бұрын
nice explanation
@a_smile55
@a_smile55 2 жыл бұрын
Thanks😄
@yasserothman4023
@yasserothman4023 3 жыл бұрын
@10:09 the -1 should be in the fourth column under c1 not b1
@Queen-fl7su
@Queen-fl7su 2 жыл бұрын
Sir plz give me one lectures of cubic non polynomial spline by differential equations
@nakshathra5149
@nakshathra5149 Жыл бұрын
I don't understand how u got equation 2 at 5:49
@musafir1068
@musafir1068 6 жыл бұрын
how to implement it in Matlab for n number of data points?plz, make a video on this also.
@vimalrajayyappan2023
@vimalrajayyappan2023 5 жыл бұрын
hey did u find a solution?
@enriquesahidtenoriorodrigu8979
@enriquesahidtenoriorodrigu8979 Жыл бұрын
Thx for everything my friend. You just got a error in yout matrix, in the 4th row you put [0,3,-1,0,0]... but is [0,3,0,-1,0] cause C1 = -1, not B1
@rememberrocko
@rememberrocko Жыл бұрын
THANK YOU! I had tried so many online matrix calculators wondering what I was missing.
@hoangthientamvuong8238
@hoangthientamvuong8238 5 жыл бұрын
Thanks so much, it is super helpful. But I think the 4th row is not correct hmmm maybe?
@hoangthientamvuong8238
@hoangthientamvuong8238 5 жыл бұрын
Of the matrix I mean
@the-Math-guy
@the-Math-guy 5 жыл бұрын
You are correct please see the little "i" in the right corner of the video there is a correction video
@Svx_6
@Svx_6 4 жыл бұрын
Cool Thanks allot
@gabrielalbu608
@gabrielalbu608 6 жыл бұрын
Can you give me the implementation of this algorithm in Matlab ?
@the-Math-guy
@the-Math-guy 6 жыл бұрын
Well actually Matlab has a function coded that can do splines (quite advanced stuff). Now if you mean you want to write in Matlab or python from sort of scratch that is; well you can get a lot of pseudocode, actual code etc on the web.
@gabrielalbu608
@gabrielalbu608 6 жыл бұрын
yeah i got the code from the web,thanks anyway for your fast response.
@speedmetalmassiah567
@speedmetalmassiah567 5 жыл бұрын
Thanks for the video, but I don't see how my professor expects us to solve a Cubic Spline, Quadratic Spline, Lagrange Polynomial, and Newton Polynomial in 1 hour.
@the-Math-guy
@the-Math-guy 5 жыл бұрын
Oh my sorry to hear that. Perhaps he or she thinks you are all geniuses.
@firstsecond8999
@firstsecond8999 5 жыл бұрын
Guess I'm not the only one who thinks so too During maths exams, the time allocated does not include the time to go over the work to correct errors and that is not a good thing
@timbraunton3677
@timbraunton3677 4 жыл бұрын
legend
@dellarima8927
@dellarima8927 5 жыл бұрын
you got something wrong there, instead of c1, you write it in b1 column
@EG101ify
@EG101ify 4 жыл бұрын
Why is s''(1) equal to zero?
@MUmar-tq7pr
@MUmar-tq7pr 4 жыл бұрын
it is the boundary condition for natural spline
@abhilamsal7185
@abhilamsal7185 6 жыл бұрын
Don't we need four points in order to define a cubic function?
@the-Math-guy
@the-Math-guy 6 жыл бұрын
I think you are mixing things here. That is only one way to determine a cubic function. There are various other ways and certainly for cubic splines there is no such requirement.
@abhilamsal7185
@abhilamsal7185 6 жыл бұрын
oh, so cubic functions and splines are a bit different huh! thanks for clearing things up, I really appreciate it.
@krushnasai3249
@krushnasai3249 6 жыл бұрын
d0 value = -1/2 i think
@the-Math-guy
@the-Math-guy 6 жыл бұрын
Krushna sai kumar Reddy. Thanks for your question but the solution is correct do =-1/4 not as you suggest.
@nalluribharadwaj5277
@nalluribharadwaj5277 5 жыл бұрын
the 4th row in the matrix as explained is wrong...
@the-Math-guy
@the-Math-guy 5 жыл бұрын
Yes thank you please see the little i in the right corner of the video for the correctiom
@mohammedferas4393
@mohammedferas4393 6 ай бұрын
now im more confused thx
@sarakisafa7283
@sarakisafa7283 3 жыл бұрын
sir, you have made a mistake, when we put fourth equation in the matrix then (-1) will come right down the (c1) not under the (b1).
@the-Math-guy
@the-Math-guy 3 жыл бұрын
Yes thank you I already posted a correction as a link to this video please see kzbin.info/www/bejne/q4PNimOAlt2sh8U
@Adam_mohammed_
@Adam_mohammed_ Жыл бұрын
بطتنا بطت بطن بطتكم تقدر بطتكم تبط بطن بطتنا مثل ما بطتنا بطت بطن بطتكم!
@SuperDeadparrot
@SuperDeadparrot Жыл бұрын
The 4th line of your matrix is wrong!
@the-Math-guy
@the-Math-guy Жыл бұрын
Yes thank you I already corrected that in the video that was in more... in any case you can see it here kzbin.info/www/bejne/q4PNimOAlt2sh8U
@joeysmith7021
@joeysmith7021 4 жыл бұрын
Should pick a smaller example next time or another video with a smaller example. That is very messy
@aspiringmodernistchef
@aspiringmodernistchef 4 жыл бұрын
You kidding me? This one only has 3 points, that's the "smallest" example you can have for cubic interpolation. Any "smaller" would just be 2 points, so how on earth do you do cubic interpolation on 2 points? ROFLMAO
@kimosopjemutainasaline3541
@kimosopjemutainasaline3541 3 ай бұрын
You are too fast one can't track where you are obtaining your figures
@osmann1337
@osmann1337 4 жыл бұрын
dora dan geldim bn
@gokselkucuksahin
@gokselkucuksahin 4 жыл бұрын
*L E A R N T O W R I T E F I R S T*
@mahithkumar2603
@mahithkumar2603 3 жыл бұрын
Thank you so much! You made a good explanation of cubic spline. I suffer a lot from understanding the concepts in numerical analysis and using Mathematica. I hope that I could have found your videos earlier for this semester.
Interpolation - Cubic Splines - Basics
22:15
The Math Guy
Рет қаралды 83 М.
Interpolation - Lagrange Polynomials
15:39
The Math Guy
Рет қаралды 61 М.
KINDNESS ALWAYS COME BACK
00:59
dednahype
Рет қаралды 152 МЛН
Best father #shorts by Secret Vlog
00:18
Secret Vlog
Рет қаралды 22 МЛН
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 13 МЛН
Lagrange Interpolation
6:54
Dr. Will Wood
Рет қаралды 135 М.
Interpolation - Newton's Divided differences - Basics
20:20
The Math Guy
Рет қаралды 34 М.
Cubic Spline Interpolation Theory | Numerical Methods
6:42
StudySession
Рет қаралды 28 М.
Natural Cubic Spline Interpolation Example | Numerical Methods
8:46
Cubic Spline | Numerical Computation
32:19
The Infinite Math
Рет қаралды 57 М.
The Continuity of Splines
1:13:50
Freya Holmér
Рет қаралды 1,3 МЛН
Spline Cubic
18:16
Analyse Numérique pour ingénieur ESSA
Рет қаралды 17 М.