Aller au contenu

Mathc initiation/a438

Un livre de Wikilivres.


Sommaire

Installer et compiler ces fichiers dans votre répertoire de travail.

c0a4.c
/* --------------------------------- */
/* save as c0a4.c                    */
/* --------------------------------- */
#include   "x_afile.h"
#include        "fa.h"
/* --------------------------------- */
int main(void)
{
double  Mxy =  simpson_dzdydx( zR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double  Mzx =  simpson_dzdydx( yR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
double  Mzy =  simpson_dzdydx( xR, z0,z1,LOOP, y0,y1,LOOP, x0,x1,LOOP);
 
 clrscrn();
 printf(" The function of density is :\n\n"
        " R : x,y,z -> %s\n\n", Req);

 printf(" f  : x,y,z -> %s\n\n",  feq);
 
 printf(" z1 : x,y   -> %s  \n", z1eq);
 printf(" z0 : x,y   -> %s\n\n", z0eq);
  
 printf(" y1 : x     -> %s  \n", y1eq);
 printf(" y0 : x     -> %s\n\n", y0eq);

 printf(" x1 :       -> %s  \n", x1eq); 
 printf(" x0 :       -> %s\n\n", x0eq);
 stop();

 clrscrn();
 printf(" The moments are :\n\n\n");
 printf("          (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Mxy = int(   int(    int(      %s  dz dy dx = %.2f\n",zReq,Mxy);
 printf("          (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);

 printf("          (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Mzx = int(   int(    int(      %s  dz dy dx = %.2f\n",yReq,Mzx);
 printf("          (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);

 printf("          (%+.1f  (%s     (%s    \n",   x1, y1eq, z1eq);
 printf(" Mzy = int(   int(    int(      %s  dz dy dx = %.2f\n",xReq,Mzy);
 printf("          (%+.1f  (%s     (%s\n\n\n", x0, y0eq, z0eq);
 stop();

 clrscrn();
 printf(" Code Mathematica : Mxy  \n\n"
        " integral (x * y**2 * z) * (z)dz dy dx from 0 to"
        " (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3\n\n\n");
        
 printf(" Code Mathematica : Mzx \n\n"
        " integral (x * y**2 * z) * (y) dz dy dx from 0 to"
        " (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3\n\n\n");
        
 printf(" Code Mathematica : Mzy\n\n"
        " integral (x * y**2 * z) * (x) dz dy dx from 0 to"
        " (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3\n\n\n");                

  stop();
          
 return 0;
}
/* --------------------------------- */
/* --------------------------------- */


Exemple de sortie écran :

 The function of density is :

 R : x,y,z -> (x*y**2*z)

 f  : x,y,z -> 1

 z1 : x,y   -> (+cos(x)*sin(y) + 4)  
 z0 : x,y   -> 0

 y1 : x     -> +3  
 y0 : x     -> -0

 x1 :       -> +3  
 x0 :       -> -0

 Press return to continue. 


 The moments are :


          (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Mxy = int(   int(    int(      (z)*(x*y*y*z)  dz dy dx = 753.45
          (-0.0  (-0     (0


          (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Mzx = int(   int(    int(      (y)*(x*y*y*z)  dz dy dx = 663.19
          (-0.0  (-0     (0


          (+3.0  (+3     ((+cos(x)*sin(y) + 4)    
 Mzy = int(   int(    int(      (x)*(x*y*y*z)  dz dy dx = 543.69
          (-0.0  (-0     (0


 Press return to continue. 


 Code Mathematica : Mxy  

 integral (x * y**2 * z) * (z)dz dy dx from 0 to (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3


 Code Mathematica : Mzx 

 integral (x * y**2 * z) * (y) dz dy dx from 0 to (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3


 Code Mathematica : Mzy

 integral (x * y**2 * z) * (x) dz dy dx from 0 to (+cos(x)*sin(y) + 4) from 0  to 3 from  0  to 3


 Press return to continue.