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, you can use the product\n"
        " of three simple integrals, instead of a triple integral"
        " ... See c00c2.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("        (%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);

 printf(" Code Mathematica:\n\n"
        " integral sin(z) dx dy dz"
        " from 0 to pi/3 from 0 to 3 from 0 to 2\n\n");
 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 c00c2.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

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

 Code Mathematica:

 integral sin(z) dx dy dz from 0 to pi/3 from 0 to 3 from 0 to 2

 Press return to continue.