I would like to compute, as part of the solution of the Laplace equation using the Fast Multipole Method, the second derivative of the associated legendre functions of the first kind .Specifically, I am looking for C implementations or just the correct recurrence relation to use to write the function myself.I have tried to look for recurrence relations and found this but I suspect that it might not be correct. I have also tried to search for ready-to-use functions like these but I have only stumbled upon functions for the first derivative of the associated functions, not the second.If somebody can point me in the right direction, I will be really grateful!Thanks a lot!
Second derivative of the Associated Legendre functions
special functions;numerical
You can find the recurrence relations in the Digital Library of Mathematical Functions (DLMF) in Chapter 14, sections 14.10 and 14.11. You'll have to take care of the stability of the recurrence, though. You should consult the references mentioned in this chapter (see final section on software and the references it points to).I think that the GSL library you mention does compute higher order derivatives (with respect to the variable). You can find another implementation in SciPy where it is explicitly mentioned that the routine calculates higher order derivatives (see man page).