Aller au contenu

Mathc initiation/001Z

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_dydx(f, ay,by,LOOP, ax,bx,LOOP);
 
 clrscrn();
 
 printf("An odd function with respect to x\n\n");
  
 printf(" f  : (x,y)-> %s  \n\n",  feq);
 
 printf(" by :   (x)-> %s    \n", byeq); 
 printf(" ay :   (x)-> %s  \n\n", ayeq);
 
 printf(" bx :         %s    \n", bxeq);
 printf(" ax :         %s\n\n\n", axeq);

 printf(" With the simpson's rule.\n\n");
 printf("    (%+.3f  (%s\n",      bx,byeq);
 printf(" int(    int(       %s  dy dx = %.6f\n", feq, M);
 printf("    (%+.3f  (%s\n\n\n",  ax,ayeq);

 stop();

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

Verifier avec mathematica : Free: wolframalpha.com

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

Exemple de sortie écran :

An odd function with respect to x

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

 by :   (x)-> +5    
 ay :   (x)-> -1  

 bx :         +1    
 ax :         -1


 With the simpson's rule.

    (+1.000  (+5
 int(    int(       sin(x) + tan(x)* y**2 + x * cos(y)  dy dx = -0.000000
    (-1.000  (-1


 Press return to continue.