On Wed, 14 Apr 2010, Lin Xie wrote:
< Hi,?? I'm new to Maxima and would like to calculate a full integration of%e^(-(x1^2+x2^2+x3^2+x4^2+x5^2+x6^2+x7^2+x8^2-2*r*(x1*x2+x3*x4+x5*x6+x7*x8)-2*s*(x1*x3+x2*x4+x1*x5+x2*x6+x4*x8+x3*x7+x5*x7+x6*x8)-2*t*(x1*x4+x2*x3+x1*x6+x2*x5+x1*x7+x3*x5
< +x2*x8+x4*x6+x5*x8+x6*x7+x8*x3+x4*x7))/L). Here the parameters L, r, s and t satisfy L>0, r^2+s^2+t^2+2*r*s*t<1, r^2+s^2<1, r^2+t^2<1 and s^2+t^2<1. The first two
< steps of the integration are just fine. However, I came across a problem during carrying out the third integration step. It asks me if t^2+s^2-1 is positive or
< negative! I couldn't figure out why it ask this stupid question. Since
< ?I know that the t^2+s^2-1 is negative, I just answer the question. But it asks me another question about the positive or negative, because the x1,x2,...,x8 are
< all variables and I could not define its sign. This question almost
< drives me mad.
<
< Here's the execution results:
< (%i1)?assume(L>0,r^2<1,s^2<1,t^2<1,r^2+s^2+t^2+2*r*s*t<1,t^2+s^2<1,r^2+s^2<1,r^2+t^2<1);
< integrate(%e^(-(x1^2+x2^2+x3^2+x4^2+x5^2+x6^2+x7^2+x8^2-2*r*(x1*x2+x3*x4+x5*x6+x7*x8)-2*s*(x1*x3+x2*x4+x1*x5+x2*x6+x4*x8+x3*x7+x5*x7+x6*x8)-2*t*(x1*x4+x2*x3+x1*x6+x2*x5+x
< 1*x7+x3*x5+x2*x8+x4*x6+x5*x8+x6*x7+x8*x3+x4*x7))/L),x8,minf,inf);
< (%o1)?[L>0,r^2<1,s^2<1,t^2<1,-t^2-2*r*s*t-s^2-r^2+1>0,-t^2-s^2+1>0]
< (%o2) blablabla...
<
< (%i3)?integrate(%o2,x1,minf,inf);
< (%o3) blablabla...
<
< (%i4) integrate(%o3,x3,minf,inf);
< Is t^2+s^2-1 positive,negative, or zero? negative;
< Is s(t(2x7+4x6+4x4)+2x7+2rx2)+... positive, negative, or zero? <= Here's the problem!
<
< Can anyone give me a help or some suggestions? Thanks!
This is an interesting problem for Maxima. But for you, why compute the integral
when it is such a simple form. As statisticians know well
int exp(-x'Ax/2) dx over R^n
can be expressed in terms of the determinant of A, provided A is
positive definite. You can see this by orthogonally diagonalizing
A and computing the product of 1-dimensional integrals.
Incidentally, those questions that Maxima is asking you amount to
the question of whether A is positive definite.
Leo
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.