Re: Integrating a complicated expression involving Sign[...] etc.
- To: mathgroup at smc.vnet.net
- Subject: [mg56480] Re: Integrating a complicated expression involving Sign[...] etc.
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Tue, 26 Apr 2005 21:52:34 -0400 (EDT)
- Organization: The University of Western Australia
- References: <d3t38d$8jd$1@smc.vnet.net> <paul-9CCE12.23224921042005@news.uwa.edu.au> <d4allu$j4h$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
In article <d4allu$j4h$1 at smc.vnet.net>, Christian Mikkelsen <s010132 at student.dtu.dk> wrote: > (This comment is rather long and there is no question to answer, however, > Paul Abbott deserves a reply.) Some more comments follow: > > > (* A, B, C are to substituted by sines and cosines to make up polar > > > coordinates *) > > > StorMatrix = {{B^2+C^2, A B, A C}, > > > {B A, A^2+C^2, B C}, > > > {C A, C B, A^2+B^2}}; > > > > Do you have areference for this matrix and the following computations? > > What is the application and derivation of the integral and matrix? Often > > it is better to go back to the mathematics to decide the best approach > > for a Mathematica implementation. > > Actually, this comes from subtracting a unit matrix from a "dyadic" formed > from a unit vector K (as opposed to k; K = k/|k|): > > (K K - 1) > > The A, B, and C are then really x, y, and z; or as I will substitute > later: Sin[Phi] Sin[Theta], Cos[Phi] Sin[Theta], and Cos[Theta]. So spherical polar coordinates -- there may be another way to what you want then (for example, using rotational invariance, if it applies, and picking a particular direction, usually the z-axis). > > Importantly, if the symbolic result ends up being too complicated, it is > > unlikely to be that useful -- especially if the final goal is numerical > > computation of a range of integrals. > > Well, the ultimate goal would be to get a result in closed form. :-) It may indeed be possible. > > > (* Mathematica refuses to do the definite integral but happily does the > > > indefinite one *) > > > KIntegral = Integrate[Integrant, k, > > > Assumptions -> {A \[Element] Reals, B \[Element] Reals, > > > C \[Element] Reals, a > 0, > > > x \[Element] Reals, y \[Element] Reals, > > > z \[Element] Reals}]; > > > > A better approach is to identify exactly what you are trying to compute. > > For example, consider the following integral: > > > > Integrate[j[n, t] Exp[I w t], {t, -Infinity, Infinity}] > > > > where j[n, t] is a spherical Bessel function (reversing the order of the > > arguments compared to your definition -- acutally, j[n][t] is a better > > notation). > > Why is that? Does it matter to Mathematica or is it just for us humans? It is better for Mathematica and for humans. For example, see section 5 of http://physics.uwa.edu.au/pub/IMS/2001/Abbott.nb > > This is, essentially, a much simpler version of your > > integral. However, even in this much simpler problem, Mathematica is not > > capable of computing this directly. However, it is just the Fourier > > transform of the spherical Bessel function, which is proportional to > > > > LegendreP[n, w] for -1 < w < 1. > > This is exactly how I get the spherical Bessel-function in the first > place. I suspected as much. > Basically, I am expanding in terms of Legendre-polynomials in real > space and Fourier-transforming to get to reciprocal space where my problem > is a lot simpler. But the Legendre polynomials are just polynomials. Are you sure that the problem is not simpler in configuration space? You can use techniques such as the generating function for Legendre-polynomials to assist you in computing the resulting integrals. > > The conclusion to draw from this though is that I expect that your > > general integral can be computed by suitable use of integral transforms. > > My hope was that I could get Mathematica to help me :-) Indeed it can, but you still need to guide it to the best approach. > Just to be clear, I did try to "think" before plugging things into > Mathematica and I tried my best with Gradshtyen & Ryzhik and Prudnikov et > al. but I took the Mathematica route just to see if it could do it and to > my amazement it actually gave me an answer. If it had just plainly > refused, I would have tried thinking some more... But how confident are you of the results that it has produced? And what sort of tests have you run to confirm that the results have the correct behaviour? > Anyway, I must tell you that I managed to do quite a lot about the > horrible intermediate result. (I already - almost - know that the > resulting matrix is diagonal and I have focused on just the [[1,1]] > entry.) I end up with a sum of eight terms each being Piecewise-defined > functions of the form: > > (a + A (1+x) + B (1+y) + C z)^2 (Pi + I Log[(a + A (1+x) + B (1+y) + C z)^2] > for (a + A (1+x) + B (1+y) + C z) > 0 > AND > (a + A (1+x) + B (1+y) + C z)^2 (-Pi + I Log[(a + A (1+x) + B (1+y) + C z)^2] > for (a + A (1+x) + B (1+y) + C z) < 0 > > with alternating signs of the A, B, and C terms. Now, I realize that I > could avoid the piecewise-defined function by using Sign, or as you > suggest UnitStep, but I am not very optimistic about the evaluation of the > integrals resulting from the substitution A -> Sin[Phi] Sin[Theta] etc. > However, all this work has not been in vain as Mathematica seems happier > evaluating this function numerically. Is the constraint (a + A (1+x) + B (1+y) + C z) > 0 physically reasonable? > > Paul Abbott Phone: +61 8 6488 2734 > > The University of Western Australia (CRICOS Provider No 00126G) > > Funnily, I am actually going to Western Australia in a month :-) We should meet up then. Will you be here until August? If so, you may be interested in attending (and perhaps presenting a paper at) The International Mathematica Symposium 2005 (see my .sig for the URL). Cheers, Paul -- Paul Abbott Phone: +61 8 6488 2734 School of Physics, M013 Fax: +61 8 6488 1014 The University of Western Australia (CRICOS Provider No 00126G) 35 Stirling Highway Crawley WA 6009 mailto:paul at physics.uwa.edu.au AUSTRALIA http://physics.uwa.edu.au/~paul