Sommaire


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


c00e.c
/* --------------------------------- */
/* save as c00e.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fe.h"
/* --------------------------------- */
int main(void)
{
double M = simpson_dxdy(f, ax,bx,LOOP, ay,by,LOOP);
       
 clrscrn();
 
 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;
}
/* --------------------------------- */
/* --------------------------------- */


Vous pouvez vérifier le résultat avec Octave version 5.2 :

>> I = dblquad (@(x, y) sin(cos(x.*y)), 1, 0, .5, 0)

I = 0.41688


Exemple de sortie écran :

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

 bx :   (y)-> .5   
 ax :   (y)-> 0 

 by :         1    
 ay :         0


 With the simpson's rule.

    (1.000  (.5
 int(    int(       sin(cos(x*y))  dx dy = 0.416884
    (0.000  (0


 Press return to continue.