Mathc complexes/a96
trace_mR(); ... ... det_Z();
Installer et compiler ce fichier dans votre répertoire de travail.
/* Save as : c00a.c */
void fun(void)
double **A = rcsymmetric_mZ(i_mZ(RA,RA),99);
double **V = i_mZ(RA,RA);
double **cV_T = i_mZ(RA,RA);
double **cV_TA = i_mZ(RA,RA);
double **EigsValue = i_mZ(RA,RA);
 clrscrn();
 printf(" A :");
 p_mZ(A, S8,P0, S6,P0, C3); 
/* V and cV_T*/ 
 eigs_V_uv_mZ(A,V,FACTOR_E);
 ctranspose_mZ(V,cV_T);
/* EigsValue = cV_T * A * V */ 
 mul_mZ(cV_T,A,cV_TA);
 mul_mZ(cV_TA,V,EigsValue); 
 printf(" EigsValue = cV_T * A * V");
 p_mZ(EigsValue, S10,P2, S6,P2, C3); 
 printf("\n trace_Z(A) \t\t= ");
 p_Z(trace_Z(A), S5,P2, S4,P2);
 printf("\n trace_Z(EigsValue) \t= ");
 p_Z(trace_Z(EigsValue), S5,P2, S4,P2);
 printf("\n");
 f_mZ(A);
 f_mZ(V);
 f_mZ(cV_T);
 f_mZ(cV_TA);
 f_mZ(EigsValue); 
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
Exemple de sortie écran :
 A :
 +23068 +0i -6722 +9046i +1130 -2668i 
 -6722 -9046i +20275 +0i +4460-10331i 
 +1130 +2668i +4460+10331i +19559 +0i 
 EigsValue = cV_T * A * V
 +36171.28 +0.00i +0.00 +0.00i -0.00 -0.00i 
 +0.00 -0.00i +22962.20 +0.00i -0.00 -0.00i 
 -0.00 +0.00i -0.00 +0.00i +3768.52 +0.00i 
 trace_Z(A) = +62902.00+0.00i 
 trace_Z(EigsValue) = +62902.00+0.00i 
 Press return to continue
 Press X to stop

Mathc complexes/a97
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00b.c */
/* ------------------------------------ */
double f(
double x)
 return(cos(2*x));
char feq[] = "cos(2*x)";
double g(
double x)
 return(2*cos(x)*cos(x)-1);
char geq[] = "2*cos(x)**2-1";
/* ------------------------------------ */
void fun(void)
double **A = rcsymmetric_mZ(i_mZ(RCA,RCA),99);
double **cos2_A = i_mZ(RCA,RCA);
double **coscosmns1_A = i_mZ(RCA,RCA);
double **EigsVector = i_mZ(RCA,RCA);
double **T_EigsVector = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
double **cos2A_EigsValue = i_mZ(RCA,RCA);
double **coscosmns1_EigsValue = i_mZ(RCA,RCA);
double **T1 = i_mZ(RCA,RCA);
 clrscrn();
 printf(" A :");
 p_mZ(A, S7,P0, S7,P0, C6);
 stop();
 clrscrn();
 eigs_V_uv_mZ(A,EigsVector,FACTOR_E);
 ctranspose_mZ(EigsVector,T_EigsVector);
/* EigsValue = cV_T * A * V */ 
 mul_mZ(T_EigsVector,A,T1);
 mul_mZ(T1,EigsVector,EigsValue); 
 f_eigs_uv_mZ(f,EigsValue,cos2A_EigsValue);
 f_eigs_uv_mZ(g,EigsValue,coscosmns1_EigsValue);
/*A == EigsVector * EigsValue * T_EigsVector */
 mul_mZ(EigsVector,cos2A_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,cos2_A); 
 printf(" cos(2*A)");
 p_mZ(cos2_A, S7,P3, S7,P3, C6);
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,coscosmns1_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,coscosmns1_A); 
 printf(" 2*cos(A)*cos(A)-1");
 p_mZ(coscosmns1_A, S7,P3, S7,P3, C6); 
 f_mZ(A);
 f_mZ(EigsVector);
 f_mZ(T_EigsVector);
 f_mZ(T1);
 f_mZ(EigsValue);
 f_mZ(cos2A_EigsValue);
 f_mZ(coscosmns1_EigsValue);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
Avec les matrices réelles nous avons calculer les vecteurs et valeurs propres des matrices symétriques. Avec les matrices complexes nous allons calculer les vecteurs et valeurs propres des matrices symétriques conjuguées.
Contrôle du facteur : 
Nous allons étudier une des propriétés des valeurs propres et des vecteurs propres :
 cos(2*A) = 2*cos(A)**2-1
 Exemple de sortie écran :
 A :
 +24470 +0i -788 -589i -20527 -6466i +4416 +18457i -9124 +4518i 
 -788 +589i +50751 +0i +16068 +10470i +1142 +3657i -24700 -14291i 
 -20527 +6466i +16068 -10470i +39657 +0i -16566 -28257i +3190 -12531i 
 +4416 -18457i +1142 -3657i -16566 +28257i +47113 +0i +3325 +21779i 
 -9124 -4518i -24700 +14291i +3190 +12531i +3325 -21779i +37792 +0i 
 Press return to continue. 
 ------------------------------------
 cos(2*A)
 +0.561 +0.000i +0.210 -0.270i -0.227 -0.079i -0.101 -0.322i +0.187 +0.010i 
 +0.210 +0.270i -0.487 +0.000i +0.203 -0.003i -0.316 +0.144i +0.419 +0.194i 
 -0.227 +0.079i +0.203 +0.003i -0.442 -0.000i -0.231 -0.045i +0.368 -0.269i 
 -0.101 +0.322i -0.316 -0.144i -0.231 +0.045i +0.381 +0.000i +0.136 -0.320i 
 +0.187 -0.010i +0.419 -0.194i +0.368 +0.269i +0.136 +0.320i +0.405 +0.000i 
 2*cos(A)*cos(A)-1
 +0.561 -0.000i +0.210 -0.270i -0.227 -0.079i -0.101 -0.322i +0.187 +0.010i 
 +0.210 +0.270i -0.487 +0.000i +0.203 -0.003i -0.316 +0.144i +0.419 +0.194i 
 -0.227 +0.079i +0.203 +0.003i -0.442 -0.000i -0.231 -0.045i +0.368 -0.269i 
 -0.101 +0.322i -0.316 -0.144i -0.231 +0.045i +0.381 -0.000i +0.136 -0.320i 
 +0.187 -0.010i +0.419 -0.194i +0.368 +0.269i +0.136 +0.320i +0.405 +0.000i 
 Press return to continue
 Press X to stop