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.
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.
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
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 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.
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.
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.
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?
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.
@@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)
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 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.
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.
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.
@@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.)
@@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.
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.
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).
@@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 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.
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.
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 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 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
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.
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.
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.
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.
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.
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.
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.
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 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.
@@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.
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. 😘
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!
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 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.
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.
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.
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.
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?
@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.
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 = )
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.
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
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.
Would love to see a comparison of this with Taylor approximations and best approximations (the whole projection into polynomial vector space stuff) too.
@@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.
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...
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.
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 :)
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.
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!
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.
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.
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.
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 :)
The chebyshev spacing brought me back to my mechanical engineering mechanisms classes as this is used in creating a function generating 4 bar mechanism.
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.
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 😅
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.
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
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
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.
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.
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.
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.
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).
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.
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.
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!
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 ?
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.
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.
@@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
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.
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.
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.
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.
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.
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.
Great video, loved the Flat Earther's surprisingly good approximation, loved the animations, loved the Chebyshev Spacing (loved TH-cam's hilarious attempts to auto-generate subtitles!) and I love Overleaf too (I've used it for several years now, it's so convenient, links with Dropbox, and the collaboration feature is perfect)!
For extra credit, account for "down" at the second point being radial to the center of the earth rather than perpendicular to the sight line from the first point. (courtesy of your friendly. Neighborhood land surveyor)
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 😉🤣
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.
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!
I'm going to struggle to express my thoughts now: Watching that trig function turn cyclical and that quadratic turn (exponential, asymptotic? I dunno) was gorgeous. That's honestly the first time the arcane gibberish of a polynomial has made intuitive sense, it's like suddenly being able to read, where can I get more of this? Runge's phenomenon, I'm wondering about applying that to engineering system responses ie. if I see it from a controller have I found a failure case, can I now hunt around for a better controller, does this give any clues as to what a better controller design might be? And actual question from me, is there any analogue out there that models these equations? Something like rubber bands connected through pins or something, or bits of string and weights.
For a controller, Chebychev polynomials can be a good choice. These can be very good, but it's getting much more complicated than a single PID controller.
the term you're looking for, with quadratics, would be parabolic, btw. nothing else to add, just thought I'd chime in, so that you can add the small trivia tidbit, that quadratic equations produce parabolic shapes to your mental toolbox.
@@peterbonucci9661 true, PID are much simpler to implement. But you don't get far with a PID feedback controllers in more advanced situations like the calculation of the inverse kinematics of a robot arm for example. That's where you are way more flexible and accurate with a polynomial approximation.
@@Craftlngo Good. I didn't know what level of math you use. My specialty is filter which is next door to controls. We use rational expressions for curve fitting all of the time. Chebychev polynomials are part of it.
@@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
@@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.
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.
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.
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.
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.
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.
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.
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.
Given that NASA says planes fly on a flat earth, which bridges aren't built on a flat earth?
@@cainabel2553NASA lied to you
How ironic, they took it from a real world case where it is needed to account for the curvature of the earth.
@@cainabel2553 [citation needed]
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
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 I wonder if maybe they found the equation in a surveyor's training manual or some such.
Also the error term is of the order x^4, so really is tiny when x is tiny to start with.
and the constant in that approximation is simply 1/(diameter of earth)
= 1.26×10^-4 reciprocal miles
~ 8 inch/mile^2
@@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.
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.
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.
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?
He's a baller, and game recognises game!
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.
@@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)
I love that the first 6 minutes is literally just rediscovering taylor series from first principles, that was fun
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 well, that particular example with 8d^2 was definitely derived from Taylor series
@@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.
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.
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.
@@gregoryford2532 engineers are still better than architects
I'm having trouble understanding what kind of 'gotcha' they think they've found in a very simple and well-understood rule of thumb..
Exactly my thoughts.
@@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.)
@@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.
“With four parameters I can fit an elephant, and with five I can make him wiggle his trunk” - Johnny von Neumann
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.
That’s extremely useful
I think he is using a Mac, so you need cmd+T
woah, really? how did I not know this? I'm gonna go try it!
Also, if you press F4 repeatedly, it will cycle through the possible reference modes (relative, absolute, absolute column, absolute row)
thank you!
1:51 spat out my tea laughing at Matt being a baller.
_coming through_
And 2:17 thug glasses made out of spreadsheets. That’s exponentially baller-er!
Not a baller, Matt. Clearly you’re a Roundhead.
He could never be ballin
314 likes, nice
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).
@@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 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 You may be thinking of splines. However they're usually not single polynomials, so I may be wrong.
@@ilmtit's hermite interpolation
I just have to say the baller glasses made of spreadsheets made my evening. Just the right amount of hilarious detail.
“That’s still over the horizon, if you will. Or, indeed, won’t.” 😂😂😂 That’s some baller humor right there.
COMIN THRU
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.
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
Huh, that's an interesting coincidence!
@@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 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
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.
The US is semi civilized
The gangsta shades made of excel is just pure genius!
gotta say overleaf is probably the most appropriate ad I've seen in a maths video. Thanks Matt and overleaf!
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.
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.
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.
2:19 - I'm reminded of Weird Al's - White & Nerdy =)
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.
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.
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.
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.
Yeah, extrapolation has some problems
@@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.
Extrapolation is sketch in general, not just for polynomials.
@@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.
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. 😘
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!
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 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.
the 8in/mi^2 is a surveyor's approximation so it makes sense that its very close
Also, where they'd have got it from. Cos most don't have the schooling to work this stuff out
You're making clear why all my attempts at vector graphic design failed miserably to match what I intended.
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.
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.
Gotta love watching people suffer using imperial units :D
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 I wonder if it makes sense to those raised using imperial units
@@troik_live it doesnt :)
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?
@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.
The name Runge brings memories of my student days when I was only starting with numeric methods
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 = )
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.
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
Matt talking to his dog:
"Yeees, you would if you had to collaborate on a scientific dogument."
Hi Matt & Lucie. So good to see you together on TH-cam. I'd totally forgotten that you two are a pair.
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.
Great to see you on Mastodon!
Literally every academic I know uses overleaf. It's a life-saver.
Wish that was a thing when I was a student.. q_q
Would love to see a comparison of this with Taylor approximations and best approximations (the whole projection into polynomial vector space stuff) too.
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 😂
I'm amazed, the flat Earthers actually found out the first term of the taylor series for the trigonometric function! Well done!
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 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 that's if they don't lead with "math(s) is made up nonsense".
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...
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.
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 :)
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.
And hopefully appreciate the overlap between the two fields?
@@bsharpmajorscale Only overlap I can see is architecture
@@neurofiedyamato8763 There's way more than just that. And more than just the so-called Golden Ratio.
math is art
@@neurofiedyamato8763 music also
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!
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.
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)
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.
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.
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!
Calculators and computers also just use Taylor series to evaluate functions under the hood. You probably know that, but yeah; it's cool.
@@cubicinfinity2 I did know that, and it is indeed very cool!
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 :)
The chebyshev spacing brought me back to my mechanical engineering mechanisms classes as this is used in creating a function generating 4 bar mechanism.
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.
Your editor deserves a raise
Alex Genn-Bash
really like the improvement in production value, videos are much more fun now :)
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 😅
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.
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.
Good luck with your exam!
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 your mom's a bot. Also I think I passed, will have to wait till saturday for results
@@pyropulseIXXI I passed by the way. And Runge phenomenon didn't appear on exam once
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
I would like to know why Chebychev nodes work so well as they do, and why the spikes appear in the first place
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.
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.
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.
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.
You can get the formula with the distance squared with the help of the small angle approximation.
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).
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.
Congratulations on 1 million subscribers!
I think the pup should be in every episode going forward.
3:33 you deserved that for not doing it in metric! Problems that just exist in the USA.
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.
3:55
The frustration you feel when the Flat Earth Math is actually kind of sorta correct
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!
Matt's video topics seem to overlap more and more with subjects at my uni, I love it!
+1 For freedom respecting social media, like Mastodon
I LOVE OVERLEAF!!!!! Its the best latex editor hands down
I might give it a try. I'm still stuck with LyX
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 ?
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.
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.
Could you also do a video explaining how to use these polynomial approximations to approximate integrals? I really love the topic
Well you simply integrate the polynomial afterwards, it's that simple
@@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
@@k0pstl939 That's something completely different...
@@JonathanMandrake I misread the comment, sorry
en.wikipedia.org/wiki/Gaussian_quadrature
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.
I like to use rational functions as approximations. I rarely feel the need to go above third order.
Matt Scroggs supervised my maths course at uni last year, great guy and great supervisor
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.
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.
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.
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.
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.
Great video, loved the Flat Earther's surprisingly good approximation, loved the animations, loved the Chebyshev Spacing (loved TH-cam's hilarious attempts to auto-generate subtitles!) and I love Overleaf too (I've used it for several years now, it's so convenient, links with Dropbox, and the collaboration feature is perfect)!
I look forward to more collabs with doggo and wife
For extra credit, account for "down" at the second point being radial to the center of the earth rather than perpendicular to the sight line from the first point. (courtesy of your friendly. Neighborhood land surveyor)
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 😉🤣
This is a nice idea! :) would love to watch a video about it
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.
As an engineer who tries to draw with the spline tool often, I have an intuitive sense for this phenomenon.
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!
I'm going to struggle to express my thoughts now:
Watching that trig function turn cyclical and that quadratic turn (exponential, asymptotic? I dunno) was gorgeous. That's honestly the first time the arcane gibberish of a polynomial has made intuitive sense, it's like suddenly being able to read, where can I get more of this?
Runge's phenomenon, I'm wondering about applying that to engineering system responses ie. if I see it from a controller have I found a failure case, can I now hunt around for a better controller, does this give any clues as to what a better controller design might be?
And actual question from me, is there any analogue out there that models these equations? Something like rubber bands connected through pins or something, or bits of string and weights.
well yeah, simple harmonic motion is modeled with a sinusoid for example.
For a controller, Chebychev polynomials can be a good choice.
These can be very good, but it's getting much more complicated than a single PID controller.
the term you're looking for, with quadratics, would be parabolic, btw. nothing else to add, just thought I'd chime in, so that you can add the small trivia tidbit, that quadratic equations produce parabolic shapes to your mental toolbox.
@@peterbonucci9661 true, PID are much simpler to implement. But you don't get far with a PID feedback controllers in more advanced situations like the calculation of the inverse kinematics of a robot arm for example. That's where you are way more flexible and accurate with a polynomial approximation.
@@Craftlngo Good. I didn't know what level of math you use. My specialty is filter which is next door to controls.
We use rational expressions for curve fitting all of the time. Chebychev polynomials are part of it.
No barleycorns were harmed during the computation of the units conversions.😂
5:50 did you just discover taylor approximations? 🤔
This is a different method than Taylor. Taylor gets you “the best” approximation right by the point you expand, but it degrades over distance.
Isn't Taylor just around a single point not for an entire function
@@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
@@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.
Richard Hamming (Hamming codes, error correction, and more) explained it thusly: "Polynomials love to wiggle."
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.
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.
I used Overleaf for my PhD thesis.
self hosted?
how long was your compile time?
16:06 surprise doggo cameo! Excellent video!
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.
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.
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.
thumbnail got my interest, and then the start of the video threw me for a loop. this is cool
I've been using Overleaf ever since I started my Bachelor in Physics 4 years ago, *I absolutely love it!*
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! 👍👌