Sommaire


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

c01c.c
/* --------------------------------- */
/* save as c01c.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fc.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w = i_ctrl_splot(0.5,2.5,0,8, 0,0, 0,0, 0,0);
pt2d       d =       i_pt2d(.05,0.25);

double step =   .01;

 clrscrn();
 printf(" Verify that f(x) >= 0 on [%.3f,%.3f].\n\n", ax, bx);
 printf(" f : x-> %s\n\n", veq);

     G_f_ab(w,
            ax,bx,
            veq,v);
 stop();

 clrscrn();
 printf(" Draw a typical vertical rectangle.\n\n");
 printf(" The length of the rectangle is :   %s       \n", veq);
 printf(" The width  of the rectangle is :    dx      \n"     );
 printf(" The Area   of the rectangle is :   (%s) * dx\n", veq);
 printf(" \n\n\n\n\n");
                        
       G_f(w,
           ax,bx,
           d,
           step,
           v);
 stop();

 clrscrn();
 printf(" If we apply \n\n\n");
 printf("    (%.3f\n", bx);
 printf(" int(      \n");
 printf("    (%.3f\n\n\n", ax);

 printf(" to  : (%s) * dx\n\n\n", veq);
 printf(" We obtain a limit of sums of areas of vertical rectangles.\n\n\n");

 printf("    (%.3f\n", bx);
 printf(" int(      (%s) * dx = %.6f\n", veq, simpson(v, ax,bx,LOOP));
 printf("    (%.3f\n\n\n", ax);

 stop();

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


Exemple de sortie écran :

 If we apply 


    (2.000
 int(      
    (1.000


 to  : (exp(x)) * dx


 We obtain a limit of sums of areas of vertical rectangles.


    (2.000
 int(      (exp(x)) * dx = 4.670774
    (1.000
 Press return to continue.