Aller au contenu

Mathc initiation/0023

Un livre de Wikilivres.


Sommaire

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

c00f.c
/* --------------------------------- */
/* save as c00f.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "ff.h"
/* --------------------------------- */
int main(void)
{
double M = simpson_dxdy(f, ax,bx,LOOP, ay,by,LOOP);
 
 clrscrn();

 printf("An odd function with respect to x\n\n");
  
 printf(" f  : (x,y)-> %s  \n\n", feq);
 printf(" bx :   (y)-> %s   \n", bxeq);
 printf(" ax :   (y)-> %s \n\n", axeq);

 printf(" by :         %s    \n", byeq);
 printf(" ay :         %s\n\n\n", ayeq);

 printf(" With the simpson's rule.\n\n");
 printf("    (%+.3f  (%s\n",      by,bxeq);
 printf(" int(    int(       %s  dx dy = %.6f\n", feq, M);
 printf("    (%+.3f  (%s\n\n\n",  ay,axeq);

 stop();

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

Remarque  : Il y a un nombre impaire de fonctions impaires. [x x tan(x)]

Verifier avec mathematica : Free: wolframalpha.com

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

Exemple de sortie écran :

An odd function with respect to x

 f  : (x,y)-> y x x tan(x)  

 bx :   (y)-> (+1)   
 ax :   (y)-> (-1) 

 by :         +5    
 ay :         +2


 With the simpson's rule.

    (+5.000  ((+1)
 int(    int(       y x x tan(x)  dx dy = -0.000000
    (+2.000  ((-1)


 Press return to continue.