Aller au contenu

Mathc initiation/002j

Un livre de Wikilivres.

Application

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

c00a1.c
/* --------------------------------- */
/* save as c00a1.c                   */
/* --------------------------------- */
#include  "x_hfile.h"
#include      "fa1.h"
/* --------------------------------- */
int main(void)
{
double  M =  simpson_dxdzdy(f,
                            x0, x1, LOOP,
                            z0, z1, LOOP,
                            Y0, Y1, LOOP);
 
 clrscrn();
 printf(" f : x,y,z -> %s\n\n", feq);

 printf(" x1 : y,z   -> %s  \n", x1eq);
 printf(" x0 : y,z   -> %s\n\n", x0eq);
  
 printf(" z1 : y     -> %s  \n", z1eq);
 printf(" z0 : y     -> %s\n\n", z0eq);
 
 printf(" y1 :      -> %s  \n", y1eq);
 printf(" y0 :      -> %s\n\n", y0eq); 

 printf("        (%s  (%s      (%s    \n", y1eq, z1eq,  x1eq);
 printf(" A = int(   int(    int(      %s  dx dz dy = %.6f\n",feq, M);
 printf("        (%s  (%s      (%s\n\n\n", y0eq, z0eq,  x0eq);

 printf(" Code Mathematica : \n\n"
        " integral (8-4*y)   dx dz dy"
        "  from (3*z) to (3*z+2)   from 0 to 2  from 2 to 3\n\n");
 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */

Exemple de sortie écran :

 f : x,y,z -> (8-4y)

 x1 : y,z   -> 3z+2  
 x0 : y,z   -> 3z 

 z1 : y     -> 3  
 z0 : y     -> 2

 y1 :      -> 2  
 y0 :      -> 0

        (2  (3      (3z+2    
 A = int(   int(    int(      (8-4y)  dx dz dy = 16.000000
        (0  (2      (3z 


 Code Mathematica : 

 integral (8-4*y)   dx dz dy  from (3*z) to (3*z+2)   from 0 to 2  from 2 to 3

 Press return to continue.