Overview
STACK | INPUTS | OUTPUTS |
Level 2 | [ x1 , ........ , xn ] | / |
Level 1 | [ y1 , ........ , yn ] | A |
U(x1,x2,....,x7) and V(y1,y2,....,y7) are two 7D-vectors.
CROS7 calculates the cross product W(z1,z2,....,z7) by the formula given here
STACK | INPUTS | OUTPUTS |
Level 2 | [ x1 , ........ , xn ] | / |
Level 1 | [ y1 , ........ , yn ] | [ z1 , ........ , zn ] |
[ 6 2 4 7 10 13 12 ] ENTER
STACK | INPUTS | OUTPUTS |
Level 2 | [ x1 , ........ , xn ] | / |
Level 1 | [ y1 , ........ , yn ] | [Pi,j] |
-The point is determined by its coordinates: P( x1 ,
...... , xn )
-The line (L) is defined by 2 points A( a1 , ...... ,
an ) B( b1 , ...... , bn
)
STACK | INPUTS | OUTPUTS |
Level 3 |
[ x1 , ........
, xn ] |
/ |
Level 2 | [ a1 , ........ , an ] | / |
Level 1 | [ b1 , ........ , bn ] | D |
-The point is determined by its coordinates: P( x1 ,
...... , xn )
-The hyperplane (H) by one of its equations: a1.x1
+ ...... + an.xn + b = 0
STACK | INPUTS | OUTPUTS |
Level 2 | [ x1 , ........ , xn ] | / |
Level 1 | [ a1 , ........ , an , b ] | D |
STACK | INPUTS | OUTPUTS |
Level 4 |
[ a1 , ........
, an ] |
/ |
Level 3 |
[ b1 , ........
, bn ] |
/ |
Level 2 | [ c1 , ........ , cn ] | / |
Level 1 | [ d1 , ........ , dn ] | Dist |
STACK | INPUTS | OUTPUTS |
Level 2 | [ x1 , ........ , xn ] | [ y1 , ........ , yn ] |
Level 1 | [ a1 , ........ , an ] | D |
STACK | INPUTS | OUTPUTS |
Level 2 | [ a1 , ........ , an , b ] | [ c1 , ........ , cn , d ] |
Level 1 | [ a'1 , ........ , a'n , b' ] | [ c'1 , ........ , c'n , d' ] |
-The area A of an hypersurface defined by an equation of the form xN = f( x1 , ............. , xN-1 ) may be calculated by the (N-1) multiple integral:
A = § ...... § [ 1 + ( ¶f / ¶x1 )2 + ................. + ( ¶f / ¶xN-1 )2 ] 1/2 dx1 ............. dxN-1 ( § = Integral )
-Applying this formula to an hyperellipsoid x12
/ a12 + ............... + xN2
/ aN2 = 1 leads to
( after several changes of variables )
A = 2N a1 ........ aN-1 §0PI/2 ..... §0PI/2 CosN-2 µ1 CosN-3 µ2 .......... Cos µN-1 [ g( µ1 , ....... , µN-1 ) ] 1/2 dµ1 .......... dµN-1
where g( µ1 , .......
, µN-1 ) = 1 + (aN2/a12
- 1) Sin2 µ1 + (aN2/a22
- 1) Cos2 µ1 Sin2 µ2
+ ...... + (aN2/aN-12
- 1) Cos2 µ1 Cos2 µ2
.... Sin2 µN-1
-For N = 4 , we have to compute a triple integral which remains possible
in a "reasonnable" time
-For larger N-values, the execution time rapidly becomes prohibitive.
-Fortunately, in reference [1], a method is described to transform the
(N-1) multiple integral into a univariate integral.
-With minor modifications and a few simplifications, it yields:
A = (PI)(N-1)/2 [ a2 ........ aN / Gamma((N+1)/2) ] §01 f(u) du
with f(u)
= (1-u)(N-1)/2 u -1/2 [ 1 + SUMi=2,...,N
(a12/ai2/bi) ] (
b2 ..... bN ) -1/2
where bi =
1 - u + u (a12/ai2)
SAHE uses a Gauss-Chebyshev formula, namely:
§01 [ (1-x) / x ]1/2 g(x) dx = SUMi=1,2,...,n wi g(xi)
-Unlike many Gaussian formulae, the abscissas & weights may be easily calculated:
xi = Sin2 ([ (2i-1) / (2n+1) ] PI/2) & wi = [ 2.PI / (2n+1) ] Cos2 ([ (2i-1) / (2n+1) ] PI/2)
-So, we can choose n large enough to get an almost perfect accuracy.STACK | INPUTS | OUTPUTS |
Level 2 | n | / |
Level 1 | [ a1 , ........ , aN ] | Area |
STACK | INPUTS | OUTPUTS |
Level n | [ xn1 , ........ , xnn ] | / |
.......... |
................... |
/ |
Level 1 | [ x11 , ........ , x1n ] | [ a1 , ........ , an , b ] |
STACK | INPUTS | OUTPUTS |
Level n | [ xn+11 , ........ , xn+1n ] | / |
.......... |
................... |
/ |
Level 3 |
.................... |
[ a1 , ........ , an
, b ] |
Level 2 |
................... |
R |
Level 1 | [ x11 , ........ , x1n ] | [ a1 , ........ , an , b ] |
-Let a triangle ABC with 3 known sides a , b , c
-Heron's formula is Area = [ p(p-a)(p-b)(p-c) ]1/2 where p = (a+b+c)/2 = semiperimeterSTACK | INPUTS | OUTPUTS |
Level 3 |
a |
/ |
Level 2 | b | / |
Level 1 | c | Area |
2 ENTER
3 ENTER
4 HERON -> Area =
2.90473750966
STACK | INPUTS | OUTPUTS |
Level 4 |
a |
/ |
Level 3 |
b |
/ |
Level 2 | c | / |
Level 1 | d | Area |
-We use the following conventions:
-The edges d , e , f are respectively opposite to a ,
b , c ( non co-planar )
-The edges a , b , c intersect at the same vertex S
STACK | INPUTS | OUTPUTS |
Level 7 |
/ |
r4 |
Level 6 |
a |
r3 |
Level 5 |
b |
r2 |
Level 4 |
c |
r1 |
Level 3 |
d |
r |
Level 2 | e | R |
Level 1 | f | Volume |
STACK | INPUTS | OUTPUTS |
Level 3 |
a |
/ |
Level 2 | b | V |
Level 1 | c | { a b c d e f } |
-Given (QHS): a11 x12 + a22 x22 + .............. + ann xn2 + Sum i < j ai j xi xj + b1 x1 + b2 x2 + ............. + bn xn + c = 0
the elements ai j ( i < j ) are gradually zeroed by the Jacobi's iterative method.
The reduced equation is: (QHS): a'11 X12 + a'22 X22 + .............. + a'nn Xn2 + b'1 X1 + b'2 X2 + ............. + b'n Xn + c' = 0
where b'i = 0 if a'ii # 0 and c' = 0 or 1
STACK | INPUT | OUTPUT |
Level 1 | cartesian equation | reduced equation |
Example: (QHS): 3 x2 + 4 y2
+ 7 z2 + 6 t2 + 9 x.y + 3 x.z + 7 x.t + 4 y.z + 8
y.t + 2 z.t + 9 x + 2 y + 5 z + 4 t - 10 = 0 in a 4-dimensional space.
JCB uses a variant of the Jacobi's algorithm:
*** The eigenvalues of a matrix A are the diagonal-elements of an upper
triangular matrix T equal to the infinite product ...Uk-1.Uk-1-1....U2-1.U1-1.A.U1.U2....Uk-1.Uk....
where the Uk are unitary matrices. The eigenvectors
are the columns of U = U1.U2....Uk-1.Uk....
if A is Hermitian ( i-e if A equals its transconjugate )
Actually, T is diagonal if A is Hermitian.
-"JCB" finds the greatest element ai j below the main diagonal
-Then, U1 is determined so that it places
a zero in position ( i , j ) in U1-1.A.U1
U1 has the same elements as the Identity matrix, except that ui i = uj j = x and ui j = y + i.z , uj i = -y + i.z
with y + i.z = C.x , x = ( 1 + | C |2 ) -1/2 and C = 2.ai j / [ ai i - ai j + ( ( ai i - ai j )2 + 4 ai j aj i )1/2 ]
-The process is repeated until the greatest sub-diagonal element is smaller than eps
-The successive greatest | ai j | ( i > j ) are displayed when the routine is running.
STACK | INPUTS | OUTPUTS |
Level
2 |
/ |
V |
Level 1 | A | M |
1
2 4
A = 2 7 3 JCB
returns the 3-vector in level 2 [ -0.730676198691
4.91074121335 12.8199349853 ]
4 3 9
-So, the eigenvalues are:
k1 = -0.730676198691
k2 = 4.91074121335
k3 = 12.8199349853
and the 3 corresponding eigenvectors are the 3 columns of the matrix in level 1
V1 ( 0.930757325639 ; -0.104865823188 ; -0.350276975967 )References:
[1] Dunkl & Ramirez - "Computing Hyperelliptic Integrals for Surface Measure of Ellipsoids"