Solving density matrix equations

I am trying to evaluate Numerical Integration of a density matrix element by solving coupled density matrix equations for different values of certain parameter L ( find the code in the link). My code is working fine for L=0, but not L =1,2,…

https://drive.google.com/file/d/10NutMcmVBC1ppMhgXdUXJy8kQFikpADG/view

Please help me if there is any other way to do this numerical integration.