# Tag Info

2

START EDIT: "Sort by default orders integers, rational, and approximate real numbers by their numerical values." Since your expressions are none of these, you should expect the "canonical order" to likely be other than numeric. "In most cases, NumericQ[expr] gives True whenever N[expr] yields an explicit number"; consequently, NumericQ will return True for ...

8

I think the reason, at least primarily, that it works differently for Plus is the following from its documentation: Unlike other functions, Plus applies built-in rules before user-defined ones. It may seem a little obscure, because perhaps we don't know all the rules, but these two are mentioned explicitly: Plus[] is taken to be 0. ...

0

I don't have any points to comment on Daniel W's answer. But here's how you write this z[[1]]/z[[2]] /. z -> zz to not generate any part errors Indexed[HoldForm[z], 1]/Indexed[HoldForm[z], 2] /. HoldForm[z] -> zz Out[1]=3/4

1

It seems the current version (10.3) is now aware of the Meijer $G$ expressions for the order derivatives (see this math.SE answer as well): Derivative[1, 0][StruveL][0, z] // FunctionExpand BesselK[0, z] - MeijerG[{{1/2, 1/2}, {}}, {{0, 0, 1/2, 1/2}, {}}, z/2, 1/2]/(2 π^2) (The last version I used, version 8, was unable to do this, if memory ...

2

The problem boils down to the fact that Derivative[1][f[##] &] 0 & Which is, in my opinion unexpected. More in: Derivative of a pure function with SlotSequence The fix is to inject a sequence of Slots (#1, #2...) of length equal to the number of arguments our function accepts: series[n__] := With[{ l = Length[{n}], slots = ...

13

I believe there are at least three cases treated separately by Derivative. 1) A function defined by a Symbol. This follows the the rule cited in the documentation. g[x___] := f[x]; Derivative[1][g][x] // Trace (* { { g' , { g[#1] <-- Here the rule is being applied , f[#1] } , f'[#1] & } , (f'[#1] &)[x] , f'[x] } ...

8

Consider Derivative[1][f[##] &] // FullForm Function[0] Function[0][x] 0 So the snippet you quote from the docs might not be entirely accurate; might not be considering such an edge case as ##. I believe that Derivative is looking for head Slot when detects a pure function goes on to rewrite it, so it ignores head SlotSequence -- i.e., ...

3

If you make a plot of your function over a region you will see that it grows to infinity as o and n increase. mi[o_, n_] := Log2[1 + 4 o (Sqrt@n + Sqrt[1 + n])^2] Plot3D[mi[x, y], {x, 0, 5}, {y, 0, 5}, AxesLabel -> Automatic] So it is certain that you need to place a bound on it. Let's plot your example with a radius of three or less. max = ...

8

One way to avoid the singularity in 0-th coefficient is to regularize the original function. The problem is due to it being a polynomial, which is why we get powers of n in denominator by partial integration - the procedure that is obviously failing for the 0-th harmonic. Obviously this is a shortcoming for the current way Mathematica computes Fourier ...

Top 50 recent answers are included