Re: Integrating SphericalHarmonicY
- To: mathgroup at smc.vnet.net
- Subject: [mg73249] Re: Integrating SphericalHarmonicY
- From: wgempel at yahoo.com
- Date: Fri, 9 Feb 2007 02:11:41 -0500 (EST)
- References: <eq9c4v$n37$1@smc.vnet.net><eqc852$65$1@smc.vnet.net>
On Feb 7, 4:03 am, "Roman" <rschm... at gmail.com> wrote: > What you say is only (?) true if l is an integer >= 0 and m is an > integer -l <= m <= l, or if l is a half-integer >=0 and m is a half- > integer -l <= m <= l. But in general, the integral you give does not > converge. As the manual for Integrate says, > > > For indefinite integrals, Integrate tries to find results that are correct for almost all values of parameters. > > And since what you say is wrong for almost all values of l and m, it > tells you so. That is why I tried to put those conditions in $Assumptions. > > I have tried > > $Assumptions = > > {Element[Alternatives[theta,phi], Reals] && > > Element[Alternatives[l,m], Integers] && > > l >= Abs[m]} $Assumptions seems to work in other cases involving Integrate and Simplify: In: Sqrt[x^2]//Simplify => Sqrt[x^2] In: $Assumptions = {x > 0} In: Sqrt[x^2]//Simplify => x How do tell mathematica that I want to know the result of an indefinite integral for parameters of a specified form? > > If you tell us what the circumstances are, in which you need this > simplification, maybe we can help you more. > Sure, I had to calculate some expectation values for non-relativistic hydrogen wavefunctions for a homework assignment. That was fine and I have already submitted that work. When I entered the formulas for the wavefunctions, I wanted to check that they were normalized for general n,l,m (just to double check that I had the right normalization constants). I was unable to figure out how to do this for the general case using mathematica. Instead I ended just trying several test case (e.g. n = 18, l = 11, m = -4) until I felt confident the normalization was correct. There are other portions of the integral that fail to simplify, but I was struck by my inability to coax mathematica into simplifying this basic integral. Mainly, I am just trying to learn Mathematica. I came across this simplification that I think of as a basic pattern, and I was unable to figure out the right way to represent it in the system. It seems to me that Mathematica should be able to recognize simple integrals of orthogonal polynomials (if the parameters are correctly constrained), so I assume that I am missing some technique. Since projecting functions onto orthogonal polynomials is quite common (in physics), I want to know the correct way to work with these functions in Mathematica. Will > > Roman. >