Mathc complexes/a112
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
double f(
double x)
 return(sin(x)*sin(x));
char feq[] = "sin(x)*sin(x)";
double g(
double x)
 return(cos(x)*cos(x));
char geq[] = "cos(x)*cos(x)";
/* ------------------------------------ */
void fun(void)
double **A = rcsymmetric_mRZ(i_mZ(RCA,RCA),99.);
double **sin_A = i_mZ(RCA,RCA);
double **cos_A = i_mZ(RCA,RCA);
double **Ide = i_mZ(RCA,RCA);
double **EigsVector = i_mZ(RCA,RCA);
double **T_EigsVector = i_mZ(RCA,RCA);
double **EigsValue = i_mZ(RCA,RCA);
double **sin_EigsValue = i_mZ(RCA,RCA);
double **cos_EigsValue = i_mZ(RCA,RCA);
double **T1 = i_mZ(RCA,RCA);
 clrscrn();
 printf(" A :");
 p_mRZ(A, S10,P0, C6); 
 stop();
 clrscrn();
 eigs_V_uv_mZ(A,EigsVector,FACTOR_E);
 transpose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
 mul_mZ(T_EigsVector,A,T1);
 mul_mZ(T1,EigsVector,EigsValue); 
 f_eigs_uv_mZ(f,EigsValue,sin_EigsValue);
 f_eigs_uv_mZ(g,EigsValue,cos_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,sin_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,sin_A);
 printf(" sin(A)**2");
 p_mRZ(sin_A,S10,P4,C6); 
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,cos_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,cos_A); 
 printf(" cos(A)**2");
 p_mRZ(cos_A,S10,P4,C6); 
 add_mZ(sin_A,cos_A,Ide);
 printf(" Ide : cos(A)**2 + sin(A)**2");
 p_mRZ(Ide,S10,P4,C6); 
 f_mZ(A);
 f_mZ(sin_A);
 f_mZ(cos_A);
 f_mZ(Ide);
 f_mZ(EigsVector);
 f_mZ(T_EigsVector);
 f_mZ(EigsValue);
 f_mZ(cos_EigsValue); 
 f_mZ(sin_EigsValue); 
 f_mZ(T1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 cos(A)**2 + sin(A)**2 = 1
 Exemple de sortie écran :
 A :
 +10334 +5253 +10270 +7494 
 +5253 +12111 -2950 -935 
 +10270 -2950 +18259 +8918 
 +7494 -935 +8918 +15061 
 Press return to continue. 
 ------------------------------------
 sin(A)**2
 +0.5841 +0.0940 -0.2353 -0.1128 
 +0.0940 +0.9070 -0.0616 -0.0130 
 -0.2353 -0.0616 +0.3428 -0.0464 
 -0.1128 -0.0130 -0.0464 +0.2938 
 cos(A)**2
 +0.4159 -0.0940 +0.2353 +0.1128 
 -0.0940 +0.0930 +0.0616 +0.0130 
 +0.2353 +0.0616 +0.6572 +0.0464 
 +0.1128 +0.0130 +0.0464 +0.7062 
 Ide : cos(A)**2 + sin(A)**2
 +1.0000 +0.0000 +0.0000 -0.0000 
 +0.0000 +1.0000 -0.0000 -0.0000 
 +0.0000 -0.0000 +1.0000 -0.0000 
 -0.0000 -0.0000 -0.0000 +1.0000 
 Press return to continue
 Press X to stop

Mathc complexes/a113
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_mRZ(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_mRZ(A, S10,P0, C6); 
 eigs_V_uv_mZ(A,EigsVector,FACTOR_E);
 transpose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
 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_mRZ(cos2_A,S10,P4,C6); 
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,coscosmns1_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,coscosmns1_A); 
 printf(" 2*cos(A)**2-1");
 p_mRZ(coscosmns1_A,S10,P4,C6); 
 f_mZ(A);
 f_mZ(cos2_A);
 f_mZ(coscosmns1_A);
 f_mZ(EigsVector);
 f_mZ(T_EigsVector);
 f_mZ(EigsValue);
 f_mZ(coscosmns1_EigsValue); 
 f_mZ(cos2A_EigsValue); 
 f_mZ(T1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 cos(2*A) = 2*cos(A)**2-1
 Exemple de sortie écran :
 A :
 +9692 +11174 +730 -3472 
 +11174 +17044 +4688 -5862 
 +730 +4688 +18830 -9521 
 -3472 -5862 -9521 +6222 
 cos(2*A)
 +0.3337 -0.1474 +0.5458 -0.0180 
 -0.1474 +0.3672 +0.5044 -0.2417 
 +0.5458 +0.5044 +0.0808 +0.2834 
 -0.0180 -0.2417 +0.2834 +0.8453 
 2*cos(A)**2-1
 +0.3337 -0.1474 +0.5458 -0.0180 
 -0.1474 +0.3672 +0.5044 -0.2417 
 +0.5458 +0.5044 +0.0808 +0.2834 
 -0.0180 -0.2417 +0.2834 +0.8453 
 Press return to continue
 Press X to stop

Mathc complexes/a114
Application
Installer et compiler ces fichiers dans votre répertoire de travail.
/* ------------------------------------ */
/* Save as : c00a.c */
/* ------------------------------------ */
double f(
double x)
 return(sin(2*x));
char feq[] = "sin(2*x)";
double g(
double x)
 return(2*sin(x)*cos(x));
char geq[] = "2*sin(x)*cos(x)";
/* ------------------------------------ */
void fun(void)
double **A = rcsymmetric_mRZ(i_mZ(RCA,RCA),99.);
double **sin2_A = i_mZ(RCA,RCA);
double **sincos_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 **sin2_EigsValue = i_mZ(RCA,RCA);
double **sincos_EigsValue = i_mZ(RCA,RCA);
double **T1 = i_mZ(RCA,RCA);
 clrscrn();
 printf(" A :");
 p_mRZ(A, S10,P0, C6); 
 eigs_V_uv_mZ(A,EigsVector,FACTOR_E);
 transpose_mZ(EigsVector,T_EigsVector);
/* EigsValue : T_EigsVector * A * EigsVector */
 mul_mZ(T_EigsVector,A,T1);
 mul_mZ(T1,EigsVector,EigsValue); 
 f_eigs_uv_mZ(f,EigsValue,sin2_EigsValue);
 f_eigs_uv_mZ(g,EigsValue,sincos_EigsValue);
//A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,sin2_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,sin2_A); 
 printf(" sin(2*A)");
 p_mRZ(sin2_A,S10,P4,C6); 
 //A == EigsVector * EigsValue * T_EigsVector 
 mul_mZ(EigsVector,sincos_EigsValue,T1);
 mul_mZ(T1,T_EigsVector,sincos_A);
 printf(" 2*sin(A)*cos(A)");
 p_mRZ(sincos_A,S10,P4,C6); 
 f_mZ(A);
 f_mZ(sin2_A);
 f_mZ(sincos_A);
 f_mZ(EigsVector);
 f_mZ(T_EigsVector);
 f_mZ(EigsValue);
 f_mZ(sincos_EigsValue); 
 f_mZ(sin2_EigsValue); 
 f_mZ(T1);
/* ------------------------------------ */
int main(void)
time_t t;
 srand(time(&t));
do
 fun();
} while(stop_w());
 return 0;
/* ------------------------------------ */
 sin(2*A) == 2*sin(A)*cos(A)
 Exemple de sortie écran :
 A :
 +20171 +14441 -5553 -10633 
 +14441 +18292 -7873 -7123 
 -5553 -7873 +21016 +6657 
 -10633 -7123 +6657 +30931 
 sin(2*A)
 -0.0226 -0.0103 -0.1961 -0.2498 
 -0.0103 +0.1161 +0.1926 +0.0158 
 -0.1961 +0.1926 +0.0035 +0.2703 
 -0.2498 +0.0158 +0.2703 +0.0124 
 2*sin(A)*cos(A)
 -0.0226 -0.0103 -0.1961 -0.2498 
 -0.0103 +0.1161 +0.1926 +0.0158 
 -0.1961 +0.1926 +0.0035 +0.2703 
 -0.2498 +0.0158 +0.2703 +0.0124 
 Press return to continue
 Press X to stop