# Cannot understand the meaning of Derivative[1, 0][BesselK][-M, 2]?

When I do the following integration

Integrate[(Log[x]/x)*x^M*Exp[-x-1/x],{x,0,\[Infinity]},Assumptions->Element[M,PositiveIntegers]]


Mathematica return a very strange result that is

In this case what is the meaning of Derivative[1,0]. Is it some kind of dirac delta function ?

• Would it help if you read it as $$\left.\frac{\mathrm d}{\mathrm d\nu}K_{\nu}(2)\right|_{\nu=-M}$$? – J. M.'s torpor Dec 26 '20 at 10:13
• This is very strange, is there any way to obtain any numerical result from this expression ? – Tuong Nguyen Minh Dec 26 '20 at 10:22
• Have you already tried supplying a specific numerical value of M, and then using N[]? – J. M.'s torpor Dec 26 '20 at 10:23
• From the documentation: "Derivative[n1,n2,…][f] is (...) a function obtained from f by differentiating n1 times with respect to the first argument, n2 times with respect to the second argument, and so on." which is what @J.M. wrote. – Roman Dec 26 '20 at 13:31

For non-integer $$M$$ we can get an explicit expression for this derivative, as given on the Wolfram Functions site:

f[M_] = Derivative[1, 0][BesselK][-M, 2] // FunctionExpand
(*    huge result    *)

f[0.37]
(*    -0.0179285    *)

Plot[f[M], {M, -1.5, 1.5}]


For specific values of $$M$$ we can get explicit expressions for this derivative directly:

Table[Derivative[1, 0][BesselK][-M, 2], {M, 0, 7}] // FunctionExpand

(*    {0,
-1/2 BesselK[0, 2],
-1/2 BesselK[0, 2] - BesselK[1, 2],
-5/2 BesselK[0, 2] - 3 BesselK[1, 2],
-10 BesselK[0, 2] - 13 BesselK[1, 2],
-99/2 BesselK[0, 2] - 65 BesselK[1, 2],
-575/2 BesselK[0, 2] - 381 BesselK[1, 2],
-3863/2 BesselK[0, 2] - 2576 BesselK[1, 2]}    *)

• Thank you so much I am interested in the case of integer M :) Particularly for M = 1,2,3,4.... – Tuong Nguyen Minh Dec 27 '20 at 6:15
• Is there any way to add the assumption that M is a positive integer into the command Derivative[1, 0][BesselK][-M, 2] ? – Tuong Nguyen Minh Dec 27 '20 at 12:18
• @TuongNguyenMinh I don't know how to do it directly in Mathematica, but there's a formula on the Wolfram Functions site that can be simplified to your f[M_Integer?NonNegative] := -Sum[M!/(2*k!*(M-k))*BesselK[k,2], {k, 0, M-1}] // FullSimplify. – Roman Dec 27 '20 at 13:28
• Oh this is so nice thank you ! – Tuong Nguyen Minh Dec 27 '20 at 14:06