Beware the Runge Spikes!

Поділитися
Вставка

КОМЕНТАРІ • 1,4 тис.

  • @m.h.6470
    @m.h.6470 Рік тому +811

    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.

    • @PanozGTR2
      @PanozGTR2 Рік тому +121

      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.

    • @cainabel2553
      @cainabel2553 Рік тому +3

      Given that NASA says planes fly on a flat earth, which bridges aren't built on a flat earth?

    • @westernbrumby
      @westernbrumby Рік тому +25

      @@cainabel2553NASA lied to you

    • @RoryMag
      @RoryMag Рік тому +41

      How ironic, they took it from a real world case where it is needed to account for the curvature of the earth.

    • @KnakuanaRka
      @KnakuanaRka Рік тому +46

      @@cainabel2553 [citation needed]

  • @airatvaliullin8420
    @airatvaliullin8420 Рік тому +1958

    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

    • @MaGaO
      @MaGaO Рік тому +286

      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)² ).

    • @alexandrezani
      @alexandrezani Рік тому +108

      @@MaGaO I wonder if maybe they found the equation in a surveyor's training manual or some such.

    • @scott5146
      @scott5146 Рік тому +82

      Also the error term is of the order x^4, so really is tiny when x is tiny to start with.

    • @JNCressey
      @JNCressey Рік тому +56

      and the constant in that approximation is simply 1/(diameter of earth)
      = 1.26×10^-4 reciprocal miles
      ~ 8 inch/mile^2

    • @iang0th
      @iang0th Рік тому +89

      @@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.

  • @TheCammerhammer
    @TheCammerhammer Рік тому +1922

    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.

    • @BaronBytes
      @BaronBytes Рік тому +66

      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.

    • @matousfiala5925
      @matousfiala5925 Рік тому +36

      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?

    • @andymcl92
      @andymcl92 Рік тому +21

      He's a baller, and game recognises game!

    • @alansmithee419
      @alansmithee419 Рік тому +43

      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.

    • @colonelrabbit1104
      @colonelrabbit1104 Рік тому +53

      ​@@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)

  • @jsbarretto
    @jsbarretto Рік тому +742

    I love that the first 6 minutes is literally just rediscovering taylor series from first principles, that was fun

    • @pyropulseIXXI
      @pyropulseIXXI Рік тому +23

      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

    • @deadinside9966
      @deadinside9966 Рік тому +89

      @@pyropulseIXXI well, that particular example with 8d^2 was definitely derived from Taylor series

    • @VioletCatastrophe
      @VioletCatastrophe Рік тому +57

      @@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.

    • @curtiswfranks
      @curtiswfranks Рік тому +2

      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.

  • @Sam_on_YouTube
    @Sam_on_YouTube Рік тому +149

    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.

    • @wrex509
      @wrex509 Рік тому +3

      @@gregoryford2532 engineers are still better than architects

    • @dielaughing73
      @dielaughing73 Рік тому +29

      I'm having trouble understanding what kind of 'gotcha' they think they've found in a very simple and well-understood rule of thumb..

    • @Nightriser271828
      @Nightriser271828 Рік тому

      Exactly my thoughts.

    • @AMorphicTool
      @AMorphicTool Рік тому +16

      @@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.)

    • @FerretWarlord1
      @FerretWarlord1 Рік тому +12

      @@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.

  • @nicholasvinen
    @nicholasvinen Рік тому +171

    “With four parameters I can fit an elephant, and with five I can make him wiggle his trunk” - Johnny von Neumann

  • @ethansnyder2234
    @ethansnyder2234 Рік тому +157

    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.

    • @Septimus_ii
      @Septimus_ii Рік тому +5

      That’s extremely useful

    • @onelastmore5924
      @onelastmore5924 Рік тому +5

      I think he is using a Mac, so you need cmd+T

    • @DraconianEmpath
      @DraconianEmpath Рік тому +1

      woah, really? how did I not know this? I'm gonna go try it!

    • @slash_me
      @slash_me Рік тому +19

      Also, if you press F4 repeatedly, it will cycle through the possible reference modes (relative, absolute, absolute column, absolute row)

    • @Adskdnweotland
      @Adskdnweotland Рік тому

      thank you!

  • @matyastorok8624
    @matyastorok8624 Рік тому +258

    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 Рік тому +45

      @@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.

    • @ilmt
      @ilmt Рік тому +3

      @@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.

    • @harrygenderson6847
      @harrygenderson6847 Рік тому +1

      @@ilmt You may be thinking of splines. However they're usually not single polynomials, so I may be wrong.

    • @smolboi9659
      @smolboi9659 Рік тому

      ​​​​@@ilmtit's hermite interpolation

  • @MarcelCox1
    @MarcelCox1 Рік тому +13

    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.

  • @rabbiboazmarmon7723
    @rabbiboazmarmon7723 Рік тому +72

    “That’s still over the horizon, if you will. Or, indeed, won’t.” 😂😂😂 That’s some baller humor right there.

    • @fprosk
      @fprosk Рік тому

      COMIN THRU

  • @Phr8
    @Phr8 Рік тому +379

    1:51 spat out my tea laughing at Matt being a baller.

  • @garrick3727
    @garrick3727 Рік тому +64

    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.

    • @steviebudden3397
      @steviebudden3397 Рік тому +10

      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.

  • @nateiverson8681
    @nateiverson8681 Рік тому +7

    gotta say overleaf is probably the most appropriate ad I've seen in a maths video. Thanks Matt and overleaf!

  • @AJSevel
    @AJSevel Рік тому +136

    I just have to say the baller glasses made of spreadsheets made my evening. Just the right amount of hilarious detail.

  • @CampingAvocado
    @CampingAvocado Рік тому +21

    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!

    • @jimbrookhyser
      @jimbrookhyser Рік тому

      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?

    • @CampingAvocado
      @CampingAvocado Рік тому

      @@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.

  • @romanprekop6613
    @romanprekop6613 Рік тому +26

    The gangsta shades made of excel is just pure genius!

  • @flikersprigs5641
    @flikersprigs5641 Рік тому +12

    the 8in/mi^2 is a surveyor's approximation so it makes sense that its very close

    • @thekaxmax
      @thekaxmax Рік тому +1

      Also, where they'd have got it from. Cos most don't have the schooling to work this stuff out

  • @Valeriobrogni
    @Valeriobrogni Рік тому +243

    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

    • @PerMortensen
      @PerMortensen Рік тому +8

      Huh, that's an interesting coincidence!

    • @polyacov_yury
      @polyacov_yury Рік тому +31

      @@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

    • @georgH
      @georgH Рік тому +15

      @@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

    • @gordonrichardson2972
      @gordonrichardson2972 Рік тому +4

      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.

    • @SeekingTheLoveThatGodMeans7648
      @SeekingTheLoveThatGodMeans7648 Рік тому +3

      The US is semi civilized

  • @thomasstogiannopoulos83
    @thomasstogiannopoulos83 Рік тому +58

    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.

  • @hTrae
    @hTrae Рік тому +22

    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. 😘

  • @abcadef6171
    @abcadef6171 Рік тому +8

    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.

  • @RichardDamon
    @RichardDamon Рік тому +208

    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.

    • @ikocheratcr
      @ikocheratcr Рік тому +38

      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.

    • @roflchopter11
      @roflchopter11 Рік тому +5

      Yeah, extrapolation has some problems

    • @badlydrawnturtle8484
      @badlydrawnturtle8484 Рік тому +16

      @@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.

    • @Pablo360able
      @Pablo360able Рік тому +12

      Extrapolation is sketch in general, not just for polynomials.

    • @bostonchurch_central
      @bostonchurch_central Рік тому +15

      @@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.

  • @larryscott3982
    @larryscott3982 Рік тому +8

    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.

  • @fsodn
    @fsodn Рік тому +22

    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.

  • @juakofz
    @juakofz Рік тому +1355

    Gotta love watching people suffer using imperial units :D

    • @BaronBytes
      @BaronBytes Рік тому +114

      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.

    • @troik_live
      @troik_live Рік тому +18

      @@BaronBytes I wonder if it makes sense to those raised using imperial units

    • @sabaneyev
      @sabaneyev Рік тому +81

      @@troik_live it doesnt :)

    • @mipsuperk
      @mipsuperk Рік тому +52

      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?

    • @Elitekross
      @Elitekross Рік тому +36

      @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.

  • @Y2Kmeltdown
    @Y2Kmeltdown Рік тому +5

    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.

    • @Craftlngo
      @Craftlngo Рік тому +3

      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

  • @aidarosullivan5269
    @aidarosullivan5269 Рік тому +6

    The name Runge brings memories of my student days when I was only starting with numeric methods

  • @abydosianchulac2
    @abydosianchulac2 Рік тому +10

    You're making clear why all my attempts at vector graphic design failed miserably to match what I intended.

  • @ifroad33
    @ifroad33 Рік тому +5

    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.

  • @TheVoidSinger
    @TheVoidSinger Рік тому +6

    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 = )

  • @TrimutiusToo
    @TrimutiusToo Рік тому +12

    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...

  • @shaider1982
    @shaider1982 Рік тому +3

    The chebyshev spacing brought me back to my mechanical engineering mechanisms classes as this is used in creating a function generating 4 bar mechanism.

  • @lucas.cardoso
    @lucas.cardoso Рік тому +147

    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 😂

  • @leobarlach
    @leobarlach Рік тому +3

    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 😅

  • @BritishBeachcomber
    @BritishBeachcomber Рік тому +8

    Hi Matt & Lucie. So good to see you together on UA-cam. I'd totally forgotten that you two are a pair.

  • @peterthinks
    @peterthinks Рік тому +27

    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.

    • @bsharpmajorscale
      @bsharpmajorscale Рік тому +1

      And hopefully appreciate the overlap between the two fields?

    • @neurofiedyamato8763
      @neurofiedyamato8763 Рік тому

      @@bsharpmajorscale Only overlap I can see is architecture

    • @bsharpmajorscale
      @bsharpmajorscale Рік тому

      @@neurofiedyamato8763 There's way more than just that. And more than just the so-called Golden Ratio.

    • @mrosskne
      @mrosskne Рік тому

      math is art

    • @lerarosalene
      @lerarosalene Рік тому

      @@neurofiedyamato8763 music also

  • @petersmythe6462
    @petersmythe6462 Рік тому +3

    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.

  • @christencourter2107
    @christencourter2107 Рік тому +13

    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!

    • @cubicinfinity2
      @cubicinfinity2 Рік тому +3

      Calculators and computers also just use Taylor series to evaluate functions under the hood. You probably know that, but yeah; it's cool.

    • @christencourter2107
      @christencourter2107 Рік тому +2

      @@cubicinfinity2 I did know that, and it is indeed very cool!

  • @egilsandnes9637
    @egilsandnes9637 Рік тому +7

    Matt talking to his dog:
    "Yeees, you would if you had to collaborate on a scientific dogument."

  • @bIindguy123
    @bIindguy123 Рік тому

    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)

  • @albertolando5268
    @albertolando5268 Рік тому +29

    I would like to know why Chebychev nodes work so well as they do, and why the spikes appear in the first place

    • @TheVoidSinger
      @TheVoidSinger Рік тому +12

      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.

    • @bogdanlevi
      @bogdanlevi Рік тому +1

      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 Рік тому +1

      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.

  • @tpat90
    @tpat90 Рік тому +2

    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.

  • @Tremoneck
    @Tremoneck Рік тому +5

    You can get the formula with the distance squared with the help of the small angle approximation.

  • @arsenic1987
    @arsenic1987 Рік тому +2

    2:19 - I'm reminded of Weird Al's - White & Nerdy =)

  • @vylbird8014
    @vylbird8014 Рік тому +5

    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.

  • @pinkshortcomedy
    @pinkshortcomedy Рік тому +1

    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!

  • @TehFilmFanatic
    @TehFilmFanatic Рік тому +12

    Would love to see a comparison of this with Taylor approximations and best approximations (the whole projection into polynomial vector space stuff) too.

  • @gaetanramos7903
    @gaetanramos7903 Рік тому

    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.

  • @csunday95
    @csunday95 Рік тому +11

    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

  • @SamVekemans
    @SamVekemans Рік тому +4

    Great to see you on Mastodon!

  • @davidebic
    @davidebic Рік тому +7

    I'm amazed, the flat Earthers actually found out the first term of the taylor series for the trigonometric function! Well done!

    • @Craftlngo
      @Craftlngo Рік тому +3

      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

    • @davidebic
      @davidebic Рік тому +5

      @@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.

    • @MrZcar350
      @MrZcar350 Місяць тому

      @@davidebic that's if they don't lead with "math(s) is made up nonsense".

  • @flatfingertuning727
    @flatfingertuning727 Рік тому

    The given trig-based formula assumes that horizontal distances are measured along the surface of the earth, but vertical distances are measured perpendicular to the straight horizon line. If horizontal distances are measured along the horizon line and vertical distances perpendicular to it, with a distnace of 1 representing the radius of the Earth, drop would be 1-sqrt(1-x^2).

  • @jacobbaer785
    @jacobbaer785 Рік тому +3

    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!

  • @DeJay7
    @DeJay7 2 місяці тому

    Matt realising that it actually approximates it really well was my reaction when I discovered the Taylor series of the sine function. Even after so much learning about that, I still find it rather incredible that it exists and it is so so simple.

  • @DrTacoPHD665
    @DrTacoPHD665 Рік тому +3

    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.

  • @michalchik
    @michalchik Рік тому +1

    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.

  • @robertmines5577
    @robertmines5577 Рік тому +3

    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.

  • @brianhunt6943
    @brianhunt6943 Рік тому +2

    um, not sure they came up with this approximation, but I was taught this 20 years ago in surveying class, or sticking with imperial it was 1 inch every 660 ft. Which is 10 survey chains. This was knowledge built into the US public land survey system. Which is why you have principal meridians and such to deal with the errors from curvature and terrain.

  • @ParadoxProblems
    @ParadoxProblems Рік тому +15

    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.

    • @mrcarps1511
      @mrcarps1511 Рік тому

      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 :)

  • @Metagross31
    @Metagross31 Рік тому +2

    Changing the spacing for your approximation sometimes feels like black magic and is super useful, especially in numerical integration!
    For some work I did, I used to do radial numerical integration on a equidistant grid and then switched to a Gauß-Legendre grid - the number of abscissas needed went down by so much (Like more than a factor of 10 iirc)! Furthermore, I switched some angular integrals to use points on a Gauß-Chebychev grid and without using more abscissas, the accuracy was much, much better, especially close to kinematically critical spots!
    It is very nice, seeing a popular youtuber putting some attention to this :)

  • @felipea.barretto7503
    @felipea.barretto7503 Рік тому +13

    Literally every academic I know uses overleaf. It's a life-saver.

    • @MiTheMer
      @MiTheMer Рік тому +1

      Wish that was a thing when I was a student.. q_q

  • @henrywall7395
    @henrywall7395 Рік тому

    Matt Scroggs supervised my maths course at uni last year, great guy and great supervisor

  • @gsurfer04
    @gsurfer04 Рік тому +8

    I like to use rational functions as approximations. I rarely feel the need to go above third order.

  • @sthurston2
    @sthurston2 Рік тому +2

    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.

  • @MahraiZiller
    @MahraiZiller Рік тому +3

    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 😉🤣

    • @linazso
      @linazso Рік тому

      This is a nice idea! :) would love to watch a video about it

  • @wackyroo
    @wackyroo Рік тому

    really like the improvement in production value, videos are much more fun now :)

  • @Sluggernaut
    @Sluggernaut Рік тому +3

    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.

  • @stevejohnson1685
    @stevejohnson1685 Рік тому +1

    This is an excellent explanation for the need for windowing functions for digital signal processing. Chebyshev polynomials do an excellent job of fitting within a specified window of interest, but as Matt shows, things go to hell outside of the range.

  • @ArtiKox
    @ArtiKox Рік тому +14

    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.

    • @Craftlngo
      @Craftlngo Рік тому

      Good luck with your exam!

    • @pyropulseIXXI
      @pyropulseIXXI Рік тому +1

      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

    • @ArtiKox
      @ArtiKox Рік тому +1

      @@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

  • @OlegDorbitt
    @OlegDorbitt Рік тому +1

    Matt's video topics seem to overlap more and more with subjects at my uni, I love it!

  • @PTNLemay
    @PTNLemay Рік тому +3

    3:55
    The frustration you feel when the Flat Earth Math is actually kind of sorta correct

  • @artiem5262
    @artiem5262 Рік тому +1

    Richard Hamming (Hamming codes, error correction, and more) explained it thusly: "Polynomials love to wiggle."

  • @piorfino
    @piorfino Рік тому +4

    I think the pup should be in every episode going forward.

  • @DanielHallmark
    @DanielHallmark Рік тому +2

    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.

  • @silaswarren8418
    @silaswarren8418 Рік тому +5

    Your editor deserves a raise

  • @adriansteele4783
    @adriansteele4783 Рік тому +1

    The same approximation comes up for beam deflection under a constant moment (equal moments applied at both ends). Needless to say, for steel beams, the radius of curvature is usually very large compared to the length of the beam. For an engineer like myself, anything within 1% is good enough. In my early career, when I worked as a welder, I used to use the same approximation for presetting/cambering beams.

  • @AleksyGrabovski
    @AleksyGrabovski Рік тому +7

    +1 For freedom respecting social media, like Mastodon

  • @johnreilly7154
    @johnreilly7154 Рік тому

    I have known that formula for over 40 years. I do radio planning and this is the distance to the horizon from antenna on top of a mountain, which is (sort of) the maximum range you can get for a radio signal. Of course nowadays we use computers which use much more accurate algorithms, but "Back then" it was the way we approximated. Using Miles and inches is just playing with different constants in the formula is the simplistic way I always viewed this phenomen. Since I am an engineer, I use formulas "that work" for any situation and this one did for any realistic height & distance. My Mentor always said "In radio planning there are three factors which matter for maximum range:- *Height, *Height and *Height" at Very High Frequency (VHF) ... going to much higher frequencies changes that.

  • @ikocheratcr
    @ikocheratcr Рік тому +8

    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.

  • @RustyWalker
    @RustyWalker 2 місяці тому

    I find the sagitta method more intuitive and as a bonus it's related to the sagitta between you and the point you're looking at. The drop is equivalent to the sagitta for a distance of 2d, since d, the distance between you and the target is half the arc length, with the other half of the arc being behind you.
    The sagitta is R-sqrt(R^2-L^2), and L is R*sin(a/2R) using radians, and a is 2d.
    If you use d rather than 2d, that's the sagitta between you and the target, as if the observer had moved half-way along that arc.
    They're related.
    Inches per mile is (12*5280).
    All 8d^2 does is ignore a term where R and R+h are virtually the same.
    Likewise, with the sagitta formula, you can treat L as approximately equal to d where d is small relative to R. This works because L is already half the chord length, and, as described in para. 1, d is half the arc length. Thus, you can use R-sqrt(R^2-d^2) as an alternative to 8d^2.
    It follows from what has preceded that you can use half of d to approximate the sagitta of the arc between you and the target, that flat Earthers often call the "hump." 8*(0.5d)^2 or R-sqrt(R^2-(0.5d)^2)
    Or just use the 8d^2 table that flat Earthers obligingly show you and find the line with 0.5d on it.
    It also follows that you can rearrange the formula to work out how far away the horizon is. It's less accurate because the drop is perpendicular to the tangent that touches the horizon and not the surface where the observer is when you draw the drop, but the difference in angle is negligible for small distances. Earth curves one degree every 69 miles approx.
    Example. We know for a 6 ft person at sea level, the horizon is about 3 miles away. How do we derive that from 8d^2? 8d^2=6*12 (remember the answer comes out in inches so we have to convert feet to inches).
    (6*12)/8=d^2.
    sqrt ((6*12)/8)=d.
    D=3 miles. The units already convert to miles when the input is in inches.

  • @panakon366
    @panakon366 Рік тому +8

    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 ?

    • @nikkiofthevalley
      @nikkiofthevalley Рік тому +5

      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.

  • @AMassiveHeadache
    @AMassiveHeadache Рік тому

    thumbnail got my interest, and then the start of the video threw me for a loop. this is cool

  • @JonathanMandrake
    @JonathanMandrake Рік тому +18

    Could you also do a video explaining how to use these polynomial approximations to approximate integrals? I really love the topic

    • @freshrockpapa-e7799
      @freshrockpapa-e7799 Рік тому +13

      Well you simply integrate the polynomial afterwards, it's that simple

    • @JonathanMandrake
      @JonathanMandrake Рік тому +1

      @@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 Рік тому +1

      @@k0pstl939 That's something completely different...

    • @k0pstl939
      @k0pstl939 Рік тому +1

      @@JonathanMandrake I misread the comment, sorry

    • @user-hx8hn2bu7i
      @user-hx8hn2bu7i Рік тому

      en.wikipedia.org/wiki/Gaussian_quadrature

  • @tariqirshaid
    @tariqirshaid Рік тому

    Its hilarious that this video just came out and we just covered this exact topic in my numerical methods class!

  • @hglundahl
    @hglundahl Рік тому +3

    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.

  • @CXLVII
    @CXLVII Рік тому

    Congratulations on 1 million subscribers!

  • @Virtuous_Rogue
    @Virtuous_Rogue Рік тому +8

    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.

    • @someonespotatohmm9513
      @someonespotatohmm9513 Рік тому +1

      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.

    • @Virtuous_Rogue
      @Virtuous_Rogue Рік тому

      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.

  • @roflchopter11
    @roflchopter11 Рік тому +2

    Don't forget that the Chebyshev nodes are also the pointa uses for Gaussian quadrature.

  • @iveharzing
    @iveharzing Рік тому +6

    I've been using Overleaf ever since I started my Bachelor in Physics 4 years ago, *I absolutely love it!*

  • @J.C...
    @J.C... Рік тому

    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! 👍👌

  • @evanbasnaw
    @evanbasnaw Рік тому +7

    As an engineer who tries to draw with the spline tool often, I have an intuitive sense for this phenomenon.

  • @reeflakin213
    @reeflakin213 Рік тому

    I finished reading Humble Pie last night, Future Matt (if you are reading this). Thought it was a very interesting read, and I could hear your voice when I was reading it! Already came in clutch today in a casual conversation with my housemates about the Lottery, so thank you for that!

  • @lukemartin9209
    @lukemartin9209 Рік тому +4

    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.

  • @henryginn7490
    @henryginn7490 Рік тому

    Lloyd Trefethen was my masters supervisor and I also took his course on polynomial approximation so I thought I'd share some fun facts
    There is actually a set of interpolation points that has a lower error in the one norm and it is called the best approximation. Those points depend on the function however and finding them is a not very nice non-linear process, also the best approximation can look wildly different if the degree isn't high enough, while Chebyshev will still do an alright job.
    There is no sequence of sets of interpolation points that will give convergence for all continuous functions. This sounds terrible for polynomial approximation, but many problems like this go away when you consider Lipschitz continuous functions which almost all functions would you actually deal with are.
    A Taylor series will converge in a disc around the point it is taken, where there are no singularities in the disc. We have something similar with Chebyshev interpolation, that region is no longer circle but is called the Runge region, and is shaped like an american football.

  • @setharnold9764
    @setharnold9764 Рік тому +4

    I look forward to more collabs with doggo and wife

  • @HansLemurson
    @HansLemurson Рік тому

    The Auto-generated captions are amusing me with all the talk about "Chevy Chef" distributions on a "Jojoba" file.

  • @gsurfer04
    @gsurfer04 Рік тому +17

    I used Overleaf for my PhD thesis.

    • @yeetyeet7070
      @yeetyeet7070 Рік тому +2

      self hosted?
      how long was your compile time?

  • @zachwak
    @zachwak Рік тому +1

    I LOVE OVERLEAF!!!!! Its the best latex editor hands down

    • @Craftlngo
      @Craftlngo Рік тому

      I might give it a try. I'm still stuck with LyX

  • @MrFusselig
    @MrFusselig Рік тому +4

    3:33 you deserved that for not doing it in metric! Problems that just exist in the USA.

  • @bow-tiedengineer4453
    @bow-tiedengineer4453 Рік тому

    My physics professor assigns us Latex problems on overleaf. Can confirm, it's wonderful.