What is cos( cos( cos( cos( cos( cos( cos( cos( cos( cos( cos( cos(…?? // Banach Fixed Point Theorem

Поделиться
HTML-код
  • Опубликовано: 20 дек 2024

Комментарии • 631

  • @DrTrefor
    @DrTrefor  2 года назад +747

    🚨🚨Correction!🚨🚨
    1) The proper definition of a contraction is that |f(y)-f(x)|

    • @td904587
      @td904587 2 года назад +12

      Hi Trefor, great video! The spiral is a beautiful way to understand the Banach Fixed point theorem!
      However given this definition of a contraction - namely, there is a k such that for all x,y, blah blah... - cosx is NOT a contraction!
      Proof: Assume there is such a k and let y=pi/2. Then, for all x
      eq y, it would be the case that |(cos(pi/2)- cosx)/(pi/2 - x)| \leq k < 1.
      This is a contradiction because that LH quantity approaches 1 as x-> pi/2. QED
      (Edit) If this was somewhere else in the comments I'll happily delete the comment, but I didn't see anyone else mention this.

    • @Quantris
      @Quantris 2 года назад +14

      @@td904587 Indeed. Luckily in this case we can apply the argument after the first application of cos, since now we are in [-1, 1] (and won't ever leave it) and cos is a contraction on this restricted domain

    • @td904587
      @td904587 2 года назад +3

      @@Quantris Good point!

    • @pauljackson3491
      @pauljackson3491 2 года назад

      So does that mean that every f has a k, the same for all x,ys, such that all x,y in whatever domain make that true or does every x,y has a k?
      Also the spiral was square; is there a way for turn applicable f()s into curved spirals, perhaps archemdean(sp) or logerithmic(sp)?

    • @Quantris
      @Quantris 2 года назад +2

      @@pauljackson3491 for f to be a contraction on some domain, you need to find *one* value of k that is strictly less than 1 and works for all x,y pairs in that domain.
      I learned today that if the best you can do is k = 1 then it is called "non-expansive" which is a slightly weaker condition than a contraction (and in particular you can't directly apply Banach fixed point to it)
      about the spirals I have no idea but maybe there's some convention around doing something similar in polar coordinates or something? may lead to some cool pictures :)

  • @jameshenner5831
    @jameshenner5831 2 года назад +3565

    0.739 radians is equivalent to 42 degrees. Therefore the Hitchhiker's Guide to the Galaxy was right in saying that 42 is the answer to everything.

    • @DrTrefor
      @DrTrefor  2 года назад +533

      haha nice one!

    • @trbz_8745
      @trbz_8745 2 года назад +193

      sadly, the actual solution is not actually 42 degrees, it's about 42.364 :/

    • @PlutoTheSecond
      @PlutoTheSecond 2 года назад +342

      @@trbz_8745 Rounding error. :)

    • @Kurtlane
      @Kurtlane 2 года назад +6

      I thought it was 24.

    • @berndstange-gruneberg9898
      @berndstange-gruneberg9898 2 года назад +12

      But the initially question was how much equals six times nine, wasn't it?

  • @ronanshanley7829
    @ronanshanley7829 2 года назад +801

    This really demonstrates just how beautiful math is. When I looked at the thumbnail I immediately thought "wow I have no idea what is it," but in hindsight the answer of cos(x) = x is incredibly intuitive. Its amazing how something so complicated can be become so simple

    • @FritzMusicFoReal
      @FritzMusicFoReal 2 года назад +7

      A lot like coding and programming

    • @MarcLucksch
      @MarcLucksch 2 года назад +10

      I googled what is cos x = x before watching the video, just by seeing the title. I knew that was a fixed point, and I assumed it might converge there, but wasn’t sure..

    • @Deupey445
      @Deupey445 Год назад +3

      It’s the second fundamental theorem of trigonometry. We had sin(x) = x and now we have this!

  • @zygoloid
    @zygoloid 2 года назад +281

    At University I learned this in limerick form:
    If A's a complete metric space,
    And nonempty we know it's the case
    That if F's a contraction
    Then under its action
    Just one point remains in its place

    • @The-Devils-Advocate
      @The-Devils-Advocate 2 года назад +10

      Roses are red
      I like to lie in my bed
      My favorite color is red
      I like bread
      Nevertheless, very nice limerick

    • @isobaric
      @isobaric 11 месяцев назад

      xD @@The-Devils-Advocate

  • @mihirsanghvi9876
    @mihirsanghvi9876 2 года назад +758

    The point x=0.739 does have a name its called Dotties number/Dotties Constant

    • @DrTrefor
      @DrTrefor  2 года назад +281

      Oh! I knew that! How did I forget!

    • @collegemathematics6698
      @collegemathematics6698 2 года назад +44

      This is the most usefull comment. Thanks this comment completed this great video.

    • @mme725
      @mme725 2 года назад +13

      D'oh, I posted the same thing because I didn't see any of the top comments say this. If only I scrolled down a few more inches I'd realize I was repeating you XD;;

    • @scathiebaby
      @scathiebaby 2 года назад +9

      Amazingly, there's even an infinite series for it en.wikipedia.org/wiki/Dottie_number

    • @scathiebaby
      @scathiebaby 2 года назад +35

      "The name of the constant originates from a professor of French named Dottie who observed the number by repeatedly pressing the cosine button on her calculator." -- I did the same when I was a kid playing with the calculator. It could have been named after me ;D

  • @jessstuart7495
    @jessstuart7495 2 года назад +238

    Every 9th grade math student has evaluated this on their scientific calculator by pressing the cos button repeatedly.

    • @itsalongday
      @itsalongday 2 года назад +26

      Apparently, that is exactly how Dottie (the person after whom the number is named) "discovered" it. At least that's how wikipedia explains it

    • @hemish1
      @hemish1 2 года назад +5

      its like you're spying on me during math

  • @manpreet9766
    @manpreet9766 2 года назад +118

    I remember noticing the convergence when I was 12-13 years old. I had bought my first scientific calculator and was so fascinated that I would try all the functions on it for hours. I would calculate repeated operations like this. I calculated cos(cos( .. 23 times)) and found that it converges, although I had no understanding of limits. BTW 23 was the stack size of the calculator operations and I could only repeat cos 23 times beyond which the calculator would report ‘stack error’

    • @GynxShinx
      @GynxShinx 2 года назад +9

      Holy crap! Thanks for the memory. I have an old school folder that has a few things doodled on it and one of them is a cos(cos(cos(cos(cos... equation.

    • @itismethatguy
      @itismethatguy Год назад +2

      Heyy same

    • @okaro6595
      @okaro6595 Год назад +2

      By using ANS you can do unlimited. Also old calculators could do unlimited.

    • @darkzonegaming9169
      @darkzonegaming9169 Год назад

      Same lmao

    • @ijabbott63
      @ijabbott63 Год назад

      On older scientific calculators (without TI's AOS, Casio's V.P.A.M., or whatever), operations and functions that operated on a single operand where typed AFTER the number (similar to RPN calculators where that also applies to binary operators such as '+' and '-'), so you could just enter a number and repeatedly mash the COS key. This worked in any of the angle modes, degrees, radians, or gradians, but of course the value it converged to depended on the current angle mode.

  • @tipoima
    @tipoima 2 года назад +100

    Really interesting.
    I tried doing the sin(cos(sin(cos(...))) and it has two points it jumps between, those being x1=sin(cos(x1)) and x2=cos(sin(x2)) with them obviously x1=sin(x2) and x2=cos(x1)

    • @RandomGeometryDashStuff
      @RandomGeometryDashStuff Год назад

      what is the inner function? ...sin(cos(sin(cos(???(x))))...

    • @tipoima
      @tipoima Год назад +6

      @@RandomGeometryDashStuff It's alternating, there isn't one.

    • @lpi3
      @lpi3 Год назад

      Define g = sin • cos and then search for fix point of g

    • @lpi3
      @lpi3 11 месяцев назад

      @arandomgamer3088 yes, it seems you are right.

  • @angeldude101
    @angeldude101 2 года назад +111

    cos(x) definitely has one of the more interesting fixed points. I decided to check some other functions, and it seem that if the graph doesn't intersect the x=y graph, then it obviously doesn't have a fixed point (ln(x) diverges to the complex plane, and e^x diverges to infinity). sin(x) has a pretty obvious fixed point of 0, but sqrt(x) and x^2 had some interesting behavior where they both have 2 fixed points at 0 and 1, but for sqrt(x), 0 is an _unstable_ fixed point, and 1 is _stable,_ while for x^2, the relation is flipped. In addition, the fixed point for x^2 is only reached if the starting point is between -1 and 1, otherwise it diverges (away from the unstable fixed point 1) towards infinity. 1/x _neither_ diverges, _nor_ converges to a fixed point, always oscillating between two values depending on the input. (-x would have the same behavior since they're both their own inverses, though both do have fixed points in the form of 1 and -1 for 1/x, and 0 for -x.) tan(x) has _infinitely many_ fixed points, including at 0, but all of them are unstable, but not necessarily diverging to infinity when not at them, instead looking like it would have a chaotic behavior.

    • @Kurtlane
      @Kurtlane 2 года назад +8

      The general case of x(n+1) = -ax(n)^2 + bx(n) + c (a, c > 0) is very intetesting. Depending on a, b and c, it has divergent, convergent, bifurcations and chaotic behavior.
      Look up "This equation will change how you see the world (the logistic map)." They use x(n+1) = rx(n) (1-x(n)).

    • @Kurtlane
      @Kurtlane 2 года назад +1

      Watch:
      This equation will change how you see the world (the logistic map)
      ruclips.net/video/ovJcsL7vyrk/видео.html

    • @Xonatron
      @Xonatron 2 года назад +1

      I would love to see visuals on all this work. Well done.

    • @ferb1131
      @ferb1131 2 года назад +3

      Interesting - Kind of makes sense that a function and it's inverse would have the opposite in terms of stable and unstable fixed points. (I vaguely remember doing something like this as university homework, and finding some (usually unstable) fixed points the other students missed because I checked for complex ones as well as real.) You say you tried 1/x, but of course the really interesting one (if you haven't seen it before) is 1 + 1/x

    • @scathiebaby
      @scathiebaby 2 года назад +1

      @@ferb1131 I smell a Phi.

  • @RedPardo
    @RedPardo 2 года назад +94

    It's nice to be a software engineer, but be a math enthusiast and watch those kind of videos explaining interesting behaviors. Keep up this work, it's excelent and joyful!

  • @covidiotseverywhere2179
    @covidiotseverywhere2179 Год назад +29

    Banach Fixed Point theorem is the reason for convergence in most traditional reinforcement learning algorithms and that is basically the reason for a lot of advances in robotics

    • @NickiRusin
      @NickiRusin Год назад

      oh yeah that's what a PID runs on

    • @Kalumbatsch
      @Kalumbatsch Год назад +3

      My favorite way to think about the theorem is that if you have a map of your town, your house or the room you're in, then there's exactly one point on the map in the same place where it is in reality. It's the kind of thing you have to discuss with a stoner at a party. "So there's a small map on the big map and another map in the small map and.. whoa dude"

    • @covidiotseverywhere2179
      @covidiotseverywhere2179 Год назад

      @@NickiRusin Value Iteration and Policy Iteration as well.

  • @dackid2831
    @dackid2831 2 года назад +48

    Another thing I'd like to point out is that questions like this are classically solved with the Intermediate Value Theorem. Although Banach's fixed point theorem is nice, IVT is a much easier way to go about this one.

    • @jackm.1628
      @jackm.1628 2 года назад

      How do you solve this with IVT?

    • @dackid2831
      @dackid2831 2 года назад +5

      @@jackm.1628 so once we realize this is a question about the solution to cos(x)=x, we can then look at the function g(x)=cos(x)-x. And IVT tells us that we do indeed have a root of g(x), which is what we are looking for.

    • @jackm.1628
      @jackm.1628 2 года назад +2

      @@dackid2831 I see. But we still need Banach's Theorem to prove that ...cos(cos(x))... converges to something. And then we may be interested in solving cos(x) = x. The IVT just shows it's possible to solve cos(x) = x, but it doesn't tell us how.

    • @dackid2831
      @dackid2831 2 года назад +3

      @@jackm.1628 Yes, that part is certainly true. I would also like to point out Banach's doesn't tell us how to solve it either. Banach's shows us that it exists given those conditions.
      In contrast, for IVT, we assume such a solution exists, and the IVT helps us confirm that.

    • @jackm.1628
      @jackm.1628 2 года назад +1

      @@dackid2831 Well Banach tells us that the sequence x_(n+1) = cos(x_n) converges to the solution, so this is one way (though perhaps not very good) to solve it.

  • @gabenuss3063
    @gabenuss3063 2 года назад +5

    Wow! That's a really cool result, and you made it so easy to understand. Thanks for the awesome content!

  • @ngruhn
    @ngruhn 2 года назад +57

    I’m not sure if this is a valid argument but I think you could also recognize: if there are infinitely many cos
    x = cos(cos(…cos(z)…))
    Then removing one cos gives the same expression. Or said differently, the inner term is the same as the whole term (independent of z) so:
    x = cos(x)
    and we instantly arrive at the same conclusion.

    • @DrTrefor
      @DrTrefor  2 года назад +35

      Yes, if you know it converges then this tells you the answer, but you wouldn’t know it converges

    • @shashanksistla5400
      @shashanksistla5400 2 года назад +3

      @@DrTrefor are there any counterexamples? i.e, an incorrect solution is obtained because the series does not converge?

    • @yuefenggao7483
      @yuefenggao7483 2 года назад +50

      @@shashanksistla5400 Consider the equation x^x^x^x...=2, you can use this technique to say x^2=2, x=sqrt(2), done. However, if I ask what is x^x^x^x...=3, then this technique fails. This is because the function x^x^x^x...only converges when e^-e < x < e^(1/e). More explanation here: ruclips.net/video/xaBhTU01vsA/видео.html

    • @poundcayx
      @poundcayx 2 года назад +7

      @@yuefenggao7483 excellent counterexample👍

    • @shashanksistla5400
      @shashanksistla5400 2 года назад +2

      @@yuefenggao7483 thank you that was nice to learn

  • @francescoghizzo
    @francescoghizzo 2 года назад +26

    Banach fixed point theorem is also related to the Picard-Lindelof theorem and determining the existence of the solution for the cauchy problem y' = f(x,y)

  • @cipherxen2
    @cipherxen2 2 года назад +16

    When I was a kid. I used to play with scientific calculator. I like to see numbers converge by pressing "cos" over and over. It was no fun in "deg" and "grad" mode though.

    • @Kurtlane
      @Kurtlane 2 года назад

      Me too. I wondered for years what that mysterious result was. Then I read up on chaos theory, where it was described in the introduction as "Picard's method."

  • @jorgelenny47
    @jorgelenny47 2 года назад +11

    Your average high school student has gotten bored in class and decided to do cos(ans) on the calculator 1000 times to see what happens

  • @JHaas117
    @JHaas117 2 года назад +32

    im still trying to get my head around all of the calc sequence but it seems its true that there is always more to learn / discover. thanks for videos like these it helps to reinvigorate a desire for learning math.

  • @pilotomeuepiculiares3017
    @pilotomeuepiculiares3017 2 года назад +7

    What I tried is:
    Cos( Cos( Cos( ... Cos( Cos(x) ) ... ) = y
    Cos(y) = y
    0 < y < Cos(1)

    • @bobnewell7888
      @bobnewell7888 2 года назад +1

      This was exactly my first thought. Pretty straightforward, although the video provides loads of insights.

  • @johnchessant3012
    @johnchessant3012 2 года назад +21

    Great video! I remember 3b1b did a video on fixed points where he was looking at f(x) = 1 + 1/x which has two fixed points (phi and -1/phi). If you iterate f on any point except -1/phi and 0 then you'll converge to phi, and the reason boils down to |f'(phi)| < 1 and |f'(-1/phi)| > 1. I notice that the definition of contraction |f(y) - f(x)| < |y - x| would imply |f'(x)| < 1 everywhere.

    • @DrTrefor
      @DrTrefor  2 года назад +5

      Indeed! See pinned comment for more info:)

    • @Kero-zc5tc
      @Kero-zc5tc Год назад

      What’s phi, is it the same as pi?

    • @oo_rahbel_oo
      @oo_rahbel_oo Год назад

      @@Kero-zc5tc it is known as golden ratio.

    • @Kero-zc5tc
      @Kero-zc5tc Год назад +1

      Thanks

  • @henrytang2203
    @henrytang2203 2 года назад +4

    Nice presentation. I took a more practical approach to get a decimal approximation for the limit.
    If the limit exists and is L.
    Then L=cos(cos(...))
    So L=cos(L)
    With a graphing calculator: L is approx 0.74

    • @DrTrefor
      @DrTrefor  2 года назад +6

      This method shows what the limit must be IF it exists, but you don’t know anything about whether it exists or not

  • @nathanielkilmer5022
    @nathanielkilmer5022 2 года назад +13

    It's a very strange coincidence that you are posting this video at this time, because I just accidentally rediscovered the Dottie Number last semester. I was studying Advanced Electromagnetics, and I came across cos(cos(x)) somewhere. I was curious about what the plot looked like, so I entered it into Desmos, and then I plotted cos(cos(cos(x))) and cos(cos(cos(cos(x)))) and so on, and I noticed that every iteration made the plot look more and more like a horizontal line, i.e. a constant. I did some digging and found that the constant had already been discovered, and was named the Dottie Number.

  • @ianboard544
    @ianboard544 2 года назад +4

    My first though was that this is like an eigenvalue, that is to say x st x = f(x), for f(x) = cos(x) because when this is true, the whole cos(cos(cos(...cos(x) sequence collapses. I'm not sure how you find it, other than iteratively. What was interesting was trying this on a calculator, I saw it oscillate around the final value with smaller and smaller amplitude.

  • @aquilazyy1125
    @aquilazyy1125 2 года назад +4

    This is great. I’m learning about fixed point iteration recently in my numerical algorithm course, and I always have a hard time picturing these process in my head. The spiral graph is a really helpful perspective!

  • @carly09et
    @carly09et 2 года назад +15

    Interesting, I hadn't thought of recursion in this light. Obvious in hindsight. Weird how the different deffintions of "function" aline... The question is how this works in generalized 'Space' ! :)

  • @bledlbledlbledl
    @bledlbledlbledl 2 года назад +3

    remember trying something like that when I first got a calculator that had trig stuff on it. Just kept hitting the "COS" button over and over (also tried the "!" button over&over and it overflowed, the "SIN" button over&over and it went to zero, etc...)

  • @fantiscious
    @fantiscious Год назад +2

    Fun Fact: There's an application of the derivative of a function f at its fixed point x*, and its that it tells us how fast we approach our fixed point by reiterating f around x*.
    In this case, we have the derivative of cosine evaluated at x* ≈ 0.739, so we get -sin(x*) ≈ -sin(0.739) ≈ -0.674. What this tells us is if we take some value x near x* ≈ 0.739, say x = 0.75, then the distance from f(x) to x* will be about -0.674 times the distance from x to x*. Written as an equation, we have f(x) - x* ≈ f'(x*)(x - x*). And plugging in f(x) = cos(x), x* ≈ 0.739, and x = 0.75 we see that this is true, as we get cos(0.75) - 0.739 ≈ -sin(0.739) (0.75 - 0.739), which gives −0.007396 ≈ −0.007352.
    f(x) - x* ≈ f'(x*)(x - x*) also lets us approximate cosine in terms of x and x* well if x is close to x*. I won't write out the work but approximating cos(0.74) with the equation should have an error less than a millionth!

  • @adityamrai3892
    @adityamrai3892 2 года назад +2

    Wow. This video appeared in my feed and I browsed the channel. I m really elated to see something like this made by someone so passionate.
    Much appreciated. 🔥
    I'll tell about this channel to my friends as well.
    Such a gem should get more subscribers.

    • @DrTrefor
      @DrTrefor  2 года назад +1

      Thanks so much!

  • @zsoltnagy5654
    @zsoltnagy5654 2 года назад +2

    This video is providing a great demonstration of the Banach fixed point theorem.
    But the video didn't emphasize on, how immensely important this theorem truly is.
    But to be also honest, I for myself simply cannot stretch enough, how immensely important the Banach fixed point theorem really is.
    From this theorem basically follows the theorems for inverse functions, the existence and uniqueness of differential equations and basically any numerical approximations and alternative methods like finding the roots of a function with the Newton-method.
    So basically, what I'm getting at, that ALL modern and current science is basically reliant on the results from this theorem and what it can provide and has already provided.

  • @udgeyjudge4289
    @udgeyjudge4289 Год назад +1

    I like how intuitive the answer cos(x) = x is when you think about it (if you assume that the sequence does in fact converge). Because whatever number x it converges to, it must be true that applying cos to x one more time will give you back x - if it gave you anything else, then evidently the sequence doesn't converge to x, but to this other number. So it must be true that cos of the answer is equal to the answer itself --> cos(x) = x.

  • @Wouldyoukindly4545
    @Wouldyoukindly4545 2 года назад +1

    f(x) = cos(ln(x)!) Does not converge under repeated applications. It starts to, gets to about the 6th decimal place uniformly decreasing, then starts bouncing back up... then slowly eases back down, and bounces back up. The closer it gets to converging the farther up it bounces.

  • @Robert-jy9jm
    @Robert-jy9jm 2 года назад +6

    f(x) = 2 + x - arctan x, satisfies the definition of a contraction in the video, but doesn't have a fixed point. (See wiki for definition of a contraction.) Great video though! Nice explanation of the spiral geometric view!

    • @DrTrefor
      @DrTrefor  2 года назад +2

      Ah true. I tried to simplify the idea for the viewers and ignore saying it was less than k|y-x| for some k

  • @zdikbiodr7341
    @zdikbiodr7341 2 года назад +1

    This is the first time ever I have subscribed to a channel after watching just one podcast.

  • @94psy
    @94psy 2 года назад +1

    if you start with an angle in radiant you reach 0.7391, if you start with an angle in degree you will reach 0.9998.
    i tested it in matlab:
    clear all; close all; clc
    it=1000000;
    prompt = 'Input a starting angle ';
    x = input(prompt);
    for l = 1:it
    x=cosd(x); %x in degree
    % x=cos(x); %x in radiant
    end
    disp(x)

    • @phoenixshade3
      @phoenixshade3 Год назад

      While this is true, degrees are a completely arbitrary measure of angle. There is no internal mathematical point of reference that makes it sensible. Radians, on the other hand, describe the length of the arc at the unit radius. While degrees may fit better with common experience, mathematically they don't make a lot of sense.

  • @fredrussell5539
    @fredrussell5539 2 года назад +1

    I love to hear the logic and see the analysis. It is much more emotionally and intellectually satisfying than the "10-second graphing calculator solution". You can probably tell from my comment that I'm an old geezer, a retired community college math instructor.

  • @felipegiglio2047
    @felipegiglio2047 2 года назад +1

    it's the first time I see your channel here and it's always good to find some great youtube math videos. Most of math videos on youtube are about people who dont know math trying to clickbait saying like "1+2+...=-1/12". The math channels I knew were good were 3b1b and Mathologer, and apparentely yours too. Well, it's just a suggestion, I'm a olympiad student from Brazil and I would love to see videos about olympiad math problems, like IMO or maybe something a bit easier. There are some beautiful problems which dont require much of a basis like combinatoric ones, and I bet everyome should love it. Thanks for the content!

  • @deepthakur14916
    @deepthakur14916 2 года назад +1

    7:06 Thats is not the definition of a contraction mapping , as stated the theorem would be false.

  • @Bollibompa
    @Bollibompa Год назад

    For a fixed point to be a solution, the slope of the tangent by that fixed point must be less than 1. If you start with exactly pi/2 you will not converge towards the Dottie number. Solving it with a computer can lead to the solution eventually due to machine epsilon inaccuracies.

  • @derekkim5520
    @derekkim5520 2 года назад +1

    you could also take a more algerbraic approach as well, for example,
    let y=cos(cos(cos(......
    then you would get y=cos(y)
    by replacing the "cos(cos(...." with y
    and since y is just some arbitary constant like x then we arrive to the same conclusion in the video :)

    • @DrTrefor
      @DrTrefor  2 года назад +1

      True, that works IF you know it converges, but how do you know that is true?

  • @franciscojavierramirezaren4722
    @franciscojavierramirezaren4722 2 года назад +2

    The so call Fixed point method to find the root of equations...nice vid, thanx!

  • @yahccs1
    @yahccs1 2 года назад +1

    A neat way to find a converging iteration method for the solution to the equation.
    Just like for infinite continuous fractions x=a/(b+a/(b+a/(b+...))) is just like saying x=a/(b+x) and guessing x1 gives x2=a/(b+x1) etc. which is such a neat way of calculating square roots from a formula instead of the long division style method!
    sqrt(n) = a + b/(2a+b/(2a+...) where b=n-a^2
    OK I know this gives increasingly large denominators in fractions and the long division method sorts out the decimal places in the square root which is so much easier than dividing big numbers in fractions.
    One equation I was trying to find a solution to using iteration didn't work because some iterations took the next value further from the solution than the previous, and it didn't converge. Some take ages to converge. Your x = cos x is a good example. I tried putting in x1=0.73 on Excel to see how many iterations it takes to get the solution to 15 decimal places: 81 iterations! A bit longer than I expected.
    I was just curious to see what the solution was in terms of pi, because it is in units of radians. OK it's 0.235258...pi radians, not an obviously special number.
    Maybe naming numbers after people is not as good as giving them a number that is easier to remember like maybe the 'cozzy number' because it comes after reapeating cos(x) many times!

  • @28aminoacids
    @28aminoacids 2 года назад +2

    Is it necessary to have any fixed point at all? Let f(x)=0.5*(x+sqrt(x^2+4)). Which is just one branch of a hyperbola where y=0 and y=x are asymptotes. This function satisfies |f(y)-f(x)| < |y-x|. But it doesn't have a fixed point since y=x is just a asymptote line.

    • @DrTrefor
      @DrTrefor  2 года назад +2

      Check out the pinned comment. I slightly misstated the definition of a contraction in a way that allows your example.

  • @stvp68
    @stvp68 2 года назад +2

    That spiral visual is super helpful. Thanks!

  • @imranq9241
    @imranq9241 2 года назад +2

    Could you use the same intuition for any repeated function? This should exhibit the same properties for any convex periodic function, ie converging to one value where f(x) = x

    • @DrTrefor
      @DrTrefor  2 года назад +2

      As long as the function has the contraction property yes!

  • @anotherrandomguy1297
    @anotherrandomguy1297 2 года назад +4

    I am currently learning Bellman Operators in Reinforcement learning and this idea of contraction operator is also there. I presume this theorem is used in some way to find the solutions of the recursive bellman expectation equations.

  • @teslapower220
    @teslapower220 2 года назад +2

    Lol everyone with a scientific calculator in high school ended up finding this...

  • @toddmcknight9989
    @toddmcknight9989 2 года назад +1

    You could skip steps just by saying
    Cos(cos(cos…(x))) = y
    Then because of the self similarity you can say that
    Cos(y)=y
    Which lands you on that same forumula without the spiraling

    • @DrTrefor
      @DrTrefor  2 года назад +1

      True, but this only works if you know it converges!

  • @0xEmmy
    @0xEmmy 2 года назад

    Thinking this through:
    Always contractions
    - Sin (0)
    - arctan (0)
    - arccot (.86ish)
    - cos (.739ish)
    - e^-x (.567ish)
    Conditionally contractions:
    - csc (1.114 within 2.773-pi/4 of pi/2)
    Never contractions:
    - arcsec (becomes undefined within 3 iterations)
    - arccsc (increases until becoming undefined, except at x=arccsc(x)=1.1ish)
    - tan (chaotic)
    - cot (chaotic)
    - sec (chaotic)
    - arcsin (range increases until undefined, except at 0)
    - arccos (range increases until undefined, except at .937ish)
    - logarithms (always become undefined)
    - e^x (increases to infinity)

  • @Novak2611
    @Novak2611 2 года назад +37

    I think there's a problem with your definition of contraction, it should be |f(x)-f(y)|

    • @DrTrefor
      @DrTrefor  2 года назад +28

      This is a good point. I was *trying* to simplify the idea so as to not have to explain the bit about the k, but choosing k=1 and making it a strict inequality isn't quite the same thing as making it k strictly less than 1. Thank you!

    • @makJeff
      @makJeff 2 года назад +3

      I think there’s something called Lipschitz criterion… not sure if it’s related to this

    • @Novak2611
      @Novak2611 2 года назад

      @@makJeff The result in the video is still true if one replaces "contraction" by "contractive".

    • @makJeff
      @makJeff 2 года назад

      @@Novak2611 Def. Lipschitz function
      Let A be a subset of R and let f be a mapping of A on R. f is said to be a Lipschitz function if it satisfies the Lipschitz Condition:
      |f(x)-f(u)|

    • @makJeff
      @makJeff 2 года назад

      @@Novak2611 not sure what u mean by contractive function, becoz I’ve only heard of contractive sequences
      The proper word to be used here is probably “contraction”
      Again, I’m just a beginner, correct me if I’m wrong

  • @allanjmcpherson
    @allanjmcpherson 2 года назад

    I started off thinking I had no idea how to even start something like this but feeling like there was something familiar about this. As the video progressed, I realized the problem as stated is just the relaxation method for solving the equation cos(x) = x, an incredibly useful albeit somewhat slapdash way of solving non-linear equations that I've studied in a physical computing class.

  • @zo1o281
    @zo1o281 6 месяцев назад

    a fun heuristic that you can look at to "guess" the answer is that you set a=cos(cos(cos(...))) and notice that inside the first cos you have a again so you get a=cos(a), not very rigorous but still pretty cool

  • @francescfloresgamez657
    @francescfloresgamez657 2 года назад +1

    i would just said: let L= cos(cos(cos...(x), then L = cos(L), which gives a direct solution. however, your proof shows geometrically where this number comes from, and that's what i love about it

    • @DrTrefor
      @DrTrefor  2 года назад +2

      That’s a good method IF you know it converges

  • @brockobama257
    @brockobama257 2 года назад +1

    I’ve been down this rabbit hole before. Glad to see it in a video.

  • @drmonty6823
    @drmonty6823 2 года назад +2

    MASSIVE thank you for the calculus playlists! Great interesting video making my love for math become stronger

    • @DrTrefor
      @DrTrefor  2 года назад +1

      You are most welcome!!

  • @padraiggluck2980
    @padraiggluck2980 Год назад

    Assume the infinite expression, call it C(x), has value y. Taking the cos of both sides of y = C(x) leaves the RHS unchanged, so cos(y) = C(x) = y and y = cos(y) -> y = 0.739.

  • @bidish2224
    @bidish2224 2 года назад

    At first I didn't understand the spiralling but when I tinkered it with pen copy for sometime and understood it was just amazing how they boiled down that iteration to such an intuitive visual spiral.

  • @zachpence8283
    @zachpence8283 2 года назад +2

    I remember back in Calc 1 we had to differentiate sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(sin(x)))))))))); it makes a beautiful triangle if you put each factor on its own line and right align everything. This gave me flashbacks. Good video

    • @DrTrefor
      @DrTrefor  2 года назад +1

      Oh my, that is quite the exercise of the chain rule!

    • @zachpence8283
      @zachpence8283 2 года назад

      Yeah. My professor reallyyy wanted to emphasize the "chain rule is like peeling an onion" analogy. So he created that monstrosity

  • @petarniciforovic6543
    @petarniciforovic6543 2 года назад +2

    Mathematics teachers are like: HMM THIS IS AN INTERESTING ONE. IT WILL BE A BASIC QUESTION ON YOUR EXAM

  • @JonnyPowell
    @JonnyPowell 2 года назад

    Method to reach answer by rearranging:
    Using BFPT to show limit exists, then cos(cos(…x)) = L => acos(cos(cos(…x))) = acos(L) => cos(cos(…x)) = acos(L), hence L = acos(L) => cos(L) = L => L = 0.7…

  • @imranq9241
    @imranq9241 2 года назад +1

    The y=x line for intuition is brilliant!

    • @vladimirshitov2160
      @vladimirshitov2160 2 года назад

      It is really beautiful, but I didn’t quite get it :/

  • @rooksman64
    @rooksman64 2 года назад +1

    in physics, for small angle approximations you can approximate sin x = x and cos x = x

    • @DrTrefor
      @DrTrefor  2 года назад +1

      Cos x is about 1 I think for small x

    • @rooksman64
      @rooksman64 2 года назад

      @@DrTrefor correct
      I mixed up the two

  • @brendangolledge8312
    @brendangolledge8312 2 года назад

    After watching the solution of spiraling into the convergence point by bouncing between y = cos(x) and y = x, I felt like there ought to be a graphical way of seeing whether any arbitrary function will converge recursively.
    After a lot of fiddling, I think I've figured out that a function will recursively converge if:
    1. y = f(x) crosses y = x
    2. The closest point at which f(x) = x (the two graphs cross) has a slope with absolute value less than 1 ( |f'(x)| < 1 at f(x) = x )
    I figured out point 2 from their definition that it is a convergent function if |f(y) - f(x)| < |y-x|
    Also, you can use f(x) = x to find the solution if it converges
    Here are some examples of playing with this:
    Using this methodology, you can see that sqrt(2)^sqrt(2)^sqrt(2) ... = 2. If you use the graphical method (have some starting point other than the convergent point and draw lines) and start from the left, you will approach (2,2) from the left, and sqrt(2)^x has slope less than 1 at x=2, so it converges. However, if you use the graphical method and approach from the right, you approach x = 4 ( sqrt(2)^x = x at both 2 and 4 ), and sqrt(2)^x has slope greater than 1 at that point, so you will actually diverge if you approach from the right (bounce farther and farther away from the convergence point, getting bigger and bigger numbers). I believe there are many such functions that will converge from one direction, but not the other.
    If you have functions symmetric about y = x, such that the slope where it crosses y = x is -1, then you will neither converge or diverge because using the graphical method will draw a rectangle rather than a spiral. Examples are y = 2-x, y = 1/x, and y = sqrt(2-x^2). In all these cases, 1 is a convergent solution for f(x) = x, but if you use the graphical method, you will trace a box over and over again, indicating that you will never actually get closer to the convergent point if you don't start there from the beginning.
    1/x neither converges nor diverges (it draws a box), 1/sqrt(x) converges, and 1/x^2 diverges (the graphical method gets you farther and farther away), even though starting with the point (1,1) gives you a convergent solution for all of them.
    You can also play with lines. If f(x) = 1-x, it will neither converge nor diverge, since doing the recursion will give you 1 + 1 - 1 + 1 ... . If you use f(x) = 1 - 0.5x, that has slope less than 1 and you will converge, because it will produce the series 1 - 1/2 + 1/4 - 1/8 ... = 2/3. If you use f(x) = 1 - 2x, you will diverge, because the recursion produces 1 - 2 + 4 - 8 ... (although it doesn't exactly converge to a stable point, using 1/(1-r) says it averages 1/3). Using f(x) = 2x -1 will even more obviously diverge, since you will get the series -1 - 2 - 4 - 8 ... .

  • @josephelmes2165
    @josephelmes2165 2 года назад

    Note that you can find the approximate value of Cos(x) = x by considering the Taylor series of Cos(x) = 1 - x^2/2 + O(x^4), such that we now consider the roots of 1 - x^2/2 = x, implying that x \approx \sqrt{3} - 1 using the quadratic formula. This value corresponds to around 0.73205.

  • @WralthChardiceVideo
    @WralthChardiceVideo 2 года назад +1

    given the theorem of engineering one could say that because cos(x) ≈ 1 that cos(1) ≈ 1 and therefore any further cosigning will not change anything about being 1

    • @DrTrefor
      @DrTrefor  2 года назад +2

      Lol at theorem of engineering, love that

  • @muxammadrizo3643
    @muxammadrizo3643 2 года назад +1

    Thank you. You saved my life. I really appreciate your efforts.

  • @beauthetford7608
    @beauthetford7608 2 года назад +4

    My real analysis prof had a pretty cool demo when he told us about Banach fixed point theorem: he brought a printed out map of campus and dropped it on the floor, and had us convince ourselves that there was one unique point on the map that was directly over the location it represented on the floor. Printing out a map is a contraction in R2 that you can demonstrate! (if you're standing within the bounds of the map)

  • @Bismvth
    @Bismvth 2 года назад +1

    Think I found an easier way to solve this one without using graphical intuition.
    Say we set the value of cos(cos(cos... to n.
    cos(cos(cos... = n
    Applying a cosine to both sides of the equation will not change the value of the expression on the left, because it is infinitely long, and infinity plus 1 is still just infinity.
    cos(cos(cos... = cos(n)
    Now, understanding the transitive property of equality, we can deduce that
    cos(n) = n
    Since there is only one real number that satisfies this equation, we know exactly what n equals, and so we know what cos(cos(cos(cos... equals.
    n ≈ 0.739...

    • @DrTrefor
      @DrTrefor  2 года назад +1

      This gives you the answer if you already k own it converges

  • @bukzor
    @bukzor 2 года назад +1

    Doesn't the answer depend on your units of measure for angles? Using a 360-degree cosine function will yield a different numeric result, I'm pretty sure.

  • @isobaric
    @isobaric 11 месяцев назад

    Contraction Mapping Theorem just sounds so much cooler than Banach Fixed Point Theorem

  • @tarunbalchandbhaimulchanda6929
    @tarunbalchandbhaimulchanda6929 2 года назад +1

    I feel Bad Why I was unaware of such Great RUclips Channel.Maths is love to me and This Guy Is Just awesome

  • @taektiek526
    @taektiek526 Год назад

    I solved it by viewing the solution as the limit to the sequence you provided. Then if you say that the sequence converges to some x_n for which cos(x_n)=x_n, else it wouldn't be converging.

  • @DjVortex-w
    @DjVortex-w 2 года назад +2

    Is there no closed-form expression that's the solution to cos(x) = x?

    • @DrTrefor
      @DrTrefor  2 года назад +1

      Nope!

    • @fantiscious
      @fantiscious Год назад +1

      It's got some forms using definite integrals. But they're REALLY complicated...

  • @hach1koko
    @hach1koko Год назад

    I remember having fun during classes in high schools by starting from a random x, computing cos(cos(...(cos(x))) and watching the sequence converge to the fixed point. I was very intrigued by that behavior

  • @acoral1035
    @acoral1035 2 года назад

    Or, alternatively, you can hit a rectangle that is not contracting further. A bifurcation, that splits the solution into two alternating roots y=f(x) and x = f(y).

  • @Gunbudder
    @Gunbudder 2 года назад

    This reminds me of when i learned about the sinc function in my work. it blew my mind that an entire industry just divides by zero all day long, and nothing breaks. you aren't really dividing by zero with sinc, but you also kind of are. if you don't know, sinc(x) is just shorthand for sin(x)/x (the sin version of this video's function). sinc gets used a lot in RF and signal processing. sinc is defined as being equal to 1 when x is 0, and if you ask any solver to find when sinc(x) is equal to 1 (again the sin version of this video), it will tell you a number VERY close to 0, but not zero (usually 2x10^-23, or the smallest non-zero positive value you can have with a 32 bit floating point number).
    i suspect this video uses cos instead of sin because its avoids the weirdness of allowing division by zero and it has a more interesting answer compared to just zero.

  • @Dziaji
    @Dziaji 2 года назад +1

    Root 2 doesn’t have a special name. Root 2 is shorthand for “the square ROOT of 2”. So it doesn’t have a name, just like the square root of pi doesn’t have a name, but you can refer to it as “root pi”. In a similar way, we can refer to 3 as “2 plus 1”, but that doesn’t mean 3 has multiple names.

    • @kevinmartin7760
      @kevinmartin7760 2 года назад

      I tend to agree, root 2 is not the name of the number, just the expression which evaluates to the number.
      Though that leads down a rabbit hole: Negative numbers don't have names, you are just specifying them as the negation of a positive number, positive rationals don't have names, you are just specifying them as the quotient of two natural numbers, natural numbers above 9 don't have names, you are just specifying the (usually) base-10 encoding which evaluates to the number, etc. You are eventually left with only 10 named numbers: 0, 1, 2, ..., 9. At certain theoretical levels, the only named number is zero, and all other natural numbers are expressed as the successor to the next-smaller number.

    • @Dziaji
      @Dziaji 2 года назад

      @@kevinmartin7760 You are correct. Most numbers don't have names; they simply have a unique notation that consists of mathematical symbols. Some numbers are named, and it tends to be numbers that have complicated notation like pi, phi, or e. root 2 is not one of them.

  • @headecas
    @headecas 2 года назад +1

    random dude: why u even made this vid?
    Trefor: just cos

  • @PentagonalSquid
    @PentagonalSquid 2 года назад

    Call the infinite set of cosine functions A. We can take the cosine of A once and still have an infinite number of cosines, so cos(A)=A. Therefore, A is the solution to cos(x)=x.

  • @zanti4132
    @zanti4132 2 года назад +2

    OK, but the spiral being described doesn't necessarily have to converge to a point, does it? For example, I imagine a box in the graph, where the spiral gets closer and closer to the box but always stays outside the box. In this case, the spiral does not converge to a point.

    • @francoislaniel868
      @francoislaniel868 2 года назад

      In this case, f cannot be a contraction as if it was, it would converge by the theorem described in the video.

  • @NobodyYouKnow01
    @NobodyYouKnow01 Год назад

    It all the sudden clicks why "approaching" a value is not "equal" to the value. For x=0.739…, there is only one input leading to the output. For any other value, after a finite number of iterations, you may have a close, but never exact answer.

  • @Leonar1450
    @Leonar1450 2 года назад +3

    On a funny note, in italian the expression in the title is literally read as what(what(what(what(what(...)...) and it's pretty hilarious, other that being fascinating math in and of itself.

  • @DoiInthanon1897
    @DoiInthanon1897 2 года назад

    Prime example of a question I’ve never thought of.

  • @imeprezime1285
    @imeprezime1285 2 года назад +1

    Closely related problem
    Let
    x_0 = 1
    x_1= tan (x_0)
    x_n = tan( x_n-1)
    Set {x_0 , x_1,..., x_n,...} is dense in reals. That Fekete's conjecture. Prove it! 😁

  • @freeshavaacadooo1095
    @freeshavaacadooo1095 2 года назад

    cos(x) = x just makes sense outta the get go since you could really look at nested cosines as a recursively defined function which cos(x) = x satisfies as plugging and substituting would give you cos(cos(x)) = x which is then just cos(cos(cos(cos(x))) = x and so forth and so on until infinity.

  • @staswisniewski4101
    @staswisniewski4101 2 года назад

    In Banach Theorem at 8:40 is broken bracket (in sequence x_n=f(...))

  • @nihil1
    @nihil1 Год назад

    This happened to me when I noticed that on an HP-48 iterating ln over anything would lead always to the same number. Then I learned that this was a numerical solution to ln x = x, which in turn led me to know Lambert's W function. :)

  • @monkerud2108
    @monkerud2108 2 года назад

    Its pretty easy to spot that if it does indeed converge to a fixed value it must be the value where the output doesnt change per itteration which is only cosx=x, just like the itterative sequence approaching phi doesnt change with an input of phi, or any other such thing. cool little quicky problem tho:)

  • @gavintillman1884
    @gavintillman1884 2 года назад +1

    Remember as a kid banging the cos key on a calculator over and over again and seeing what happens, and realising that switching from Deg to Rad mode changes the behaviour.

  • @brothberg
    @brothberg 2 года назад

    One way to prove that cos is a contraction, expand it in power series. Then, when you do it to cos x - cos y, you can factor the results. This gives the answer.

  • @m.f.3347
    @m.f.3347 2 года назад

    My first instinct was to take the same approach as solving for the golden ratio:
    if x = cos(cos(cos......
    then x = cos(x)
    because it's infinite, it contains itself.
    then just rewrite cos(x) in terms of e, and you get about 0.74 like you said.
    The proof is interesting, it seems to me, geometrically speaking, that it basically says that if one function f grows slower than a given function g, then there must be an intersection where f = g

  • @Henrix1998
    @Henrix1998 2 года назад

    Bold guess: because cos(x) is always between 1 and -1, and cos(0)=1, it will get closer and closer to 1. But because cos(1)=0, it will be some point between 0 and 1. When x increases, cos(x) decreases and vice versa. So my guess is that the value is the solution to x=cos(x) which Wolframalpha tells is 0.739

  • @MrNicePotato
    @MrNicePotato 2 года назад

    Once you showed cos(x)=x, I realized how obvious that is. Of course if the function converge to anything, x_n=cos(x_n).

  • @spock8505
    @spock8505 2 года назад

    i think there's an other preety easier way to find the limit. Let cos(cos(cos(...)))=b. Then cos(b) would also be b, so there comes the conclusion that our limit is the sollution of the equation b=cos(b)

  • @thepigvillage
    @thepigvillage Год назад +1

    Could we call the point at which cos(x)=x the “cosine functional identity”? That’s a term I just came up with that I think makes sense

  • @Robbie-nl4lb
    @Robbie-nl4lb Год назад +1

    Does the fixed point theorem have anything to do with steady state distributions with markov chains? It sounds similar

    • @DrTrefor
      @DrTrefor  Год назад +1

      Maybe not immediately, but there are LOTS of various fixed point theorems and indeed a bunch of them can transfer theorems between discrete and continuous worlds

  • @changbadinesh
    @changbadinesh Год назад

    this plot is called cobweb plot...I have explained this in my paper regarding fixed point iteration while solving finite squarewell problem in QM

  • @Axacqk
    @Axacqk Год назад

    There is a nice approximation, x ≈ 2*π/17, and regular 17-gon is classically constructible.

  • @Currywurst4444
    @Currywurst4444 2 года назад

    The problem is interesting but I dont think it's what most people think about when you ask them about infinite cosinus. Something more intuitive could be the question what the limes of a*cos(a*cos(... a*cos(x))...) is for different x and a.
    From what I can tell there were some funny periodic behaviours for different combinations of x and a.

  • @jongalonja9233
    @jongalonja9233 2 года назад

    I think I vaguely remember there also being an unstable fixed point at -0.739 but as it's unstable, entering anything even just slightly off will lead back to +0.739?

  • @2meganestor
    @2meganestor 2 года назад +1

    Very nice video really enjoyed it! I’m glad that Jerrod Smith referred me to this channel!