Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The biggest value for sin(x)/x

  1. Aug 15, 2015 #1
    Dear PF Forum,
    Finally I have written a simple software to plot Sin(X)
    SineX.jpeg
    It can also draw y = sin(x) + cos(x). But I don't know how to use this function in real life.
    SinXPlusCosX.jpeg
    This software is very simple.
    All you need to do is altering this short function
    Code (Text):
        case FDrawMode of
          0: Result:=Sin(X)+Cos(X);
          1: Result:=Sin(X);
          2: Result:=Cos(X);
          3: Result:=Sin(X)/X;
        end;
     
    Don't forget to alter this line also.
    Code (Text):
      LS:=edtDrawMode.Items;
      LS.Clear;
      LS.Add('y = Sin(x)+Cos(x)');
      LS.Add('y = Sin(x)');
      LS.Add('y = Cos(x)');
      LS.Add('y = Sin(x)/x');
     
    If you see the last line. LS.Add('y = Sin(x)/x');.
    What if X is zero?
    I cheat :smile:
    Put catch exception in the code.
    Code (Text):
          try
            Y:=ScaleY*Fc*                 CalcY(X+Sh); // case of sin(x)/x; if x = 0 then CalcY(X) will cause error.
            YY:=Height1-Round(Y);
            CV.Pixels[XX,YY]:=PlotColor;
          except
            // if error then don't draw anything
          end;
     
    SineXPerX.jpeg
    Funnily the computer still draw the curve as it is supposed to be.
    And interesting enough. for sin(x)/x the biggest value is 1 for ##\lim_{h \to 0} \frac{\sin(h)}{h}##.
    But how to proof that the biggest value for sin(x)/(x) is lim h -> 0?
    The graph shows that, but we just can't say. "Well the graph shows that, so the biggest value for sin(x)/(x) is 1",
    Anyone interested to proof it?
     
  2. jcsd
  3. Aug 15, 2015 #2
    I think the logical tought is this:
    The biggest value for F(x)/x is if x is almost zero.
    It makes sense, if x is 4 pi or 8 pi, the value will almost zero, too.
    But if x is almost zero then Sin(x) is also almost zero, too.
    Hmm, anyone can give a bettter opinon?
     
  4. Aug 15, 2015 #3

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    The function ##\frac{sin(x)}{x}## is not defined in ##0##. Thus it never becomes ##1##. The function has no biggest value.
     
  5. Aug 15, 2015 #4

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    Anyway, finding the biggest value (maximum) of a function is a simple exercise with derivatives. Any calculus book should cover this in their section of derivatives.
     
  6. Aug 15, 2015 #5
    So the "proof" that ##lim_{h \to 0} \frac{\sin(h)}{h}## is not a "proof"? Thanks, I don't want to argue. Just want to know what other thinks.
     
  7. Aug 15, 2015 #6
    "Exercise", I like that.
     
  8. Aug 15, 2015 #7

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    I don't see how ##\lim_{h\rightarrow 0} \frac{\sin(h)}{h}## is at all relevant here.
     
  9. Aug 15, 2015 #8
    Thanks micromass, I don't even see it at the slightest either. It's just an interesting graph, I wouldn't know the answer before the computer shows it. Just want confirmation.
     
  10. Aug 15, 2015 #9

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    You "just want confirmation" of what?

    Your question is very confused. You ask about the "biggest value" of sin(x)/x.

    That function does NOT HAVE a largest value. Its value, for any x, is less than 1 but comes arbitrarily close to 1.

    Then you talk about the limit as x goes to 0 which is a completely different question! Yes, the limit, as x goes to 0, of sin(x)/x is 1. There are a number of different ways to show that depending on exactly which definition of sin(x) you are using. But that is NOT the value of the function at x= 0 because the function is NOT DEFINED at x= 0.
    There is a "removable discontinuity" at x= 0. You could "remove" it by defining f(x)= sin(x)/x if x is not 0, f(0)= 1. But that would be a different function.
     
  11. Aug 15, 2015 #10

    jedishrfu

    Staff: Mentor

    Sometimes that is the case, in this case though you know the sin(x) and you know that its periodic however the x increases and reduces the amplitude of the sin(x) so you should expect it to dampen out and approach zero at very large x values. For me the interesting part is where x<1 and the combination of sin(x) / x complements one another to create the curve shown.

    You should try other trig functions to see how they act like cos(x)/x or tan(x)/x or (sin(x)+cos(x))/x as well as other functions you learn about and develop a skill to be able to look at a function and sketch how it will look without the computer's help.
     
  12. Aug 15, 2015 #11
    Confirmation if I'm right or wrong. First I imagine what is the biggest value for sin(x)/x? I think it might, it might not be x = 0. But one thing for sure.
    ##\lim_{h \to 0} \frac{\sin(h)}{h}## is 1
    And x = pi/2; sin(x)/x is 0. So if we think linearly, it seems from x = 0 to pi/2 the value should decrease right? (or wrong?)
    Then I intend to write a computer software, not to find this answer, but because of this:
    Then I have time this afternoon, so I wrote a simple program.
    Part of the code.
    Code (Text):
        case FDrawMode of
          0: Result:=Sin(X)+Cos(X);
          1: Result:=Sin(X);
          2: Result:=Cos(X);
          3: Result:=Sin(X)/X; // ADDED LATER ON
        end;
     
    Then you can see the result as the graph above about sin(x)/x.
    "The computer DOES NOT show error if x=0??" Don't worry I cheat :smile:, see my post above.
    Okay, so I see the graph, it seems that if x close to zero sin(x)/x is the highest.
    But you know about computer variable. I use a very rough calculation, loop by 0.0001*pi step. And 0.0001 is very rough for math but not for computer variable.
    So there remains some question.
    1. Isn't there along the line from x = 0 to pi/2 a spike where sin(x)/x is bigger than 1?
    2. Sin(x)/x looks (yes, "looks", because it's shown on the screen) highest at x = 0, but x can't be zero, right?
    3. Is this true that the biggest value for sin(x)/x is ##\lim_{x \to 0} \frac{\sin(x)}{x}##
    But:
    Okay, so I'm satisfied enogh with micromass answer.

    Yes, micromass has answered it.

    Yes.
    Code (C):
    double SinXPerX1(double arc)
    {
      return(Sin(arc)/arc);
    }

    double SinXPerX2(double arc)
    {
      if(arc==0) return(1); else return(Sin(arc)/arc);
    }
     
    Agreed, it's different functions.
     
  13. Aug 15, 2015 #12

    micromass

    User Avatar
    Staff Emeritus
    Science Advisor
    Education Advisor
    2016 Award

    No.

    Right.

    No.
     
  14. Aug 15, 2015 #13
    Come on micromass. I didn't ask that. I'm afraid I have already asked too many questions a day. But that WAS my doubt, and I'm already satisfied with this:
    But, thank you very much for your answer. It removes my doubts. I'm afraid I have asked too many questions.
     
  15. Aug 15, 2015 #14
    CosXPerX.jpeg

    SinXPlusCosX.jpeg
    SinXPlusCosX.jpeg
    It seems Cos(x)/x similar to (Sin(x)+Cos(x))/x
    TanXPerX.jpeg
     
  16. Aug 15, 2015 #15
    Ahhh, I already
    Code (Text):
        case FDrawMode of
          0: Result:=Sin(X)+Cos(X);
          1: Result:=Sin(X);
          2: Result:=Cos(X);
          3: Result:=Sin(X)/X;
          4: Result:=Cos(X)/X; // added
          5: Result:=Sin(X)/Cos(X)/X; // has to change tan to sin/cos, no Tan function in Delphi
          6: Result:=(Sin(x)+Cos(x))/x
        end;
     
    Alter it, compile it, run it, save the graph and upload it.
    Hmm.., I didn't think that tan(x)/x will look like that. Picture it without computer or paper? Well, I'm not Descartes, but I'll try.
     
  17. Aug 15, 2015 #16

    Mark44

    Staff: Mentor

    IMO, the most important point here is the difference between a function's value (which might not exist) at a particular point and the limit of a function at that point. Two of your graphs are significant here: the graphs of ##y = \frac{sin(x)}{x}## and ##y = \frac{tan(x)}{x}##.

    Both graphs appear to show a point at (0, 1). In fact, neither function is defined when x = 0. The graphing software (the program you wrote in Delphi) plots a number of points and then connects the dots.

    Even though both functions are undefined at x = 0, both functions have limits that exist as x approaches 0. In mathematical notation ##\lim_{x \to 0}\frac{sin(x)}{x} = 1## and ##\lim_{x \to 0}\frac{tan(x)}{x} = 1##. It's very easy to show that the latter limit can be gotten once you know the first limit.
    ##\lim_{x \to 0}\frac{tan(x)}{x} = \lim_{x \to 0}\frac{sin(x)}{cos(x) \cdot x} = \lim_{x \to 0}\frac{1}{cos(x)} \cdot \lim_{x \to 0}\frac{sin(x)}{x}##.

    The first limit is clearly 1, since cos(0) = 1, and we know that the second limit is 1.
     
  18. Aug 15, 2015 #17
    Hi Mark44, it's been a while since you answer my post in: https://www.physicsforums.com/threads/proof-limit-derivatave-of-sin-x.826864/page-3#post-5198643
    Thanks a lot! A good point! Function value which might not exist vs the limit of that function in that point.
    Yes both are undefined at x = 0.
    Just plot the dots not connect it.
    I put something like it in the software.
    Code (Text):
    try // begin catch error
      Y = sin(x)/X; // calculate Y
      PuPixel(X,Y); // Draw the result
    except
      // catch any error
      // don't do anything
    end;
     
    The original code is at my first post above.
    Yes, yes I know. You've given me this lecture since 2 weeks ago. Thanks :smile:
    Proof why tan(x)/x = 1? Perhaps later. For now, I'm already satisfied that I can proof why ##\lim_{h \to 0} \frac{\sin(h)}{h} = 1##
    Ahh, that's the proof? Very simple actually.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: The biggest value for sin(x)/x
  1. X^x = n, value of x? (Replies: 5)

  2. Sin x =cosh x (Replies: 12)

  3. Inverse of sin(x)+x (Replies: 10)

Loading...