Aller au contenu

Mathc initiation/002h

Un livre de Wikilivres.


Application

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

c00d.c
/* --------------------------------- */
/* save as c00d.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fd.h"
/* --------------------------------- */
int main(void)
{
double  M =  simpson_dzdydx(f,
                            uz, vz, LOOP,
                            sy, ty, LOOP,
                            ax, bx, LOOP);
 
 clrscrn();
 printf(" f : x,y,z -> %s\n\n", feq);

 printf(" v : x,y   -> %s  \n", veq); 
 printf(" u : x,y   -> %s\n\n", ueq);

 printf(" t : x     -> %s  \n", teq); 
 printf(" s : x     -> %s\n\n", seq);

 printf("An odd function with respect to z\n\n");
 
 printf("        (%+.1f (%s  (%s               \n", bx, teq, veq);
 printf(" A = int(  int( int( %s  dzdydx = %.2f\n",feq, M);
 printf("        (%+.1f (%s  (%s           \n\n\n", ax, seq, ueq);
 
 printf(" Code Mathematica:\n\n"
        " integral (x**2 y z + y**2 sin(z)) dz dy dx"
        " from (-2) to (+5) from (+2) to (+5) from (-1) to (1)\n\n");
 
 stop();

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

Verifier avec mathematica : Free: wolframalpha.com

  integral (x**2 y z + y**2 sin(z)) dz dy dx from (-2) to (+5) from (+2) to (+5) from (-1) to (1)

Exemple de sortie écran :

 f : x,y,z -> x**2 y z + y**2 sin(z)

 v : x,y   -> +1  
 u : x,y   -> -1

 t : x     -> +5  
 s : x     -> +2

An odd function with respect to z

        (+5.0 (+5  (+1               
 A = int(  int( int( x**2 y z + y**2 sin(z)  dzdydx = -0.00
        (-2.0 (+2  (-1           


 Code Mathematica:

 integral (x**2 y z + y**2 sin(z)) dz dy dx from (-2) to (+5) from (+2) to (+5) from (-1) to (1)

 Press return to continue.