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(-2.,2., -5.,1.5, 0,0, 0,0, 0,0);
pt2d       d =       i_pt2d(0.1,0.1);
                
double step =    .01;

 clrscrn();
 
 printf(" Verify that v(x) >= u(x) on [%.3f,%.3f].\n\n\n", ax, bx);

 printf(" v : x-> %s  \n", veq);
 printf(" u : x-> %s\n\n", ueq);

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

 clrscrn();
 printf(" Draw a typical vertical rectangle on a graph.\n\n");

 printf(" Upper boundary  (v)            :   %s              \n",veq);
 printf(" lower boundary  (u)            :   %s            \n\n",ueq);
 printf(" The length of the rectangle is :  (%s) - (%s)      \n",veq, ueq);
 printf(" The width  of the rectangle is :    dx           \n\n");
 printf(" The Area   of the rectangle is : ((%s) - (%s)) * dx\n",veq, ueq);
 printf(" \n\n\n\n\n");
                        
         G_f(w,
             ax,bx,
             d,
             step,
             v,u);
 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) - (%s)) * dx\n\n", veq, ueq);
 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", v_minu_ueq, 
                                            simpson(v_minu_u, ax,bx,LOOP));
 printf("    (%.3f\n\n\n", ax);
 
 stop();

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


Exemple de sortie écran :

 If we apply 


    (1.500
 int(      
    (-1.500


 to  : ((cos(x)) - (-x**2-2)) * dx

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


    (1.500
 int(      (cos(x)-(-x**2-2)) * dx = 10.244990
    (-1.500


 Press return to continue.