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!