Beware the Runge Spikes!

2023 ж. 5 Ақп.
448 939 Рет қаралды

Check out Overleaf: the easy to use, online, collaborative LaTeX editor! bit.ly/overleaf_sum
RungeBot on both twitter (for now!) and mastodon.
/ rungebot
mathstodon.xyz/@RungeBot
Yes, I'm on mastodon: mathstodon.xyz/@standupmaths
Huge thanks to Matthew Scroggs for letting me turn his MathsJam talk into a video and helping me out with all of the animations. www.mscroggs.co.uk/
Here is the MENACE Scroggs video I mentioned: • MENACE: the pile of ma...
Thanks also to Dave Hartburn for doing the flat earth digging. His MathsJam slides are here: mathsjam.com/assets/talks/202...
Cheers to Ben Sparks for making that geogebra file. www.bensparks.co.uk/
Huge thanks to my Patreon supports. They keep me on the level. / standupmaths
CORRECTIONS
- None yet, let me know if you spot anything!
Filming and editing by Alex Genn-Bash
Animations and geogebra by Matthew Scroggs
Some geogebra by Ben Sparks
Diagrams by Sam Hartburn
Written and performed by Matt Parker
Produced by Nicole Jacobus
Music by Howard Carter
Design by Simon Wright and Adam Robinson
Legitimate scientist by Professor Lucie Green
MATT PARKER: Stand-up Mathematician
Website: standupmaths.com/
US book: www.penguinrandomhouse.com/bo...
UK book: mathsgear.co.uk/collections/b...

Пікірлер
  • the "8 inches per mile squared" isn't an invention of the flat earthers, they just took it from land surveyors and large scale engineering (like building long bridges, where you have to account for curvature), where it is used as an approximation.

    @m.h.6470@m.h.6470 Жыл бұрын
    • Pretty much every flat earther argument I have ever seen proves they aren't good enough at maths to have been able to come up with this approximation, so that makes sense.

      @PanozGTR2@PanozGTR2 Жыл бұрын
    • Given that NASA says planes fly on a flat earth, which bridges aren't built on a flat earth?

      @cainabel2553@cainabel255311 ай бұрын
    • @@cainabel2553NASA lied to you

      @westernbrumby@westernbrumby11 ай бұрын
    • How ironic, they took it from a real world case where it is needed to account for the curvature of the earth.

      @RoryMag@RoryMag11 ай бұрын
    • @@cainabel2553 [citation needed]

      @KnakuanaRka@KnakuanaRka11 ай бұрын
  • Actually, this wierd 8*d^2 formula comes from the Taylor expansion of the cosine finction. And the approximation is so damn good because the argument of a cos(.) is tiny as we divide by the Earth's radius

    @airatvaliullin8420@airatvaliullin8420 Жыл бұрын
    • And it's not a FE development: it's being used in topography and other similar fields for ages. In the international system, the parabola is h=5(d/8)² where h is meters and d is km (which means one could actually do a 1:1 approximation h=5(d/8000)² ).

      @MaGaO@MaGaO Жыл бұрын
    • @@MaGaO I wonder if maybe they found the equation in a surveyor's training manual or some such.

      @alexandrezani@alexandrezani Жыл бұрын
    • Also the error term is of the order x^4, so really is tiny when x is tiny to start with.

      @scott5146@scott5146 Жыл бұрын
    • and the constant in that approximation is simply 1/(diameter of earth) = 1.26×10^-4 reciprocal miles ~ 8 inch/mile^2

      @JNCressey@JNCressey Жыл бұрын
    • @@alexandrezani It's also not a stretch for anyone with an undergrad math or physics background to derive it independently. Although I can't imagine many people with that background become flat earthers.

      @iang0th@iang0th Жыл бұрын
  • I was not prepared for anyone, much less Matt Parker, to say "Well done, flat earthers" without a trace of irony in his voice, but here we are! I'm actually impressed by how accurate that approximation is for measuring the drop of the earth behind the horizon for most practical distances. It's not perfect, of course, but it's accurate to three significant digits out to hundreds of square miles, and I can respect that kind of accuracy for napkin math.

    @TheCammerhammer@TheCammerhammer Жыл бұрын
    • To be fair they don't need the part of the equation where you go in orbit around the Earth and it rises back up from behind you making a sphere for their horizon drop equation.

      @BaronBytes@BaronBytes Жыл бұрын
    • It is sure a handy one. I can se how it makes sense, since cosine and x^2 behave similarly around zero ( lim_{x->0} frac{1 - cos x}{x^2} = 0,5 if my Analysis 1 serves me right ). I'm really curious where they got the eight (or.. sixteen if you factor in the 0,5 in the limit i suppose) from. Something to do with the radius of the earth or the imperial system maybe?

      @matousfiala5925@matousfiala5925 Жыл бұрын
    • He's a baller, and game recognises game!

      @andymcl92@andymcl92 Жыл бұрын
    • This is a specific example of the small angle approximation. For small angles sin(x) =~ x, and cos(x) =~ 1 - (x^2)/2 The second is where the squared in their expression has come from.

      @alansmithee419@alansmithee419 Жыл бұрын
    • ​@@matousfiala5925 The standard approximation for cos(x) near x=0 is cos(x) = 1 (from first order taylor expansion at 0, sometimes called the "small angle approximation"), but we can get the same result as your demonstration from the second order expansion: cos(x) = 1 - x^2/2 + [higher order terms]. Solving that for 1-cos(x), we get 1-cos(x) = x^2/2 + [higher order terms]. or ignoring the higher order terms, 1-cos(x) is approximately = x^2/2. Plugging that approximation into r*(1-cos(d/r)), we get Drop off is approximately = r*(d/r)^2/2 = d^2 / 2r So the constant is just 1/2r. And it turns out that 2 times the radius of the earth in miles (~7916 mi) is almost exactly 1/8th of the conversion of inches into miles (63360 in/mi) -> (63360 / 7916 = 8.004), giving Drop off (in inches) = 8 * d^2 (in mi^2)

      @colonelrabbit1104@colonelrabbit1104 Жыл бұрын
  • I love that the first 6 minutes is literally just rediscovering taylor series from first principles, that was fun

    @JoshuaBarretto@JoshuaBarretto Жыл бұрын
    • This didn't have anything to do with Taylor series. It is interpolating with polynomials, called Lagrange interpolation. They have this in linear algebra textbooks

      @pyropulseIXXI@pyropulseIXXI Жыл бұрын
    • @@pyropulseIXXI well, that particular example with 8d^2 was definitely derived from Taylor series

      @deadinside9966@deadinside9966 Жыл бұрын
    • @@pyropulseIXXI I mean, cos x = 1 - x2 + O(x^4). so the 1-cos(x) in the horizon formula becomes x^2 + O(x^4). Drop the higher order terms, perform unit conversions, and you get x^2 - > 8d^2. It's literally taylor series, it has nothing to do with Runge's phenomenon. Runge's phenomenon results in rapid increasing oscillations of a polynomial interpolation as you approach the edges of the interpolation domain. The oscillations of the cosine curve are not that. It literally cant be. If you are trying to claim the 8d^2 term is derived from polynomial interpolation then I don't know what to say other than the two curves share only ONE point in common - and a quadratic interpolation would have at least 3.

      @VioletCatastrophe@VioletCatastrophe Жыл бұрын
    • This is also a good demonstration of why physicists can and do approximate any smooth troughs (such as in potential well functions) with/via quadratics near their extrema.

      @curtiswfranks@curtiswfranks5 ай бұрын
  • “With four parameters I can fit an elephant, and with five I can make him wiggle his trunk” - Johnny von Neumann

    @nicholasvinen@nicholasvinen Жыл бұрын
  • My understanding is that 8 inches per miles squared is actually used as a quick shorthand approximation for engineers when working over relatively short distances, like the scale of buildings. I believe that was where the flat earthers got it.

    @Sam_on_YouTube@Sam_on_YouTube Жыл бұрын
    • @@gregoryford2532 engineers are still better than architects

      @wrex509@wrex509 Жыл бұрын
    • I'm having trouble understanding what kind of 'gotcha' they think they've found in a very simple and well-understood rule of thumb..

      @dielaughing73@dielaughing73 Жыл бұрын
    • Exactly my thoughts.

      @Nightriser271828@Nightriser271828 Жыл бұрын
    • @@dielaughing73 They just need enough 'correct' sounding stuff that, at a quick glace to the untrained eye, checks out in order to give their other bullshit enough credibility to be taken as fact without a second look. It's classic misdirect cult behaviour. That's why they quote buoyancy and "water always finds it's level" in order to explain why gravity doesn't exist. For most people who don't understand the entire picture and left school at 16/18, that makes total sense. It doesn't when you realise a force applied to a particle is a vector and so how do the water molecules "find their level" without gravity, but *shrug* that's the level they're aiming for. (No pun intended. Okay maybe a little bit.)

      @AMorphicTool@AMorphicTool Жыл бұрын
    • @@dielaughing73 They use it as a "gotcha!" by pointing at some 120ft structure that is 15 miles away and then claiming that, by 8 inches per mile squared, the building should be obscured by an additional 30 feet. "But we can see the top 30 feet of the structure, therefore, the earth is flat!" they will then say, ignorant that "drop" is not the same as "obstruction," and overlooking the fact that the bottom portion of the building is obscured, which would not happen on a flat eart. In short, it's a misapplication of the wrong formula to "prove" that we see further than we should, and they expect their viewers to not look too much into it.

      @FerretWarlord1@FerretWarlord1 Жыл бұрын
  • 1:51 spat out my tea laughing at Matt being a baller.

    @Phr8@Phr8 Жыл бұрын
    • _coming through_

      @-_Nuke_-@-_Nuke_- Жыл бұрын
    • And 2:17 thug glasses made out of spreadsheets. That’s exponentially baller-er!

      @fisheye42@fisheye42 Жыл бұрын
    • Not a baller, Matt. Clearly you’re a Roundhead.

      @davidsoncorry4269@davidsoncorry4269 Жыл бұрын
    • He could never be ballin

      @theguythatasked6400@theguythatasked6400 Жыл бұрын
    • 314 likes, nice

      @bilkishchowdhury8318@bilkishchowdhury8318 Жыл бұрын
  • “That’s still over the horizon, if you will. Or, indeed, won’t.” 😂😂😂 That’s some baller humor right there.

    @rabbiboazmarmon7723@rabbiboazmarmon7723 Жыл бұрын
    • COMIN THRU

      @fprosk@fprosk Жыл бұрын
  • I just have to say the baller glasses made of spreadsheets made my evening. Just the right amount of hilarious detail.

    @AJSevel@AJSevel Жыл бұрын
  • Gotta love watching people suffer using imperial units :D

    @juakofz@juakofz Жыл бұрын
    • when you are raised using powers of 10 for unit conversions, imperial unit conversion makes no sense, then you ask an american and they tell you, you don't do unit conversion.

      @BaronBytes@BaronBytes Жыл бұрын
    • @@BaronBytes I wonder if it makes sense to those raised using imperial units

      @troik_live@troik_live Жыл бұрын
    • @@troik_live it doesnt :)

      @sabaneyev@sabaneyev Жыл бұрын
    • The imperial system is a great start to a system. Base 12 is a much better base for lots of things than base 10. Say you're a carpenter and you want to cut things into 3rds. 1/3 of a meter is a repeating fraction of 33.33...cm, blech. But if you want to cut a yard in 3rds, you get a foot, cut a foot in 3rds, you get 4 inches. Very cleanly marked points on your imperial measuring sticks. It's all about the prime factorization. Base 10 only has prime factors of 2 and 5, but base 12 has 2, 2, and 3. So while it's stupid to have to remember that a mile is 5,280 feet, it has prime factors of 2, 2, 2, 2, 2, 3, 5, and 11 (I dunno why 11). But it can be cleanly divided many times in half and still be in whole numbers of feet. Stupid metric system only has 2s and 5s for everything all the time and what use are fifths?

      @mipsuperk@mipsuperk Жыл бұрын
    • @Troik people that don't use imperial think that were like, regularly converting between like miles and small local units, but we really don't. Like, when measuring human size things, we never go above yards much, which is basically a meter. Anything above like, 100 yards we start and finish in miles. So you end up with inches, feet, yards for small human sized things, and miles otherwise, and if you need to convert the two you look up the factor but you almost never need to do that in your everyday life.

      @Elitekross@Elitekross Жыл бұрын
  • I'd like to point out the difference between Taylor series (used by the flatearthers to approximate the drop (cos(x)=1-0.5*x^2)) and Lagrange interpolation polynomial which you use to connect points with a polynomial (used later in the video).

    @matyastorok8624@matyastorok8624 Жыл бұрын
    • So what is the difference?

      @harrkev@harrkev Жыл бұрын
    • @@harrkev Sorry, I meant to write that there is a difference, guess I have to explain now: You approximate a function with a Taylor polynomial around one point by making sure, that the polynomial has the same value, tangent curvature, etc. as the function in one specific point (if you are familiar with calculus, this means that their "0th", first, second, etc. derivatives are equal in that point). This creates a polynomial which very accurately resembles the function in an area around the specific point. It is used eg. in calculators to approximate results and often in simulations, where you want to know the value of the function close to where you already do. In the case of Lagrange polynomials, you want the polynomial to resemble the function on a longer interval, but not as accurately. As Matt said in the video, you construct the only polynomial of degree n which contains the n+1 points on the original function. I don't know much of its use cases. tldr: Taylor polynomials resemble a function very accurately in a small radius of a point (after that they diverge quickly), while Lagrange polynomials are less accurate, but approximate on a longer interval. Fun fact: If you move your n points infinitely close together, the lagrangian polynomial will equal the nth Taylor polynomial.

      @matyastorok8624@matyastorok8624 Жыл бұрын
    • @@matyastorok8624 As a bonus: Not sure if those are still named Lagrange polynomials, but there are ways to construct polynomials using derivatives of the points too.

      @ilmt@ilmt Жыл бұрын
    • @@ilmt You may be thinking of splines. However they're usually not single polynomials, so I may be wrong.

      @harrygenderson6847@harrygenderson6847 Жыл бұрын
    • ​​​​@@ilmtit's hermite interpolation

      @smolboi9659@smolboi965910 ай бұрын
  • Hey, I just learned while working on a project recently that a shortcut for making an absolute cell reference in excel/sheets is pressing F4 while it's selected. At roughly 3:30, you select cell D1 with and it looks like you manually insert the dollar signs. While you have D1 selected, you can press F4 and it will automatically change it to an absolute cell reference with the dollar signs. I'd say it's a gamechanger but really all it does is keep me from pressing the arrow keys to edit the text field while actually moving a cell to the left.

    @ethansnyder2234@ethansnyder2234 Жыл бұрын
    • That’s extremely useful

      @Septimus_ii@Septimus_ii Жыл бұрын
    • I think he is using a Mac, so you need cmd+T

      @onelastmore5924@onelastmore5924 Жыл бұрын
    • woah, really? how did I not know this? I'm gonna go try it!

      @DraconianEmpath@DraconianEmpath Жыл бұрын
    • Also, if you press F4 repeatedly, it will cycle through the possible reference modes (relative, absolute, absolute column, absolute row)

      @slash_me@slash_me Жыл бұрын
    • thank you!

      @Adskdnweotland@Adskdnweotland Жыл бұрын
  • Time to send this video to senior management, who didn't believe I could replace their very expensive software with some polynomial approximations in Excel.

    @garrick3727@garrick3727 Жыл бұрын
    • I wouldn't if I were you. If they've already spent the money then they've got a big vested interest in not believing you. There's none so blind as will not see. If you go in trying to rock the boat then they'll be more interested in stabilizing it than in some abstract quest to see your rightness. You won't be doing yourself any favours.

      @steviebudden3397@steviebudden3397 Жыл бұрын
  • This brings back some good memories. In 1989, I was frustrated at the poor performance of floating point operations in Turbo Pascal and I started optimizing them. One of optimizations I did was to use Chebyshev polinomials to approximate transcendental functions instead of the simple Taylor expensions that Turbo Pascal used. In 1990, my work got even published in a German computer magazine.

    @MarcelCox1@MarcelCox1 Жыл бұрын
  • The gangsta shades made of excel is just pure genius!

    @romanprekop6613@romanprekop6613 Жыл бұрын
  • I love the idea at the beginning of the video implying that in order to understand a flat-earther's mind you'll need to apply reverse engineering 😂

    @lucas.cardoso@lucas.cardoso Жыл бұрын
  • the 8in/mi^2 is a surveyor's approximation so it makes sense that its very close

    @flikersprigs5641@flikersprigs5641 Жыл бұрын
    • Also, where they'd have got it from. Cos most don't have the schooling to work this stuff out

      @thekaxmax@thekaxmax Жыл бұрын
  • I kept on waiting for you to expand the graphs past the point that you did the fit to, to see how badly they blow up. To my mind the biggest problem with a polynomial approximation is that it tends to go wild once you leave the region of interest that you did the fit in.

    @RichardDamon@RichardDamon Жыл бұрын
    • But one does the approximation for an interval of interest, think linearize a sensor output in a microcontroller. They air mas sensor in a ICE car, you only care for certain range, beyond that the ICE will never get into, so who cares.

      @ikocheratcr@ikocheratcr Жыл бұрын
    • Yeah, extrapolation has some problems

      @roflchopter11@roflchopter11 Жыл бұрын
    • @@ikocheratcr Sometimes your area of interest doesn't coincide with the points you know, though. For instance, you may have measured the bend in a bunch of short poles, and now you want to know how much a longer one bends without having to make and test it first.

      @badlydrawnturtle8484@badlydrawnturtle8484 Жыл бұрын
    • Extrapolation is sketch in general, not just for polynomials.

      @Pablo360able@Pablo360able Жыл бұрын
    • @@ikocheratcr Sometimes, but not always. Sometimes the sensor you calibrated over a given range will experience things slightly beyond (or sometimes significantly) the initial calibration. You want to check for anomalies just outside your expected range. It is also amazing how many people will ignore the range of values an approximation is stated to be good over, and use it well past that, if if it gives absurd values.

      @bostonchurch_central@bostonchurch_central Жыл бұрын
  • 4:00 Hold on. It’s not a FE approximation. It’s as you’ve shown very accurate for a few 10s of miles. In my Ordnance Survey textbook of 1925, it’s stated ‘for distances that are practicable’. In land surveying one rarely deals with observations longer than a few 10s of miles. And 8” x mi^2 is archaic. In pencil and paper calculation, pre machine calculation, it’s how it was done. In todays software world 8” x mi^2 is not used. I still do a lot of pencil and paper calculation.

    @larryscott3982@larryscott3982 Жыл бұрын
  • I had to deal with the Runge Phenomenon for a regression task and i wish i knew about Chebyshev Spacing. Luckily it wasn't too much of a trouble, i used Generalized Additive Models (GAM) and it literally saved me.

    @thomasstogiannopoulos83@thomasstogiannopoulos83 Жыл бұрын
  • It also works in civilized units! It's 8(ish) cm for each squared kilometer It's 7.8456 to be exact, but I'd say it's close enough. It works because the ratio of mile/km squared is close to the ratio of inch/cm (mile/km)^2 = 1.609^2 = 2.589, inch/cm = 2.54

    @Valeriobrogni@Valeriobrogni Жыл бұрын
    • Huh, that's an interesting coincidence!

      @PerMortensen@PerMortensen Жыл бұрын
    • @@PerMortensen it's almost as if those units were originally derived from the size/curvature of the Earth itself ;) At least, iirc. The kilometer specifically was originally defined as 1/40000 of the length of a meridian

      @polyacov_yury@polyacov_yury Жыл бұрын
    • @@polyacov_yury Yes, you are correct, I still use this approximation when imagining flight distances. The idea was to use the "gradian" or "gon" scale for angles (which never took over), with 400 grad to a full circle. If you measure Earth's latitude and longitude in gradians, then each centigon of arc is one km. This is akin to the nautical mile, where one minute of degree of arc is one nautical mile. BTW, for those interested, Wikipedia's article "History_of_the_metre" is a very interesting read. Edit: I just realized that, if Flat Earthers understood metrology, they would not be :D

      @georgH@georgH Жыл бұрын
    • Many years ago I derived a different approximation. Since I live in a mountainous area the numbers are larger. A drop of 1km is equivalent to (111km)squared, where 111 = sqrt(40,000/pi), based on the diameter of the earth.

      @gordonrichardson2972@gordonrichardson2972 Жыл бұрын
    • The US is semi civilized

      @SeekingTheLoveThatGodMeans7648@SeekingTheLoveThatGodMeans7648 Жыл бұрын
  • Matt talking to his dog: "Yeees, you would if you had to collaborate on a scientific dogument."

    @egilsandnes9637@egilsandnes9637 Жыл бұрын
  • You're making clear why all my attempts at vector graphic design failed miserably to match what I intended.

    @abydosianchulac2@abydosianchulac2 Жыл бұрын
  • 2:19 - I'm reminded of Weird Al's - White & Nerdy =)

    @arsenic1987@arsenic1987 Жыл бұрын
  • The 8d^2 approximation does actually get used in practice fairly often - if you're on a boat and see the tops of the masts of a ship over by the horizon, how far away is the ship? You could do this by doing trig, or you could just take a reasonable guess of how tall it is, divide it by 8, and take the square root.

    @abcadef6171@abcadef6171 Жыл бұрын
  • gotta say overleaf is probably the most appropriate ad I've seen in a maths video. Thanks Matt and overleaf!

    @nateiverson8681@nateiverson8681 Жыл бұрын
  • I was wondering about those rungebot tweets... Turns out problem was that rungebot always tried to plot -1 to +1 even if function is not defined on the entirety of the interval...

    @TrimutiusToo@TrimutiusToo Жыл бұрын
  • Love how my brain shouted use Chebyshev spacing, the moment I saw the equally spaced points. Guess numerics I wasn't complete and utter useless for me.

    @tpat90@tpat90 Жыл бұрын
  • I really, really enjoyed seeing the input into the spreadsheet, searching google, et cetera! I felt vividly connected to your thought process watching that segment. 😘

    @hTrae@hTrae Жыл бұрын
  • Yes. I believe the quadratic approximation to the earth dropping away is very commonly used in surveying and in artillery, and since if you want to survey a single distance or fire an artillery shell, it's effectively always less than .6 times the radius of the earth away, it's a safe assumption.

    @fsodn@fsodn Жыл бұрын
  • No barleycorns were harmed during the computation of the units conversions.😂

    @dbackscott@dbackscott Жыл бұрын
  • Anyone who's dealt with splines in solidworks has had the delight of discovering Runge Spikes. It is very common to make a small adjustment to a spline and end up with a disgusting mess. It is really cool to learn just how CAD software actually handles the maths behind splines.

    @Y2Kmeltdown@Y2Kmeltdown Жыл бұрын
    • Don't remind me of that. How often have splines messed up my carefully designed shape to fit a given part in a mould that could actually be machined in a affordable way

      @Craftlngo@Craftlngo Жыл бұрын
  • The name Runge brings memories of my student days when I was only starting with numeric methods

    @aidarosullivan5269@aidarosullivan5269 Жыл бұрын
  • I hated math as a kid. I used to skip it and tell my art teacher my next class was a free period. Eventually my math teacher came down to the art room and hauled me out. But eventually I grew to appreciate math.... eventually. Thanks Matt, loved your book by the way.

    @peterthinks@peterthinks Жыл бұрын
    • And hopefully appreciate the overlap between the two fields?

      @bsharpmajorscale@bsharpmajorscale Жыл бұрын
    • @@bsharpmajorscale Only overlap I can see is architecture

      @neurofiedyamato8763@neurofiedyamato8763 Жыл бұрын
    • @@neurofiedyamato8763 There's way more than just that. And more than just the so-called Golden Ratio.

      @bsharpmajorscale@bsharpmajorscale Жыл бұрын
    • math is art

      @mrosskne@mrosskne Жыл бұрын
    • @@neurofiedyamato8763 music also

      @lerarosalene@lerarosalene Жыл бұрын
  • Very excited to have this show up, as it is one of the things I'm studying right now, exam in two days even. One note: Chebyshev nodes do not guarantee no blow-up of the approximation error; One can construct a continuous function such that the error blows up. BUT for functions at least one time continuously differentiable (i.e. in C^1), the error always converges, which is amazing. Also any potential (and rare) blowup is logarithmic, so pretty tame for polynomials. There is even a sad theorem that for any choice of interpolation nodes, one can find a function such that the (polynomial) approximation error blows up with more and more nodes. So for an 'A priori' choice of interpolation nodes, Chebyshev nodes will likely remain the best choice forever. Hope I got everything right, this is one of my favourite topics, thanks for covering it!

    @CampingAvocado@CampingAvocado Жыл бұрын
    • Fascinating! But I really want to get the second bit. Forgive my bad non-quote: Given a set of nodes... adding nodes blows up. How does one add nodes to a given set of nodes? Easy to do, but is the claim that one can construct a function such that no matter where another node is added to the given set, the error in the interval of the nodes between the goal function and the polynomial fit to the nodes is always larger than the error with the original set of nodes? If I got that right, what is the measure of error? Largest single error in the interval? RMS error?

      @jimbrookhyser@jimbrookhyser Жыл бұрын
    • @@jimbrookhyser You're right that the second bit is a bit unclear and handwavy by me. Looking up the theorem again, it says: Given an arbitrary sequence of increasing sets of nodes (i.e. we choose to increase the number of nodes in some way, e.g. with chebyshev spacing), one can always find a continuous function such that the error of the approximation (we typically consider the Supremum norm, which in this case is the maximum distance between too values of the functions but other norms should apply too) blows up as the number of nodes goes to infinity. This means that our choice of how to increase the number of nodes is done before we choose our evil function that makes the error blow up. If we could add nodes "dynamically", we could always find the best nodes for that particular function. There exist algorithms to do precisely that such as the "Remez Algorithm" but I'm not knowledgeable about them.

      @CampingAvocado@CampingAvocado Жыл бұрын
  • I'm amazed, the flat Earthers actually found out the first term of the taylor series for the trigonometric function! Well done!

    @davidebic@davidebic Жыл бұрын
    • They don't find out anything. They stumbled across the Taylor series at some point in their struggle to match the Mathematica to their belief

      @Craftlngo@Craftlngo Жыл бұрын
    • @@Craftlngo Yeah, true. Just wait for them to find out that they can also use inches over mile to the fourth, sixth, eight all the way up to infinity to better match predictions. They'll actually call it all a conspiracy because nothing can be infinite.

      @davidebic@davidebic Жыл бұрын
  • 3:55 The frustration you feel when the Flat Earth Math is actually kind of sorta correct

    @PTNLemay@PTNLemay Жыл бұрын
  • Literally every academic I know uses overleaf. It's a life-saver.

    @felipea.barretto7503@felipea.barretto7503 Жыл бұрын
    • Wish that was a thing when I was a student.. q_q

      @MiTheMer@MiTheMer Жыл бұрын
  • Learned this the hard way at work trying to use polynomial to interpolate missing weather data. Original data was hourly, but some gaps were weeks long. Ended up with temperatures above the surface of the sun 😅

    @leobarlach@leobarlach Жыл бұрын
  • Note that Kerbin from Kerbal Space Program is more like 85 inches per mile. That's the sort of thing where it becomes really very noticeable not just that it's not flat but that it's significantly smaller than Earth, although still immense.

    @petersmythe6462@petersmythe6462 Жыл бұрын
  • I'm constantly blown away by the power of Taylor series, even when I use the almost every day while I get my PhD. Math is just so heckin' rad!

    @christencourter2107@christencourter2107 Жыл бұрын
    • Calculators and computers also just use Taylor series to evaluate functions under the hood. You probably know that, but yeah; it's cool.

      @cubicinfinity2@cubicinfinity2 Жыл бұрын
    • @@cubicinfinity2 I did know that, and it is indeed very cool!

      @christencourter2107@christencourter2107 Жыл бұрын
  • Hi Matt & Lucie. So good to see you together on KZhead. I'd totally forgotten that you two are a pair.

    @BritishBeachcomber@BritishBeachcomber Жыл бұрын
  • You can get the formula with the distance squared with the help of the small angle approximation.

    @Tremoneck@Tremoneck Жыл бұрын
  • I would like to know why Chebychev nodes work so well as they do, and why the spikes appear in the first place

    @albertolando5268@albertolando5268 Жыл бұрын
    • the trick is that the first fit at the center being of a wider spacing also has it's strongest effect at the edge, by progressively reducing the spacing you both get tighter control of that segment since it's shorter and introduce less change on the next segment. for the same reason The specifics of why THAT spacing works best is probably down to it being x component of the circle formula (x^2 + y^2 = N) which is itself a polynomial that represents the smooth curve of a sphere.

      @TheVoidSinger@TheVoidSinger Жыл бұрын
    • Chebyshev nodes are the roots of the Chebyshev polynomial. And the Cebyshev polinomial is the polynomial of degree n, with fixed leading coefficient, that diverges the least from zero on [-1,1] in terms of maximal error. I'm not sure about the exact math of it, but it somehow follows that the interpolation polynomial with nodes spaced the same way as roots of the Chebyshev polynomial, diverges the least from the target function on [-1,1]. With some restrictions on the target function's continuity and smoothness, I assume. There is also the Chebyshev polynomial of the second kind, that doesn't minimize maximal error, but instead minimizes the integral of absolute value of error. It gives birth to a different set of nodes, and they are also sometimes used for interpolation.

      @bogdanlevi@bogdanlevi Жыл бұрын
    • In a similar manner, to see why the spikes appear, you can try to plot the polynomial (x+1)(x+0.9)(x+0.8)...(x+0.1)x(x-0.1)...(x-0.9)(x-1), that gives birth to the uniformly distributed nodes. This polynomial itself is quite spiky, and it even looks kind of similar to what's in the video.

      @bogdanlevi@bogdanlevi Жыл бұрын
  • I actually stumbled on both the effect and the solution accidentally a couple of years ago when visualizing the ellipticity of different orbits. Started with evenly spaced points on the Major axis but the joined ellipses looked horrible around the apsides. Re worked it to start with evenly spaced points on the circumference of a circle and boom, beautiful arcs at the apsides. Never thought to apply it to function fitting though, so thank you, I learned something new = )

    @TheVoidSinger@TheVoidSinger Жыл бұрын
  • Was the Semicircle distribution the mathematically best distribution or was it just the best "most general" distribution? I guess my question is if one could fine tune a distribution for any given plot that maximizes the accuracy of the approximation.

    @ParadoxProblems@ParadoxProblems Жыл бұрын
    • In terms of polynomial interpolation, there exist multiple sets, one of which are Chebyshev polynomials. The interpolation always goes hand in hand with using interpolation nodes specified by the roots of some of these polynomials. For Chebyshev polynomials, these roots are cos(k*pi/n) which for the interval [-1,1] exactly gives the semi-circle relation shown in the video. It can be shown mathematically that using Chebyshev for polynomial interpolation minimizes the error you make (deviations of the approximation from the actual function). And as i said, after choosing the type of polynomial, the interpolation nodes are fixed by the roots. So yes, in some sense the semi-circle nodes are the best distribution here. Further reading: Chebyshev polynomials and Chebyshev interpolation on wikipedia :)

      @mrcarps1511@mrcarps1511 Жыл бұрын
  • As soon as I saw "polynomial approximation" in the title I knew you were gonna talk about chebyshev nodes, since it's one of the coolest results in approximation theory to me

    @csunday95@csunday95 Жыл бұрын
  • I think the pup should be in every episode going forward.

    @piorfino@piorfino Жыл бұрын
  • Would love to see a comparison of this with Taylor approximations and best approximations (the whole projection into polynomial vector space stuff) too.

    @TehFilmFanatic@TehFilmFanatic Жыл бұрын
  • Feels weird to see a sponsorship of something that I have personally been using a LOT in the past couple of years! Overleaf is incredibly powerful, and has helped my studies very much.

    @ifroad33@ifroad33 Жыл бұрын
    • Came back to this video and saw my previous comment. I also wanted to add that there are a lot of resumé templates that can be imported to Overleaf. Very nice thing.

      @ifroad33@ifroad33 Жыл бұрын
  • I actually was on a forum with flat-earthers in HughesNet many decades ago. This would have been around 1993. And I came up with the same formula for the approximate distance to the Horizon by first driving it via the cosine relationship you showed and then using the first two terms of the Taylor expansion of cosine. And then of course making all the substitutions and conversions back from the metric system to the imperial system. I wonder if I accidentally wound up giving this formula to the flat-earthers that I was debating with.

    @michalchik@michalchik Жыл бұрын
  • The Auto-generated captions are amusing me with all the talk about "Chevy Chef" distributions on a "Jojoba" file.

    @HansLemurson@HansLemurson Жыл бұрын
  • Polynomial fitting is very handy in forward error correction. Nice and easy to follow. Except that you have to do it in a finite field. At least Ronge won't bother you there.

    @vylbird8014@vylbird8014 Жыл бұрын
  • The chebyshev spacing brought me back to my mechanical engineering mechanisms classes as this is used in creating a function generating 4 bar mechanism.

    @shaider1982@shaider1982 Жыл бұрын
  • I'm so glad I was great at maths in school. I'd hate to have missed out on all of the great content on your channel, Matt. Thank you! 👍👌

    @J.C...@J.C... Жыл бұрын
  • Matt's video topics seem to overlap more and more with subjects at my uni, I love it!

    @OlegDorbitt@OlegDorbitt Жыл бұрын
  • I like to use rational functions as approximations. I rarely feel the need to go above third order.

    @gsurfer04@gsurfer04 Жыл бұрын
  • Great to see you on Mastodon!

    @SamVekemans@SamVekemans Жыл бұрын
  • I remember seeing the a graph approximated Chebyshev-style and I was like why are some point so close together whaaat??and this video just really cleared it up! thanks a bunch!

    @pinkshortcomedy@pinkshortcomedy Жыл бұрын
  • My first thought was "that's not dimensionally correct". 3:42 When I was in the Scouts we had some maps that were 1:63360 scale. I mean it's 12 x 3 x 220 x 8, it makes perfect sense. As Newton said, "If I haven't seen further, it's because I'm standing on my head."

    @himoffthequakeroatbox4320@himoffthequakeroatbox4320 Жыл бұрын
  • I'm having finals in two days and that's one of the things I didn't understand fully. Matt, you were sent down by the God to help me pass.

    @ArtiKox@ArtiKox Жыл бұрын
    • Good luck with your exam!

      @Craftlngo@Craftlngo Жыл бұрын
    • I cannot see how this video helps in anyway.... Lagrange interpolation isn't hard to do and this video doesn't even help or show you how to do it in anyway whatsoevder. I am convinced this comment is from a bot

      @pyropulseIXXI@pyropulseIXXI Жыл бұрын
    • @@pyropulseIXXI your mom's a bot. Also I think I passed, will have to wait till saturday for results

      @ArtiKox@ArtiKox Жыл бұрын
    • @@pyropulseIXXI I passed by the way. And Runge phenomenon didn't appear on exam once

      @ArtiKox@ArtiKox Жыл бұрын
  • this reminds me of the Gibbs phenomenon: when you try to get a square wave pulse, the sharper you make the edges the more "spikes" you get on them. It has something to do with fourier transform but I can't remember exactly how it relates. Also is it just me or does the polynomial aproximation shown looks exactly like sinx/x ?

    @panakon366@panakon366 Жыл бұрын
    • I'm not an electrical engineer nor do I have much experience in signal processing, but I remember doing some research about this a while ago, so here you go: It's because perfect sharp edges require you have infinite impulse response due to the required straight up and down lines, which is, of course, impossible. This is why you get the ringing effect. I'm not sure if it's related to Fourier Transforms, but given my experience trying to approximate square waves with them, it sounds related.

      @nikkiofthevalley@nikkiofthevalley Жыл бұрын
  • really like the improvement in production value, videos are much more fun now :)

    @wackyroo@wackyroo Жыл бұрын
  • love the switches from light to dark theme as you search

    @noomade@noomade Жыл бұрын
  • Just wanna remind everyone that Matt did a kickstarter in April 2022 that took £100,000, and we haven't had an update since December even though it's now almost six months overdue from the estimated delivery time. Don't let him forget all the people waiting for this. Really feels like it's been swept under the rug.

    @rchlclr@rchlclr Жыл бұрын
    • I am not aware of this, so can someone reply to this message so I can see if the thread ends up deleted?

      @General12th@General12th Жыл бұрын
    • @@General12th oki

      @Bob-np2uc@Bob-np2uc Жыл бұрын
    • If you expect anything on kickstarter to be delivered on time I have a kickstarter up right now for an elevated water crossing near Brooklyn that is guaranteed to be on time.

      @MichaelOnines@MichaelOnines Жыл бұрын
    • It would defenetly be nice to know what is going on with that

      @see.m.1914@see.m.1914 Жыл бұрын
    • @@MichaelOnines I never expect anything to be delivered on time. What I do think is reasonable to expect is communication from the person who is not delivering on time... it only requires a short update, not a Booker Prize winning novel.

      @philrichards7240@philrichards7240 Жыл бұрын
  • +1 For freedom respecting social media, like Mastodon

    @AleksyGrabovski@AleksyGrabovski Жыл бұрын
  • Matt Scroggs supervised my maths course at uni last year, great guy and great supervisor

    @henrywall7395@henrywall7395 Жыл бұрын
  • Hey Matt! Thanks a lot. I stumbled upon this exact problem with this exact function while researching problems to give to students of mine, and since then I was too lazy to research what it was and how to fix it.

    @gaetanramos7903@gaetanramos7903 Жыл бұрын
  • Slightly related, from what I have seen online and in the US, I think something that holds back numerical literacy today is that many people were not taught how to properly handle units. I was taught unit/dimensional analysis for the first time in 10th grade (UK year 11 equivalent) in my physics class, which was not required by my district. I imagine a vast majority of adults in my area were never introduced to that way of thinking and when presented information that is strange or just blatantly nonsensical, they weren't given the basic tools to understand that.

    @DrTacoPHD665@DrTacoPHD665 Жыл бұрын
  • I have used the Chebyshev Spacing before, but I came up with it on my own, no heavy math, just kind of manually. I was not aware that it even had a name, now I know super cool.

    @ikocheratcr@ikocheratcr Жыл бұрын
  • Its hilarious that this video just came out and we just covered this exact topic in my numerical methods class!

    @tariqirshaid@tariqirshaid Жыл бұрын
  • My physics professor assigns us Latex problems on overleaf. Can confirm, it's wonderful.

    @bow-tiedengineer4453@bow-tiedengineer4453 Жыл бұрын
  • Your editor deserves a raise

    @silaswarren8418@silaswarren8418 Жыл бұрын
    • Alex Genn-Bash

      @cara-setun@cara-setun Жыл бұрын
  • Im really tired of flat earthers getting the press they do, in general, but I have really enjoyed a lot of the neat different proofs I have seen for showing the earth is not flat. At least something positive has come from all of this. Thanks Matt! I have seen a video that actually showed a visual drop of the base of a structure that should actually be visible if the earth were flat. A cool cad program showing how a building large enough would have to compensate for the curvature of the earth and tons of stuff.

    @Sluggernaut@Sluggernaut Жыл бұрын
  • I love your units. Very creative and unique

    @RippoZer0@RippoZer0 Жыл бұрын
  • Samuel Rowbotham in his first version of Zetetic Astronomy included the Encyclopedia Britannica article on levelling. That gives the derivation of a surveyors approximation of 8.008 inches times the square of the distance in miles. The drop is the radial drop, not the perpendicular to the tangent.

    @sthurston2@sthurston2 Жыл бұрын
  • For the Earth drop formula, is this not just an example of a small-angle approximation. With those you can drop the trig functions by assuming that Sin A = A when A js a small angle.

    @lukemartin9209@lukemartin9209 Жыл бұрын
  • Not sure if this was covered in the video since I didn't have time to watch all of it, but there's a really obvious reason as to why a quadratic works so well out to even a few hundred miles. The exact formula is given by r*(1 - cos(d/r)). We know that cos(d/r) = 1 - (d/r)^2/2 + (d/r)^4/24 + ..., so the exact formula equals d^2/(2*r) - d^4/(24*r^3) + ... In short, we have a small angle approximation that looks quadratic for maybe the first 10 degrees of rotation around the earth.

    @robertmines5577@robertmines5577 Жыл бұрын
  • Matt: I'm a baller. Me: One might even say, a shoot caller.

    @trevormacintosh3939@trevormacintosh3939 Жыл бұрын
  • Right on. Thanks for sharing.

    @ruperterskin2117@ruperterskin21175 ай бұрын
  • I used Overleaf in my engineering undergrad for most of my group papers. It takes two hours to learn and saves dozens over using Word. One thing you didn't mention that makes it so great is it has live updates. So you see in real time what your collaborators are doing vs Word where you have to update every so often manually.

    @Virtuous_Rogue@Virtuous_Rogue Жыл бұрын
    • Imo word is "fine" until you have to use equations, but i never did past highschool. You used to be better of not turning on live updates when working with groups to prevent desyncs, and teams+word should, or drive docs do, work great when working with other ppl on a doc.

      @someonespotatohmm9513@someonespotatohmm9513 Жыл бұрын
    • Word is fine (I rewrote the Microsoft Word training document for my company after being there 9 months) but it has some clunkiness to it that Overleaf doesn't. In particular I remember using Teams had a weird way of handling formatting and it was hard to tell where section breaks were. That part was really important where I worked because we were constantly changing between landscape and portrait mode to fit tables and figures inside the margins. I haven't used much of Google's office stuff but tend to get annoyed when using Sheets because stuff is missing or moved from where it would be in Excel.

      @Virtuous_Rogue@Virtuous_Rogue Жыл бұрын
  • 4:31 The Flat Earthers are not stupid on math. They are capable of making a projection of what their opponents' theory would imply, intellectually. The _real_ problem is, the kind of drop they measure below your horizon is, the kind of horizon you see if your eyes are down on the ground of a totally flat landscape. Part of the reason you actually see further is, you might be standing on something elevated in the landscape. But another part is, you are arguably standing, when you look for the horizon. This changes the equation, since you are yourself elevated.

    @hglundahl@hglundahl Жыл бұрын
  • Allright, the spreadsheet glasses got me. I'm hooked in for the whole video now. (Not that I wouldnt have watched all of it anyway)

    @bIindguy123@bIindguy123 Жыл бұрын
  • Some flat earthers accidentally claimed that their community has members from "all around the globe".

    @skyscraperfan@skyscraperfan Жыл бұрын
  • Please do a video on the more arcane trig identities, like secant, cosecant, versine, etc. My memory might be wrong on the details, but I think even in quantum mechanics they will use 1/cos x rather than use the secant of x, which I feel misses out on what the maths is actually telling us (plus it just looks more elegant). I learned the trig identities when I began debunking flat Earthers many MANY moons ago, and was amazed to learn what they were telling me mathematically about some very basic geometry. I think it's a shame we've mostly lost them not just from the classroom, but also obviously from advanced academia. They're very beautiful when you get to realise what they are and how they work. I mean, we use the haversine formula to calculate the shape of the Earth, and barely anyone would be able to tell you how it works or what half a versed sine even is. I just think that's a bit of a shame. Like we're losing something important in the maths by not acknowledging these identities enough. Or maybe I'm just a hopeless maths romantic? 🤣 One thing I can tell you is that debunking flat Earthers made me fall in love with maths - specifically geometry and trigonometry - again, to the point I'm pretty sure I've invented a theorem that didn't exist before about how the baseline of a right angled triangle grows as the apex angle increases whilst the height remains constant. Pretty useless, and I'm not surprised if nobody's done it before, because it's only use seems to be to debunk flat Earthers, but it was a lot of fun to figure out anyway. And if I am by some weird miracle to be the first person to come up with it, there's a mischievous part of me that enjoys my legacy being coming up with a mathematical theorem that is totally useless and means nothing to anyone in the greater scheme of things 😉🤣

    @MahraiZiller@MahraiZiller Жыл бұрын
    • This is a nice idea! :) would love to watch a video about it

      @linazso@linazso Жыл бұрын
  • I look forward to more collabs with doggo and wife

    @setharnold9764@setharnold9764 Жыл бұрын
  • "You don't want to do trig on the fly" - So true, Matt.

    @ChadAbney@ChadAbney Жыл бұрын
  • Oh wow, i was just learning how to do a numeric laplace transform from piecewise spline approximations on a dataset. I had no notion of the Runge spikes before this video, but kept getting them constantly... This video has been very useful

    @SuicideRedemption100@SuicideRedemption1005 ай бұрын
  • Could you also do a video explaining how to use these polynomial approximations to approximate integrals? I really love the topic

    @JonathanMandrake@JonathanMandrake Жыл бұрын
    • Well you simply integrate the polynomial afterwards, it's that simple

      @freshrockpapa-e7799@freshrockpapa-e7799 Жыл бұрын
    • @@freshrockpapa-e7799 Well yes, but unlike approximating the functions themselves, the approximate integrals always converge towards the real integral, assuming you're doing it right

      @JonathanMandrake@JonathanMandrake Жыл бұрын
    • @@k0pstl939 That's something completely different...

      @JonathanMandrake@JonathanMandrake Жыл бұрын
    • @@JonathanMandrake I misread the comment, sorry

      @k0pstl939@k0pstl939 Жыл бұрын
    • en.wikipedia.org/wiki/Gaussian_quadrature

      @user-hx8hn2bu7i@user-hx8hn2bu7i Жыл бұрын
  • As an engineer who tries to draw with the spline tool often, I have an intuitive sense for this phenomenon.

    @evanbasnaw@evanbasnaw Жыл бұрын
  • 9:30 Ahh, the inverse quadratic radial basis function. Warms my heart.

    @ddognine@ddognine5 ай бұрын
  • thumbnail got my interest, and then the start of the video threw me for a loop. this is cool

    @AMassiveHeadache@AMassiveHeadache Жыл бұрын
  • While this is an awesome empirical formula to use (and as another commenter pointed out, it also works for cm/km too!) If you want a unitless approximation formula: Take the cosine approximation, cos(th) = 1 - th^2 / 2 And plug into the equation derived in the video, h = r [ 1-cos(d/r)] And you get, after simplifying, h = d^2 / 2r Which is a pretty nice result as well!

    @jacobbaer785@jacobbaer785 Жыл бұрын
  • I need a warning sign for this. "CAUTION: Runge Spikes. Do not interpolate."

    @yobgodababua1862@yobgodababua1862 Жыл бұрын
    • Severe approximation damage.

      @HunterJE@HunterJE Жыл бұрын
  • Uncle Runge gonna shiv ya. Too funny, I was just reading up on Runge's phenomenon just yesterday when thinking about fitting data with linear regression models.

    @pipertripp@pipertripp Жыл бұрын
  • Just started following you on Mastadon!

    @pirana6@pirana6 Жыл бұрын
  • I used Overleaf for my PhD thesis.

    @gsurfer04@gsurfer04 Жыл бұрын
    • self hosted? how long was your compile time?

      @yeetyeet7070@yeetyeet7070 Жыл бұрын
  • 5:50 did you just discover taylor approximations? 🤔

    @mgostIH@mgostIH Жыл бұрын
    • This is a different method than Taylor. Taylor gets you “the best” approximation right by the point you expand, but it degrades over distance.

      @RichardDamon@RichardDamon Жыл бұрын
    • Isn't Taylor just around a single point not for an entire function

      @justarandomdood@justarandomdood Жыл бұрын
    • @@RichardDamon later on he explains polynomial interpolation on multiple points, but the quadratic flat earther one is a Taylor approximation of the cosine of order 2 centered at x=0

      @mgostIH@mgostIH Жыл бұрын
    • @@justarandomdood Tayler can often (for “smooth” functions) give a reasonable approximation for a larger range. Being simple to explain and often to compute, it is often a “first approximation” used to get a polynomial fit. Yes, other approximations may be better, but tend to be harder to compute the terms too. Taylor also has the advantage that to increase the order, you just need to compute the new terms, most other require you to start over.

      @bostonchurch_central@bostonchurch_central Жыл бұрын
  • The name Chebyshev comes up in amateur radio as a common type of filter that may be designed either as a pass-band or stop-band filter. The advantage of this filter type is that it has sharper band edges (cutoff) than some other filter designs, but they suffer from some ripple in the pass- or stop-band.

    @DanielHallmark@DanielHallmark Жыл бұрын
  • The 'Chevy Chef' in the closed captions just killed me !!! 🤣

    @samuelbrisseau2694@samuelbrisseau2694 Жыл бұрын
KZhead