Aller au contenu

Mathc initiation/a401

Un livre de Wikilivres.


Sommaire


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

c00c.c
/* --------------------------------- */
/* save as c00c.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fc.h"
/* --------------------------------- */
int main(void)
{
double  M = simpson_dxdydz(f,
                            u, v, LOOP,
                            s, t, LOOP,
                            a, b, LOOP);
 
 clrscrn();
 
 printf(" If the variables are separable,\n"
        " you can use the product of three simple integrals,\n"
        " instead of a triple integral "
        "                         ... See c00a2.c\n\n");

 printf(" f : x,y,z -> %s\n\n", feq);

 printf(" v : y,z   -> %s  \n", veq);
 printf(" u : y,z   -> %s\n\n", ueq);
  
 printf(" t : z     -> %s  \n", teq);
 printf(" s : z     -> %s\n\n", seq);
 
 printf(" b :       -> %s  \n", beq); 
 printf(" a :       -> %s\n\n", aeq); 

 printf(" With the simpson's rule.\n\n");
 printf("        (%s   (%s    (%s    \n",   beq, teq, veq);
 printf(" A = int(     int(  int( %s  dx dy dz = %.6f\n",feq, M);
 printf("        (%s       (%s    (%s\n\n", aeq, seq, ueq);

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


Exemple de sortie écran :

 If the variables are separable,
 you can use the product of three simple integrals,
 instead of a triple integral                          ... See c00a2.c

 f : x,y,z -> sin(z)

 v : y,z   -> 2  
 u : y,z   -> 0

 t : z     -> 3  
 s : z     -> 0

 b :       -> +PI/3  
 a :       -> 0

 With the simpson's rule.

        (+PI/3   (3    (2    
 A = int(     int(  int( sin(z)  dx dy dz = 3.000000
        (0       (0    (0

 Press return to continue.