Sommaire


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

c01a.c
/* --------------------------------- */
/* save as c01a.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* --------------------------------- */
int main(void)
{
CTRL_splot w = i_ctrl_splot(0,1,0,1, 0,0, 0,0, 0,0);
pt2d       d =       i_pt2d(0.02,0.02);
        
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;
}
/* --------------------------------- */
/* --------------------------------- */