MATLAB Integration of a product of legendre polynomials in matlab

AI Thread Summary
The discussion focuses on integrating a specific mathematical expression involving spherical harmonics and Legendre polynomials using MATLAB. The user seeks an efficient method to compute the integral for various fixed values of l, m, n, l', and m', as this will be part of a larger program. They consider converting spherical harmonics into associated Legendre polynomials and multiplying by an additional Legendre polynomial to simplify the integration process. The user expresses uncertainty about the best approach in MATLAB due to their inexperience with the software and wonders if using a different programming language or software might be more effective, explicitly excluding Mathematica. The mention of numerical integration techniques, specifically "quadrature," indicates a focus on finding a reliable method for performing the integral computation.
vanmil
Messages
3
Reaction score
0
I am trying to find a way to integrate the following expression
Integral {Ylm(theta, phi) Conjugate (Yl'm'(theta, phi) LegendrePolynomial(n, Cos[theta])} dtheta dphi

for definite values of l,m,n,l',m' . You normally do this in Mathematica very easily. But it happens that I need to use this integral in Matlab for many different values of l,m,n,l',m' as it will be part of of more code in a program I am writing. Is there any efficient way to solve this integral? I was thinking to convert the spherical harmonics terms into associated legendre polynomials following the formula to do this and then multiply by the other legendre polynomial (third term in the expression above). I am new to Matlab therefore I am not sure what approach to follow. Would it be easier doing this in other language or software.. except Mathematica!

Thanks and hope you can help
 
Physics news on Phys.org
for future reference, numerical integration technique is often called "quadrature":

http://www.mathworks.com/help/techdoc/math/bsgprfe-1.html
 
Last edited by a moderator:
Back
Top