this video is brought to you by Overleaf for all your scientific paper writing needs
there's a saying in the flat earther community that goes a little something like this if the
Earth was a globe then the drop to the Horizon would be eight inches per mile squared now there's
a lot to unpack in that sentence so for a start what is the drop to the Horizon more importantly
eight inches per mile squared that's a distance in one unit system as a ratio of an area Miles Square
that seems to be implying that if you take the distance to the Horizon in miles and square it
and multiply it by eight that's the drop in inches it's very confusing and when I was recently at the
mass Jam a big annual Gathering someone called Dave heartburn did a talk about this where they
tried to reverse engineer what the flat earthers were trying to say and what they came up with was
well first now if you do assume the Earth is flat and you stand in your look your line of
sight stays parallel with the ground like forever but if the Earth was a globe it would drop off so
you stick with the looking straight out you assume that's kind of tangent to the globe that you're
standing on and then you've got your distance around the globe and you want to convert that
distance around the globe to the height difference the amount that your line of sight is above the
drop down to the Horizon and they're saying if you take that distance in miles and square it
you get the drop H in inches but does that work I mean the correct equation if you do assume you
are on the globe which I do I am a spherical no I'm a I'm a ball earther a baller for short
that's how I'm commonly described then you do all the trigonometry and the actual equation is
one minus COS of the distance to the Horizon that D divided by the radius of the Earth
all multiplied by the radius of the Earth and that is a very different equation we
can compare them to see just how different you know we're checking it in a spreadsheet
so I got one column which is the distance to the Horizon in miles and then this column here
is a times whatever that is squared So in theory that's the drop in inches but over
here we're going to do it for real and that equals well it's uh one minus the co sine of
oh wait I need to do the drop in miles but I've got to divide that by
the radius of the Earth but we're doing things in miles one second
Earth in miles uh just shy of 4 000. here we go in Miles I'm gonna pop that up there and
it means in here now I can have that distance to the Horizon divider by the radius of the
Earth in miles I'm just going to lock that in there and then it's all of that
times the radius of the Earth in miles all right there we are there's the actual drop
but it's in miles we want it in inches ah how many inches in a mile how many inches in um
63 360. okay so it's each of these then times the number of inches in them oh what
pretty much exactly the same oh no Okay so Flat Earth as say if you take a one
mile distance and square Multiply eight it's eight inches down and we got eight
point zero zero two all the way down here eight times six squared 288 correct answer
288.087 that's so close what if we extend this down a bit come on
down 153 miles away oh my that's still it's not exact but it's close for completeness I have a
jojoba file here of the Flat Earth approximation function in blue my friend Ben Sparks made this
for me and the units we picked on the horizontal and indeed vertical axes is ratio of the Earth's
radius so we're looking a distance to the Horizon between zero and point six times the Earth's
radius we can now turn on the actual drop to the Horizon function in red and look how close that
is what a match that like so incredibly close and down here like if we Zoom right in to like quite
close distances perfect match so only when you zoom out you start to see some Divergence between
the two and then eventually you see they are completely different functions of course one's a
trigonomic function so the cosine is going up and down up and down up and down that corresponds to
technically if your distance keeps going out you just start lapping the Earth and as you're lapping
the Earth the drop is just yo-yoing up and down whereas the approximation one over here in blue
well that's well it's a parabola because it's a it's a quadratic because they're just squaring
the distance so it's a nice neat polynomial of order two so you get this Parabola here nice and
neat very different function if you zoom right out to a trigonomic function but if you zoom right in
look at that match it's like on this kind of scale it's an incredibly close approximation I mean well
done flat earthers uh from from a baller that's impressive it's such a good approximation I'm
prepared to overlook some of the other problems with this situation like when you're looking at
the Horizon you don't look tangent to where you're standing that's just like looking up into the to
the sky you look tangent to the Horizon because that's where your line of sight hits the edge
of the ball and there's refraction in the air and all these things but we're overlooking those this
is not a video to dunk on flat earthers that would be a very different video that we might
do in the future foreshadowing but that's for later that's still over the horizon if you will
or indeed uh won't here I'm rolling back my sass to say Well done flat earthers it's it's a really
good approximation and if that is something you want to work out that drop following the curvature
you don't want to do trig on the Fly I mean I'm a big fan of trig functions but they can be a
nightmare to work out whereas squaring something piece of cake multiplying by eight no worries nice
simple mathematics they took a complicated formula they turned into a nice neat tidy polynomial and
that that's amazing I mean if only we could do that to every annoying function swap it out for
a nice well-behaved polynomial well we can here I have four dots and if I push this magic button
the durable file put a polynomial through all of them and because I started with four dots I get a
cubic because if you've got n dots you'll always get a polynomial of order n minus one so that's
the highest power in the polynomial that goes through all of them and doesn't matter where I
put them that will always be the case these four dots arrange them anywhere I'm always going to
get a cubic that goes through all them oh apart from a few weird edge cases like if I line that
one up perfectly there it'll well wait where is that going to break they're broken there
right there it doesn't work but apart from those weird cases you always get a polynomial and the
great thing about a polynomial it's so well behaved all you're doing is multiplying by a
coefficient and then raising your variables to a power straightforward it's easy to work out it's
easy to differentiate it's easy to find zeros it's just it's easy to do everything so you take your
complicated formula you put a few dots on it and then you know you've definitely got a polynomial
that will go through those dots and you can use that instead genius and this jojoba file was
actually made by another friend of mine Matthews groggs who you may remember from the Menace video
I made many years ago about the matchboxes that play naughts and crosses and they were also doing
a talk at the same mass Jam conference and they showed this and they mentioned that sometimes if
you're trying to approximate a function with a polynomial can go with just a little bit just a
tiny a tiny bit wrong this was scroggs's first example a plot of y equals 5 to the power of x
a nice simple looking equation but algebraically it's not that nice what's that X doing up there
we have to get a log or something to reach that how annoying let's turn it into a polynomial put
a few points on it fit a polynomial lovely and as we add more and more points that polynomial
gets closer and closer to the original function amazing so add as many points as you need to get
within the tolerances you're in business how can that possibly go wrong you know what we'll just
look at one more example of how great it is before we wrap this video up second example y equals one
over one plus 25x squared it's the inverse of a polynomial so lovely got that adorable little
bump in the middle we can add a few points and we start to get an adequate approximation of
it with a polynomial but as we add more and more points we get further and further away
what are all these things and what are all these we don't want this we want but that's nice the
approximation down there is working but what is this nightmare this is something called runge's
phenomenon where you're trying to approximate that bit over there and the M bits just go wild
Run games phenomenon where you try and fit a polynomial but you get these crazy wild spikes
often happens when there's kind of a change in the level so we have a nice flat range of Dots here if
we raise one of them up while fitting a polynomial you can see not only is it a bit of a mess where
the Spike's going in but what's happening over there like trying to move a DOT over here is
ruining our fit over there if only there was a way to fix this yep another cut another Joshua file uh
this is another one that scrogs made showing that function from before and these points are equally
spaced and you get runge's phenomenon when there are equally spaced points So in theory we could
move these around to try and get rid of those annoying spikes at the edges and put that that's
not bad over there so I've kind of fixed the left we can try and smooth out the right that's better
because if I bring like I'm not gonna move the middle one right because if we go off center
it's it no longer meets the Peaks let's put that at the top there and I think that's not bad by
moving them out because if I bring these points into the middle that's where oh what a mess but
I put them over here it's a lot better so it turns out instead of having the points equally spaced if
we push them out to the sides we get a much better approximation but is there one Arrangement which
is particularly good yes there is that's why I'm asking it's great instead of arranging our
polynomial points so they're equally spaced on the horizontal axis if you project them down instead
you can start with a circle equally space the points on the circle then project those down onto
the horizontal axis and then they're the points you use for your polynomial fit these are called
Chevy Chev nodes or shabby Chev spacing and it is way better if you use this distribution or you've
got more on the edges and fewer in the middle in this very specific pattern you get a much
much better approximation and here it is isn't that much nicer with the Chevy Chef spacing we
get a much better approximation as a reminder this is what it looked like before nightmare
but now lovely and we can have that one raised spot from before this is it moving backwards and
forwards with the equally spaced points and look what happens if we switch to Chevy Chef spacing
way way better and we now have what we originally intuitively incorrectly expected before we thought
surely more points equals better approximation and now with Chevy Chef spacing that is true if you
keep adding more points you're guaranteed to get a better and better approximation
I know what you're thinking at this point you're thinking what about my function probably in that
exact tone of voice honestly but I assume a lot of you will have some function you're thinking well
how does that function compare if you've got the Runge susceptible equally spaced points compared
to the Chebyshev's distribution of points well Matthew Scroggs has you covered they've written
RungeBot which works on both Twitter and Mastodon so on Twitter here I'm going to @ RungBot and then
I'm going to give them a function so I want the function of x equals let's try the square root of
x oh you know what specifically X and I'm going to use Python notation so star star is power but you
could use an up Arrow I just know that RungeBot definitely does all of python syntax and it does
do some of other equation uh notations that people use but I'm going to send it X the power of a half
and send there we go right so wrong gearbox now got that it will take a while it'll process it
and send it back and like I said it does work on Mastodon to be more accurate MATHStodon that's
the maths Mastodon server guess where you'll find me if you go looking and one of the great things
about that server is if you're on it if you use latex for equations it will render that perfectly
uh not if you're on a different server but you can still see the tweets you just see the latex
but it makes it nice and crisp which brings us to this video sponsor overleaf now I don't actually
use overleaf but someone else in my household does it's a dog Sky uses no it's not it's my wife Lucie
okay who's a real scientist and actually does use overleaf uh that's why the dog is here with us
um you know I know you would if you had to collaborate on a scientific document
um so anyway when I mentioned overleaf we're going to support one of my videos
Lucie got very excited because she used it I use it all the time and it's
it is it means I can collaborate really easily um so I don't have to email around
documents everyone just sees the sees the same file everyone can comment on it
it's so easy there you go now how did you find out about overly well um I saw my PhD students
using it and I thought oh that's a pretty nifty what were you doing at the time oh I was still I
still had the files myself and I was compiling the latex files and converting to PDF to email
around and you saw them using over belief you're like what is this magic I felt like a dinosaur I
mean what can I say and you started on the free account yep started on the free account and
that was really good and but then my institution bought a license so now we get all the features
that's bad if you want those features you can get premium as well huge thanks to overleaf for
sponsoring this video do check out overleaf.com now it's time to see what Scroggs's RungeBot has
given back to me for my square root of x plot so I'm going to go into notifications here and
something went wrong
Matt Scroggs can you please fix me so there you are wrong incredible incredible it's broken
we will fix it in fact now we'll cut in this is what it should look like isn't that amazing well
done by the time the video goes out we'll have RungeBot I'll take some of that Overleaf money
and we'll spend it on RungeBot servers to get it it's probably literally running on a Raspberry Pi
in Matt's cupboard so we'll improve that and if you want to check out Mastodon if you've
heard about this uh alternative to Twitter I am on the mathstodon.xyz server but whatever server
you're on you can all interact across that's my dog eating some of the lighting film we're
gonna go stop that we're gonna stop the video thank you for watching bye what have you got