Integration of a product of legendre polynomials in matlab

In summary, the speaker is looking for an efficient way to integrate a specific expression in Matlab for various values of l, m, n, l', and m'. They mention their familiarity with doing this in Mathematica and propose converting the spherical harmonics terms into associated Legendre polynomials before multiplying by the third term in the expression. They also ask if it would be easier to do this in a different language or software, aside from Mathematica. They mention the term "quadrature" as a numerical integration technique.
  • #1
vanmil
3
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
  • #2
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:

FAQ: Integration of a product of legendre polynomials in matlab

What is a legendre polynomial?

A legendre polynomial is a type of mathematical function often used in physics and engineering to describe the properties of physical systems. They are named after the French mathematician Adrien-Marie Legendre who first studied them in the 18th century.

How is integration of a product of legendre polynomials useful?

Integration of a product of legendre polynomials is useful in solving a variety of problems in physics and engineering, such as calculating the potential energy of a system or finding the probability of a particle's position in quantum mechanics. It is also commonly used in numerical methods for solving differential equations.

What is the process for integrating a product of legendre polynomials in Matlab?

The process for integrating a product of legendre polynomials in Matlab involves using the built-in function "legendre" to generate the desired legendre polynomials, multiplying them together, and then using the "int" function to integrate the resulting product. The integration limits can also be specified as parameters in the "int" function.

Are there any limitations or challenges when integrating a product of legendre polynomials in Matlab?

One limitation is that Matlab is limited to handling only real-valued inputs, so complex-valued legendre polynomials cannot be used. Additionally, the accuracy of the integration may be limited by the precision of the legendre polynomials used and the numerical methods implemented in Matlab.

Can integration of a product of legendre polynomials be applied to any type of system or problem?

Integration of a product of legendre polynomials can be applied to a wide range of systems and problems, including those in physics, engineering, and mathematics. However, the specific application and accuracy of the integration will depend on the properties and limitations of the legendre polynomials used.

Similar threads

Replies
2
Views
2K
Replies
1
Views
1K
Replies
5
Views
2K
Replies
2
Views
1K
Replies
3
Views
6K
Replies
1
Views
2K
Back
Top