Integration of a product of legendre polynomials in matlab

Click For Summary
SUMMARY

The discussion focuses on integrating the expression involving spherical harmonics and Legendre polynomials in MATLAB. The user seeks an efficient method to compute the integral of the product of spherical harmonics and Legendre polynomials for various values of l, m, n, l', and m'. The user considers converting spherical harmonics to associated Legendre polynomials and multiplying by another Legendre polynomial. They express uncertainty about MATLAB's capabilities compared to Mathematica for this task.

PREREQUISITES
  • Understanding of spherical harmonics and their properties
  • Familiarity with Legendre polynomials and their applications
  • Basic knowledge of numerical integration techniques, specifically quadrature
  • Proficiency in MATLAB programming
NEXT STEPS
  • Research MATLAB's numerical integration functions, particularly the 'integral2' function
  • Explore the conversion of spherical harmonics to associated Legendre polynomials in MATLAB
  • Learn about MATLAB's symbolic toolbox for handling complex mathematical expressions
  • Investigate alternative numerical integration methods, such as Gauss-Legendre quadrature
USEFUL FOR

Mathematics students, researchers in computational physics, and software developers working with numerical methods in MATLAB.

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:

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
7K
Replies
1
Views
11K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K