These fields are all optional and need only
be supplied if you would like a direct reply.
Subject
Your email address
Your real name
You must answer this!
If you don't, my spam filtering will
ensure that I never see your email.
What's 8 plus five (in digits only)?
Please make your changes here and then
Editing tips and layout rules.
File: FillInTheGaps ''' <link rel="alternate" type="application/rss+xml" ''' href="/rss.xml" title="RSS Feed"> ********> width="25%" |>> ''' <a title="Subscribe to my feed" ''' rel="alternate" ''' href="https://www.solipsys.co.uk/rss.xml"> ''' <img style="border-width: 0px;" ''' src="https://www.feedburner.com/fb/images/pub/feed-icon32x32.png" ''' align="middle" ''' alt="" />Subscribe!</a> _ ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> <<| ---- My latest posts can be found here: * ColinsBlog ---- Previous blog posts: * SoftwareChecklist * NASASpaceCrews * TheBirthdayParadox * TheTrapeziumConundrum * RevisitingTheAnt * TheAntAndTheRubberBand * IrrationalsExist * MultipleChoiceProbabilityPuzzle * RandomEratosthenes * WrappingUpSquareDissection * DissectingASquarePart2 * DissectingACircle * DissectingASquare * AnOddityInTennis * DecisionTreeForTennis * DecisionTreesInGames * AMatterOfConvention * DoYouNourishOrTarnish * BinarySearchReconsidered * TwoEqualsFour * TheLostPropertyOffice * TheForgivingUserInterface * SettingUpRSS * WithdrawingFromHackerNews ---- Additionally, some earlier writings: * RandomWritings. * ColinsBlog2010 * ColinsBlog2009 * ColinsBlog2008 * ColinsBlog2007 * ColinsBlogBefore2007 ******** !!! Fill in the Gaps - 2014/05/03 Recently I had an interesting conversation on twitter, insofar as one can have a conversation at all in that medium. It started with the following perfectly reasonable question ... {{{ Q> Sorry for what may be a stupid question, Q> but sin(x)/x has a limit of 1 as x -> 0, Q> so does it not cross x=0 at 1? }}} So firstly, no, this is not a stupid question at all, it's a very reasonable question. In fact, it goes right to the heart of a topic that's frequently overlooked. [[[> https://www.solipsys.co.uk/new/images/sin_x_on_x.png ]]] So we're going to look at the function EQN:y=\frac{sin(x)}{x}. The point that's often overlooked is this: * Part of the definition of a function is a specification of the values the function is intended to take as input. This is called the "Domain" of the function and it is an inherent part of the function itself. It's not just an add-on, it's not just something to mention in passing, it is an inalienable part of the definition of the function. {{{ A> Technically the function y=sin(x)/x A> is not defined for x=0. }}} So in this case the function is defined by a formula, and we really ought to say, as part of the definition, that the function has as its domain the real numbers except for 0. Usually we don't bother, because usually we have a "domain of discourse," an implicit understanding of the sorts of things we're talking about. In that case, when we say EQN:f(x)=sin(x)/x we probably mean that we are talking about a function that takes a real number as its input and produces a real number as output. We then notice that the definition doesn't work for /x=0,/ so we conveniently say "Except when x=0," and then we leave it at that. So what about when /x=0/ ? [[[> Actually there are three ways to go, _ but let's just deal with two of them. ]]] There are two ways to go. The first is to leave it undefined, and then say that the domain of the function /f/ is EQN:{\bb~R} without EQN:\{0\}. In other words, we make it explicit in the definition of /f/ that its domain is in fact /not/ all of the reals, but that we are omitting the number 0 from the domain, and therefore we don't have to define what the value of /f/ is there. And that's fair enough - we can do that. The other thing we can do is say * "Well, when /x/ is not zero, /f/ is EQN:sin(x)/x, _ and in addition we define /f(0)/ to be /z/ " _ where z is some value. Now that seems a bit arbitrary - why simply pick some random value out of the sky and declare /f(0)/ to be that? If the formula doesn't specify a value, why given it one? Well, it's a choice. This happens in maths more than people think. Sometimes there's simply a choice to be made. So we make a choice, and then see what consequences it brings. If the choice seems to lead to good things then we keep it. If the choice leads to bad things then we can go back and change our minds. And what about in this case? That leads us back to the original question, and to my answer: {{{ A> It's consistent to enhance the definition, adding A> that f(0)=1, but if not then f has no value at x=0. }}} In this case we can look at the behaviour of EQN:sin(x)/x as EQN:x gets close to zero. We notice that for very small positive values and very small negative values of /x,/ EQN:sin(x)/x is very close to 1. In fact, you tell me how close you want it to get to 1, and I can guarantee that when /x/ is close enough to 0, EQN:sin(x)/x will be within your target. In other words, EQN:lim_{x{\to}0}f(x)=1. The conversation continued ... {{{ A> Yes, lim_{x->0} sin(x)/x is 1, but that's not the A> same thing. Care required with detail. Q> So x=0 is undefined on the graph? Ah, makes sense! Some of the Q> graphs on Google I've seen look as if they cross x=0 at y=1. }}} More precisely, the function /f/ is not defined for the value /x=0/. And yes, when you look at the graph it looks like /f(0)=1/ because that's the limit from both sides. So as we say above, it makes sense to make that choice to add in that extra value. {{{ Q> I mean, so the graph crosses x=0 at y=1 because as x approaches zero Q> it's consistent with y approaching 1? A> There is a gap in the graph at x=0 - unless you explicitly add A> the value as a special case, there is no value. A> The function y=1 when x=0 and sin(x)/x otherwise is continuous A> and generally "nice", but is not the same function as just sin(x)/x Q> So why would you just add the y=1 when x=0? What special case would Q> this be? I mean, wouldn't it just be counter-intuitive ... Q> if we know as x=0 is undefined? _ A> Drawing the graph y=sin(x)/x you already have to say "for x!=0" - A> why not provide an extra value and have the function defined A> everywhere? A> Also, there is an infinite sum that converges for all x and has A> that value. But you can just make a choice and deal with the A> consequences. A> f(x) = 1 - x^2/3! + x^4/5! - x^6/7! + x^8/9! - ... That's A> sin(x)/x for x!=0, and 1 for x=0. Even powers, odd factorial A> denominators. }}} [[[>50 Just to expand on this more precisely. When we write: * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!}+\frac{x^8}{9!}- ... what we mean is this. Firstly, choose some value of x for which you want the value. Then create the series with those numbers, and look at the partial sums: * EQN:1 * EQN:1-\frac{x^2}{3!} * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!} * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!} * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!}+\frac{x^8}{9!} Ask if this sequence of partial sums converges. If it doesn't matter what value of /x/ you first chose, if it's always the case that this sequence of partial sums converges, then it makes sense to say that the expression * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!}+\frac{x^8}{9!}- ... has a meaning and a value for every value of /x./ It can be hard to prove this, but in this specific case, it does have a well-defined value for every /x./ ]]] To expand on this a little, the expression: * EQN:1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!}+\frac{x^8}{9!}- ... is well-defined, and for every value of /x/ (other than 0) we find that the limit of the partial sums of the resulting finite expressions is the same as the value of EQN:sin(x)/x. It's therefore consistent to say that: * EQN:\frac{sin(x)}{x}~=~1-\frac{x^2}{3!}+\frac{x^4}{5!}-\frac{x^6}{7!}+\frac{x^8}{9!}- ... We can now see that the right hand side is defined for /x=0/ and has the value 1. Again, this is a suggestion that it's reasonable to say that we define /f(x)/ to be EQN:sin(x)/x when /x/ is not zero, and to be 1 otherwise. At this point the conversation took an unexpected turn. My interlocutor said: {{{ Q> Ah, I think I'm a little lost now. How can Q> the factorial of anything =0? I think I'll Q> just accept it's not defined at x=0 for Q> non-special cases. }}} I was very confused for a moment, and then I realised I'd said: {{{ A> ... That's sin(x)/x for x!=0, and 1 for x=0. }}} What's happened is that my interlocutor mistook my "x!=0" to mean "x! equals 0", whereas I was using the usual convention from many programming languages of "!=" meaning "not equal," so I meant "x not equal to 0." However, it turns out that it's relevant and related. I replied: {{{ A> In that definition I didn't use 0! - but A> by convention 0! is taken to be 1. It's A> convenient, and makes lots of things nicer. }}} This is another example where there is a choice to be made, and we make the choice that's convenient. The statement of the Binomial Theorem is really tedious and complex if we don't take 0! (which is 0 factorial) to equal 1. There are several arguments to show that it's a reasonable thing to let 0! = 1, some of which are listed on the page about ZeroFactorial. I won't repeat them here. So the final upshot is this: some definitions we make because they seem natural and inevitable, but others we choose because they are convenient. And sometimes the difference is less than we might think. ---- |>> | |>> <<<< Prev <<<< ---- SoftwareChecklist <<| | : | |>> >>>> Next >>>> ---- BeyondTheBoundary ... <<| | ---- ********> ''' <a href="https://twitter.com/ColinTheMathmo">You should follow me on twitter</a> ******** ''' <a href="https://twitter.com/ColinTheMathmo"> ''' <img src="https://www.solipsys.co.uk/new/images/TwitterButton.png" ''' title="By: TwitterButtons.net" ''' width="212" height="69" ''' alt="@ColinTheMathmo" ''' /></a> ********< <<| ---- !! Comments I've decided no longer to include comments directly via the Disqus (or any other) system. Instead, I'd be more than delighted to get emails from people who wish to make comments or engage in discussion. Comments will then be integrated into the page as and when they are appropriate. If the number of emails/comments gets too large to handle then I might return to a semi-automated system. We'll see. ********<