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!

  • $\begingroup$ Are you looking for the derivative with respect to the order, degree or variable? $\endgroup$ – GertVdE Dec 6 '13 at 19:48

You can find the recurrence relations for the first derivative (with respect to the variable) 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).

| cite | improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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