Stirling's Approximation: A STUNNING Result For Factorials (ft Imperial College)

Поділитися
Вставка
  • Опубліковано 27 чер 2024
  • Thanks to Imperial for hosting me! Hope everyone enjoyed! I love this approximation since it becomes more and more familiar with each step and leaves such a satisfying final result - please comment with any questions or suggestions for new topics, and as always, subscribe to stay updated.
    ~ Thanks for watching!
    Comment solutions to the challenge down below.
    ‪@blackpenredpen‬ … as always I've left you a challenge at the end of this video as well as the last few - if you see this give it a go!
    Thanks so much for all the recent support - hitting 1k subscribers has been amazing and so please keep sharing and interacting so I can make even more content!
    Thanks again for all the recent support and please keep sharing and interacting!!
    #maths #mathematics #integrals #Imperial #MIT #Cambridge #approximation #problemsolving #stirling #approximation #taylor #maclaurin #gaussian #gauss #normaldistribution #statistics #whoknew #fascinating #functions #euler #funproblems #proofs #functions #physics #sums #series #limits #whiteboard #math505 #blackpenredpen #integral #trig #trigonometry

КОМЕНТАРІ • 108

  • @OscgrMaths
    @OscgrMaths  4 дні тому +11

    Please answer the challenge at the end down below! Also feel free to ask any questions.

  • @DavidMFChapman
    @DavidMFChapman 4 дні тому +55

    Constructive feedback: please write larger and adjust lighting to remove whiteboard glare 😊

    • @OscgrMaths
      @OscgrMaths  4 дні тому +12

      @@DavidMFChapman Will do next time, thanks for mentioning!

    • @user-cd9dd1mx4n
      @user-cd9dd1mx4n 2 дні тому +2

      ​@OscgrMaths
      Hi dear,
      I really enjoy the videos you make, and I highly appreciate the effort you put in to make such good contents.
      Actually there is something I would like to talk to you about, and I value your perspective. I am wondering if we could have a small discussion at your convenience. Would it be possible for you to share your email address with me?

    • @warrengibson7898
      @warrengibson7898 9 годин тому

      and improve the audio

  • @DavidMFChapman
    @DavidMFChapman 3 дні тому +14

    I was hoping you would do a few calculations to demonstrate the accuracy. I did it myself on my programable pocket calculator:
    n = 5 -1.7%
    n = 10 -0.8%
    n = 20 -0.4%
    etc

    • @OscgrMaths
      @OscgrMaths  3 дні тому +1

      @@DavidMFChapman Oh nice! I was hoping viewers would try this out for themselves - thanks so much for this comment this is excellent.

    • @DavidMFChapman
      @DavidMFChapman 3 дні тому +2

      @@OscgrMaths I am a big fan of the Golden Ratio and I “collect” problems where it shows up in the solution.

    • @OscgrMaths
      @OscgrMaths  3 дні тому

      @@DavidMFChapman Ah okay nice! I'll try and do a video on an integral involving the golden ratio.

  • @doowi1182
    @doowi1182 День тому +2

    Great video - you have an amazing way of explaining and keeping the audience engaged. Subscribed!

    • @OscgrMaths
      @OscgrMaths  День тому

      Thanks so much! Very kind of you.

  • @green_cobra
    @green_cobra 3 дні тому +8

    My new favourite maths youtuber great explanations

    • @OscgrMaths
      @OscgrMaths  3 дні тому

      @@green_cobra Thank you so much!!

  • @lucahaines4655
    @lucahaines4655 2 дні тому +1

    Lovely, thank you

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      @@lucahaines4655 Thanks so much!

  • @advait8142
    @advait8142 3 дні тому +5

    congrats on 1k! love another gamma function vid

  • @peterjohnston8507
    @peterjohnston8507 3 дні тому

    Interesting result the way you explain things !

  • @victorcow6869
    @victorcow6869 4 дні тому +3

    Congrats on 1k mate!! Love the vids, your explanations have been helpful

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      @@victorcow6869 Thanks so much! Really appreciate the support.

  • @timofeysobolev7498
    @timofeysobolev7498 2 дні тому +1

    Great video!)
    Love your content!)

  • @gagadaddy8713
    @gagadaddy8713 3 дні тому +3

    As n approach 100, the estimation shows only 0.15% from the exact value. This approximation is awesome! Good job, mate!

    • @OscgrMaths
      @OscgrMaths  3 дні тому

      @@gagadaddy8713 Thank you!! It's a really lovely approximation and amazing how close it gets.

  • @thelonelybaloney2426
    @thelonelybaloney2426 4 дні тому +6

    Congrats on 1k :D

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      Thanks so much! So grateful for the support and excited to make many more videos too.

  • @muskyoxes
    @muskyoxes 2 дні тому +1

    For the longest time i could "derive" every part of the approximation except the 2 pi. The 2 pi makes sense today for the first time

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      @@muskyoxes Glad it makes sense now!! Thanks for the comment.

  • @juliaantunes8924
    @juliaantunes8924 День тому +2

    Great video! Greetings from Brazil🇧🇷

  • @gregoriousmaths266
    @gregoriousmaths266 4 дні тому +4

    Congrats on 1k subs- you did it very quickly 🥳
    also it's pretty sick that you did this video at imperial lol

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      Thanks so much!! Yeah filmed a few there today...

  • @adw1z
    @adw1z 2 дні тому +1

    If we use higher order terms of f(t), we can keep going and derive the so-called Stirling Series! What was found here is the leading order term of that series

    • @OscgrMaths
      @OscgrMaths  2 дні тому +2

      @@adw1z Yes! And each will be more and more accurate. Thanks so much for the comment!

  • @ADDiOUMAARIR
    @ADDiOUMAARIR 2 дні тому +1

    Keep going my friend ❤❤❤❤

  • @dakcom-mk6mp
    @dakcom-mk6mp 2 дні тому +2

    Nice video

  • @JujutsuMath
    @JujutsuMath 2 дні тому +2

    you got good content keep it up, are you doing a maths uni degree ?

  • @BikeArea
    @BikeArea 3 дні тому +2

    Nice presentation. Maybe think of improving the sound recording.

    • @OscgrMaths
      @OscgrMaths  3 дні тому +1

      @@BikeArea Yes I'm thinking of getting a lapel mic. Thanks for the comment!

  • @petelok9969
    @petelok9969 12 годин тому +1

    Very nice

  • @booshkoosh7994
    @booshkoosh7994 День тому +1

    This is really cool. Thanks! I'm happy to find another great math source on the internet! This sort of passion for maths isn't too common, really. Are you, by chance, an AoPS student?

    • @OscgrMaths
      @OscgrMaths  День тому

      Hey, no I've never come across this before as it seems to be mostly a big thing in the US - but it looks really interesting! Definitely love the idea of having a focus on problem solving.

    • @booshkoosh7994
      @booshkoosh7994 15 годин тому +1

      @@OscgrMaths Right! Thanks for the videos. Most all AoPS students are math competition participants. Although AoPS advertises for a younger crowd, the biggest community is around the Olympiad training. You have to score in the top 1 percent (literally), on two tests (you have to pass the first test in order to take the second), before you can take a year-round maths training to make it onto the American Olympiad team. There are only 5 people on each team, and there's only 1 team per country. There are over 100 countries that participate, yearly! It really gets intense as test results near, or when the end of a class nears. Usually AoPS classes are 6 or 7 months long, and there isn't a single test for the whole of the 6 months! You usually get a proof that you need to write each week, and then 7 or so problems that you need to solve each week (they only count the total amount of problems solved over the 6 months, and it doesn't matter what your weekly score is). There are usually no instructions for how to solve these problems, but instead there is a book of similar problems with loads of proofs and solutions. It takes nearly 2 or 3 hours to solve a single problem (1 hour if it's a really good day).
      As one student of mathematics to another, seriously ignore small-fry stuff that most people are comfortable with (non of your videos are like that, but people will probably ask for stuff like that in the future). It's special to do something special, and not something watered-down or just okay. I appreciate your willingness to stick it out. Problem solving is most intuition and persistence, and that is something special which most people aren't very comfortable with.
      Your video topics are excellent! It takes some imagination to do proper math (most proofs -- if not all -- are based on intuition, and then the justification of it); so don't get bogged-down if people say otherwise.
      I really appreciate the fact that you are keeping the footage and representation basic, and not cluttering it with complex lighting or video edits.
      Thanks again!👍😄

    • @OscgrMaths
      @OscgrMaths  15 годин тому

      @@booshkoosh7994 Thank you so much for this comment! Having my videos get bigger has been amazing but it has led to more negative comments too and so your kind words really mean a lot. Glad to know there's people out there who understand what I'm going for. I also completely agree with your view of maths on problem solving and I've found the equivalent program in the UK - the first exam is around October, so I'll definitely go for it then. Thanks!

    • @booshkoosh7994
      @booshkoosh7994 11 годин тому +1

      @@OscgrMaths Absolutely! Happy to help! Good luck on the exam! 😄

  • @Fire_Axus
    @Fire_Axus 3 дні тому +1

    this is like a hyperpolynomial

  • @ADDiOUMAARIR
    @ADDiOUMAARIR 2 дні тому +1

    ❤❤

  • @octs609
    @octs609 2 дні тому +1

    Nice vid. Also on a side note, do you just own a really big white board or is it at the college in the title? (a rather vague question I hope you'll indulge)

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      It's at the university Imperial College in London! My other videos are on my own smaller whiteboard. Hoping to make more on the bigger ones at the uni since they're easier to lay working out on. Thanks for the comment!

  • @worldnotworld
    @worldnotworld 4 дні тому +1

    What a great technique! It might have been interesting to show just how accurate the approximation is for large values of n, though the audience can try that for themselves, I suppose.

    • @OscgrMaths
      @OscgrMaths  4 дні тому +1

      Ah I didn't consider that... excellent idea though, let me know what you get if you give it a shot!

    • @worldnotworld
      @worldnotworld 4 дні тому +2

      @@OscgrMaths I did a little messing around. f(n) consistently under-approximates n!. By n=10 we get f(n)/n! to be 0.9917, but the difference in values is 30104.83. For n=20, the ratio is 0.997, and the difference is 7.35763889E29... I suppose criteria for "accuracy" will vary wildly. The approximation certainly isn't any easier to calculate!

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      @@worldnotworld Wow that's so interesting!

    • @kgangadhar5389
      @kgangadhar5389 4 дні тому

      @@worldnotworldphysicist use this to get the order of magnitude estimates where the exact values are not needed.

    • @worldnotworld
      @worldnotworld 4 дні тому

      @@kgangadhar5389 That seems odd, since the calculation of the approximation is far more involved than simply calculating the factorial. What you'd want for the purpose you describe is an function for the order of magnitude of n! (rather than an estimate of n!) that was less computationally expensive than n!.

  • @Calcprof
    @Calcprof День тому +1

    I like this. The usual way (to approximate ln(n!) by an integral, makes the Sqrt[2 pi n] difficult to get.

    • @OscgrMaths
      @OscgrMaths  День тому

      Thank you so much! The usual way is the weak approximation but introducing the gamma function is what helps provide the sqrt2pin part! Glad you enjoyed.

    • @Calcprof
      @Calcprof 21 годину тому +1

      @@OscgrMaths I shold have thought of it. This approximation for exponential integrals is a standard in asymptotic analysis

  • @liamturman
    @liamturman 2 дні тому +1

    Awesome Job! Is there any way to prove that they are asymptotically equivalent or is that a little to advanced?

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      @@liamturman Thanks so much! You might be interested in this document from the university of connecticut which provides a few different and very interesting proofs for this (one of which involves bernoulli numbers!)
      kconrad.math.uconn.edu/blurbs/analysis/stirling.pdf

  • @wit1729
    @wit1729 3 дні тому +1

    What's your favourite part of mathematics?

    • @OscgrMaths
      @OscgrMaths  3 дні тому +1

      @@wit1729 Hmm... great question. I can't say one for sure, but recently I've been enjoying learning some vector calculus and I'd like to learn more about analytic number theory next. How about you?

  • @masonholcombe3327
    @masonholcombe3327 2 дні тому +1

    Question, at the end you replaced the lower bound of the integral with -inf because we're dealing with large values of n but at the start you only used the first 3 terms of the taylor expansion (which would be for approximating small values of n). Is this not contradictory? Great video though, very nice result!

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      Thanks for the comment! If it were a Maclaurin expansion (centred at 0) for a function of n it would be only be valid for small values of n, but since it's a Taylor expansion around the point n for a function of t, whatever value we choose for n (even if it's very large) it just means the approximation will be most accurate roughly around that area. Hope that makes sense! Feel free to ask any more questions you have.

  • @JAzzWoods-ik4vv
    @JAzzWoods-ik4vv 2 дні тому +1

    Try passing the audio of the video through a low pass filter to te remove high frequency humm

    • @OscgrMaths
      @OscgrMaths  2 дні тому +1

      @@JAzzWoods-ik4vv Oh that's a really helpful suggestion thanks so much!

  • @worldnotworld
    @worldnotworld 4 дні тому +1

    Tangential question: are there any interesting functions other than Gamma that provide factorial results for integer inputs? (Something different from just multiplying Gamma(x) by something silly, like sin(pi*x)!)

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      @@worldnotworld Examples that come to mind are the beta function (but admittedly only through its relationship to the gamma function) as well as the choose or permutation functions for combinatorics. The subfactorial is a really interesting relative of the factorial that I covered on my channel - maybe take a look at that if you're interested! Admittedly that's as much as I know about but I'm sure there's many more.

    • @worldnotworld
      @worldnotworld 4 дні тому +1

      @@OscgrMaths Thank you! I will explore the topic, starting on your channel.

  • @aliexpress.official
    @aliexpress.official 3 дні тому +3

    The Stirling approximation is so amazing because its very good even for small values of n. For example choose n=3 and get that 3!~5.84. Pretty good imo

    • @OscgrMaths
      @OscgrMaths  3 дні тому +1

      @@aliexpress.official Yeah definitely, if you check out some other comments people tried approximating with increasing values. Amazing how close it gets!

    • @gagadaddy8713
      @gagadaddy8713 3 дні тому +2

      The approximation in large n value is more important, especially when the time computer is not available. But even now, this approximation serves a good modeling of the function. Brilliant!

  • @Gameboygenius
    @Gameboygenius 2 дні тому +1

    New here. Never heard anyone pronounce ln as lun. Its usually either ell-enn or stubbornly calling it log.

    • @OscgrMaths
      @OscgrMaths  2 дні тому

      @Gameboygenius I think it might be a British thing? I always said it as ell-enn because I first learnt most of my calculus online from american channels but my teachers and classmates have recently been calling it lun and I've reluctantly converted... Thanks for the great comment!

    • @patrickcorliss8878
      @patrickcorliss8878 2 дні тому +1

      @@OscgrMaths lun is great. Hope it catches on !!

  • @Regian
    @Regian 3 дні тому

    You should listen to DorFuchs's Stirling-Formula song

    • @OscgrMaths
      @OscgrMaths  3 дні тому

      I don't speak German but it looks great 😂 thanks for the recommendation!

  • @Tosi31415
    @Tosi31415 4 дні тому +1

    i might need a slight help with the challenge, i think i'm doing the right steps but i got stuck.
    i have ln(n!)=[sum from 2 to n][integral from 1 to k]of 1/t dt

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      I'll give you a hint...
      Considering the graph of ln(x) - perhaps we could create an inequality with the sum of logs and the integral:
      [sum from 1 to n] ln(k) = ln(n!)
      which by thinking about the area under the lnx curve is less than or equal to
      [integral from 1 to n] lnx dx
      Perhaps try computing that integral and rearranging for an inequality in terms of n!...

    • @Tosi31415
      @Tosi31415 4 дні тому +1

      @@OscgrMaths got it, i overcomplicated it.
      we get the same thing without the sqrt(2pi*n)

    • @Tosi31415
      @Tosi31415 4 дні тому +1

      i tried it and it's a veeery poor approximation for "small" n,
      but i guess it has the same order of magnitude in the limit so yeahhh

    • @OscgrMaths
      @OscgrMaths  4 дні тому +1

      @@Tosi31415 Yes exactly!! I think it's quite nice how there's different approaches with different accuracies. Thanks so much for doing the challenge!

    • @OscgrMaths
      @OscgrMaths  4 дні тому

      @@Tosi31415 Yeah that makes sense since we made some pretty big assumptions...

  • @willnewman9783
    @willnewman9783 3 дні тому +2

    This is a cool derivation. But I am a little confused. You use approximate inequalities twice: the first with the Taylor series, and the second with the integral bound.
    With the Taylor series, this should really be accurate "near n," but you use the approximation for all t in between 0 and infinity. This is even beyond the radius of convergence. So I would not expect these integrals to be similar at all.
    I plotted the function and the approximation (both in the exponent of e) on Desmos and I guess the functions are somewhat similar. It is not too implausible that they area under each are close as n gets large. But it is still not clear. I guess what I am saying is it would be good to see a proof that the Taylor series approximation you are using are asymptotically justified.
    The other approximation with the integral bound is completely believable. As n gets big, the area not accounted for should get small.

    • @OscgrMaths
      @OscgrMaths  3 дні тому +1

      @@willnewman9783 Hey this is a great point and i will definitely take a look at this in more detail. One thing I would say is that if you look at the integral you end up with before making any substitutions, it's extremely similar to a normal distribution with a mean of n. Obviously this still doesn't fix everything you've mentioned, but it does mean that our approximation is most accurate around the part of the function we're integrating that has the most area under it. Thanks for the comment and I'll look more into this!

  • @suzum0978
    @suzum0978 2 дні тому +2

    Not so rigorous and you seem to be abusing notations (such as taking n into infinity in the bounds while it's still there in the expression) . But it's still convincing for a Physicist ! Good job mate

    • @OscgrMaths
      @OscgrMaths  2 дні тому +1

      @suzum0978 Yeah that part with n in the bounds is a little rough - that's why it's definitely an approximation! But thanks for the comment either way. If you want a slightly more rigorous (but less accessible which is why I didn't include it) derivation, it can actually be done with a contour! By considering 1/n! as a taylor coefficient in the maclaurin series of e^z and then computing it with the cauchy integral formula. You can try and work out the line integral using the saddle point method. The dominant portion near the saddle point is approximated by a real integral and Laplace's method. Actually Laplace's method is useful in evaluating this integral in general so is also worth considering (especially since the saddle point method is kind of a complex extension of laplace's method). Hope this is interesting and thanks for the comment.

    • @suzum0978
      @suzum0978 2 дні тому +1

      @@OscgrMaths this sounds exciting, I hope you make video about it if you have time in the future!

    • @OscgrMaths
      @OscgrMaths  2 дні тому +1

      @@suzum0978 Okay great!

  • @Sammy-qt9it
    @Sammy-qt9it День тому +1

    Huxley?

    • @OscgrMaths
      @OscgrMaths  День тому

      I did spend some time in Huxley! Then they put me in Skempton as there was a free room with a whiteboard and it's just down the road.

  • @quagmire3594
    @quagmire3594 3 дні тому

    Cannot read it. Too noisy.

    • @Vehdbiene
      @Vehdbiene 2 дні тому +4

      "🤓☝️" go outside ,touch grass ,make some real friends bud . leave bro alone its a great vid!

    • @juliaantunes8924
      @juliaantunes8924 День тому +1

      U can't READ bc of the NOISE? Man i usually read stuff with my eyes but ok