Mathc initiation/0021
Apparence
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_dxdy(f, ax,bx,LOOP, ay,by,LOOP);
clrscrn();
printf("An odd function with respect to y\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;
}
/* --------------------------------- */
/* --------------------------------- */
La fonction f est impaire par rapport à y. Les bornes de y doivent être comprises entre -a et a. Les bornes pour x peuvent être quelconques.
Verifier avec mathematica : Free: wolframalpha.com
integral (y*x**2 + 4 y**3*x ) dx dy from (-1) to (1) from (2) to (5)
Exemple de sortie écran :
An odd function with respect to y
f : (x,y)-> y x**2 + 4 y**3 x
bx : (y)-> +5
ax : (y)-> +2
by : +1
ay : -1
With the simpson's rule.
(+1.000 (+5
int( int( y x**2 + 4 y**3 x dx dy = 0.000000
(-1.000 (+2
Press return to continue.