Sommaire


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

c01b.c
/* --------------------------------- */
/* save as c01b.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fb.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w = i_ctrl_splot(-.5,3.5,-.5,1.5, 0,0, 0,0, 0,0);
pt2d       d =       i_pt2d(.05,0.025);
     
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.742
 int(      
    (0.400


 to  : (sin(x)) * dx


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


    (2.742
 int(      (sin(x)) * dx = 1.842122
    (0.400
 Press return to continue.