Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I want Sinc'[0] to return 0, but instead it returns Indeterminate.

I've tried

Derivative[1][Sinc][0] ^= 0

But it doesn't work.

Maybe this needs to be similar to this (from the help files for Derivative)

f'[x_] := If[PossibleZeroQ[x], N[0, Precision[x]], (x Cos[x] - Sin[x])/x^2];
share|improve this question
Why not define your own function? –  VF1 Feb 11 '14 at 23:13
I'd be interested in knowing if the community considers this a bug –  Rojo Feb 11 '14 at 23:48
@Szabolcs yes. However, that single point is the whole point of having a Sinc function in the first place so this itches me a little –  Rojo Feb 12 '14 at 1:18
@Rojo I played a bit with piecewise functions and I think I know why this is not feasible: suppose the derivative were returned as a piecewise. Actually we might as well start from sinc[x_] := Piecewise[{{Sin[x]/x, x != 0}}, 1]. The mathematically proper derivative of Sinc should be what sinc'[x] returns. But now let's take the derivative of this once more: D[sinc'[x],x]. This will be a piecewise that's still 0 in the point $x=0$. However the actual second derivative sinc''(0) should be -1/3. This illustrates how Piecewise itself is unable to handle derivatives ... –  Szabolcs Feb 12 '14 at 1:27
... in a mathematically correct way, and it's not difficult to see why. Since Piecewise won't give us proper derivative, it doesn't make a lot of sense to return a piecewise for Sinc'[x]. It would just delay the problem until the next derivative. OK, this is somewhat subjective, but after thinking this through I start to accept why they might have consciously made the decision not to both with Sinc'[x] in x=0. My point is that while they could have implemented Derivative[n][Sinc][x] to return a correct Piecewise for any n, taking another derivative of that result would fail anyway. –  Szabolcs Feb 12 '14 at 1:28

2 Answers 2

up vote 7 down vote accepted

One solution is making your own function:

MySinc[x_] := Sinc[x]
Derivative[1][MySinc] ^= 
  If[# == 0, 0, Derivative[1][Sinc] // Evaluate] &;
(* 1 *)
(* 0 *)

And then in expressions which use Sinc use expr/.Sinc->MySinc. To me this seems like the cleanest solution. However, this can be done with Sinc, too. But it is difficult to undo!

tmp = Derivative[1][Sinc] // Evaluate;
Derivative[1][Sinc] ^= If[# == 0, 0, tmp] &;
(* 1 *)
(* 0 *)
share|improve this answer
I supose i should accept this. It offers 2 good suggestions –  pdmclean Feb 14 '14 at 21:38
@pdmclean does the latter part not directly answer your question? –  VF1 Feb 15 '14 at 1:13

The function is:

f[x_] = D[Sinc[x], x];
Cos[x]/x - Sin[x]/x^2

In its current form, the value at x=0 is indeterminate. It is only when taking the limit as x->0 that a value emerges. Hence:

Limit[D[Sinc[x], x], x -> 0]

Or, more succinctly:

Limit[f[x], x -> 0]
share|improve this answer
I of course agree that you need to take the limit but the same reasoning could be applied to Sinc alone. So I agree with @Rojo above that the reason to have a Sinc function should be that you don't have to evaluate Limit[Sin[x]/x,x->0] every time. It would be nice if the same was true for Sinc'. –  sebhofer Feb 12 '14 at 16:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.