3
$\begingroup$

I'm having difficulty applying real or complex-valued functions to matrices. For example let's define

Q = {{1,2,3},{2,3,1},{6,7,8}}

Then

PolyLog[-1,Q]

obviously returns

{{ComplexInfinity,2,3/4},{2,3/4,ComplexInfinity},{6/25,7/36,8/49}}

because it is doing the PolyLog on each entry of Q separately. However, what I really want is for the PolyLog[-1,z] expression, which evaluates to z/(1-z)^2, to be applied to Q as a matrix. That is, I want output that matches

Q.MatrixPower[Inverse[IdentityMatrix[3]-Q],2]

which returns

{{-17/20, -39/20, 7/10},{9/5,26/5,-8/5},{-11/10,-37/10,6/5}}

In my research, I need to iteratively evaluate polylogs of matrices, for n= -1, -2, -3, .... The problem is the huge difference in syntax for matrices vs. real or complex numbers. Is there any way to do this without manually rewriting the function in terms of the matrix syntax?

If not, is there a way to symbolically differentiate a function defined on a matrix (since you can get polylogs iteratively using differentiation)?

$\endgroup$
3
  • 3
    $\begingroup$ Does MatrixFunction help? $\endgroup$
    – bill s
    Commented Feb 13, 2017 at 18:24
  • 2
    $\begingroup$ @bills - Just add RootReduce, i.e., MatrixFunction[PolyLog[-1, #] &, Q] // RootReduce $\endgroup$
    – Bob Hanlon
    Commented Feb 14, 2017 at 0:15
  • $\begingroup$ @bill Perhaps you would case to post that as an Answer to take this off the unanswered list, or cast a close vote if you feel this is easily found in the documentation? $\endgroup$
    – Mr.Wizard
    Commented Mar 7, 2017 at 11:11

1 Answer 1

3
$\begingroup$

You can use MatrixFunction to force PolyLog to treat its arguments as a matrix.

q = {{1, 2, 3}, {2, 3, 1}, {6, 7, 8}}; 
MatrixFunction[PolyLog[-1, #] &, q] // RootReduce

{{-17/20, -39/20, 7/10}, {9/5, 26/5, -8/5}, {-11/10,-37/10, 6/5}}

As Bob Hanlon suggested, RootReduce gives the numerical quantities (instead of the root objects).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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