Mathc initiation/a399

Un livre de Wikilivres.


Sommaire


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

c00b.c
/* --------------------------------- */
/* save as c00b.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fb.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 -> x**2 * cos(y) * sin(z)

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

 t : z     -> PI/4  
 s : z     -> 0

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

 With the simpson's rule.

        (+PI/3  (PI/4    (1    
 A = int(   int(    int(      x**2 * cos(y) * sin(z)  dx dy dz = -0.000000
        (-PI/3     (0      (0

 Press return to continue.