Mathc initiation/a416

Un livre de Wikilivres.


Sommaire


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


c0a1.c
/* --------------------------------- */
/* save as c0a1.c                    */
/* --------------------------------- */
#include  "x_afile.h"
#include       "fa.h"
/* --------------------------------- */
int main(void)
{
double M = simpson_dydx(f_mns_g, ay,by,LOOP, ax,bx,LOOP);
 
 clrscrn();
 
 printf(" f  : (x,y)-> %s    \n",  feq);
 printf(" g  : (x,y)-> %s  \n\n",  geq);
  
 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("    (%s    (%s\n",     bxeq,byeq);
 printf(" int(   int( %s  dy dx = %.6f\n", f_mns_geq, M);
 printf("    (%s    (%s\n\n\n",  axeq,ayeq);

 stop();

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


Exemple de sortie écran :

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

 by :   (x)-> +3    
 ay :   (x)-> -3  

 bx :         +3    
 ax :         -3


 With the simpson's rule.

    (+3    (+3
 int(   int( (f(x,y) - g(x,y))  dy dx = 288.000000
    (-3    (-3


 Press return to continue.