It's discontinuous if the value is undefined at the origin. That happens here because the denominator of (x + t) yields a division by zero. A nonzero slope would give a kink in the curve, but not a discontinuity.
One approach to avoiding the whole question of abs(x) would be to use cosine instead of sine, since cosine is symmetric across x = 0.
> One approach to avoiding the whole question of abs(x) would be to use cosine instead of sine, since cosine is symmetric across x = 0.
I don't think that this would work, since the division by an odd function would just make it odd again (that is, `sin(x)/x` is even precisely because `sin` is odd). Note, however, that blaming `abs` for discontinuity (or non-differentiability) is a bit of a red herring; any even function on the real line, no matter how smooth, can be written as a composition with `abs`.
Hurmph. I don't see how it makes much difference whether he uses sine or cosine, since he's also adding t to the operand and then animating over it, causing the waveform to move along the x-axis. He can use one and start from t=0 or use the other and start from t=pi/2, as you like.
My point was simply that the "spike" the article goes on about (which I earlier called a discontinuity, oops) shows up because the author is reflecting his plot around the Y axis. The article makes it sound like the spike was some physically significant feature of the function being graphed.
I agree that it doesn't make any difference when you allow phase shifts (I was intentionally focussing on the `t = 0` case), so I'm puzzled by your suggestion that the author should have used cosine instead.
My point was more that there's nothing inherently 'spiky' about even functions; as your own example of cosine shows, they can be just as smooth (or spiky) as any other function.
Yes, you're right—I thought that you had made the post that was actually made by T-hawk (https://news.ycombinator.com/item?id=9022743 )—but I think that it doesn't change my point.
One approach to avoiding the whole question of abs(x) would be to use cosine instead of sine, since cosine is symmetric across x = 0.