Aller au contenu

Mathc initiation/a467

Un livre de Wikilivres.


Sommaire

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

c00f0.c
/* --------------------------------- */
/* save as c00f0.c                   */
/* --------------------------------- */
#include  "x_afile.h"
#include      "ff1.h"
/* --------------------------------- */
int main(void)
{
double M =      simpson_dxdydz( g,
                                r0,r1,LOOP,
                                k0,k1,LOOP,
                                z0,z1,LOOP); 
 clrscrn();
 
 printf(" With the cylindrical coordinates. drdkdz\n\n");
 printf("     f : r,k,z -> %s  \n", feq); 
 printf("     g : r,k,z -> %s\n\n", geq);

 printf(" r1   k,z   -> %s  \n", r1eq);
 printf(" r0   k,z   -> %s\n\n", r0eq);

 printf(" k1   z     -> %s  \n", k1eq);
 printf(" k0   z     -> %s\n\n", k0eq);

 printf(" z1         -> %s  \n", z1eq); 
 printf(" z0         -> %s\n\n", z0eq);
                          
 printf("        (%s    (%s   (%s (dxdydz)\n",  z1eq,k1eq,r1eq);
 printf(" A = int(  int( int( g(r,k,z)     drdkdz = %.6f\n", M);
 printf("        (%s    (%s      (%s\n\n",      z0eq,k0eq,r0eq);

 stop();

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

Exemple de sortie écran :

 With the cylindrical coordinates. drdkdz

     f : r,k,z -> z  
     g : r,k,z -> (z)  (r)

 r1   k,z   -> sqrt(4-z)  
 r0   k,z   -> 0

 k1   z     -> 2*PI  
 k0   z     -> 0

 z1         -> 2  
 z0         -> 0

        (2    (2*PI   (sqrt(4-z) (dxdydz)
 A = int(  int( int( g(r,k,z)     drdkdz = 16.755161
        (0    (0      (0

 Press return to continue.