Sommaire


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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include  "x_hfile.h"
#include       "fa.h"
/* ------------------------------------ */
int main(void)
{
tvalue t;

  t.min   =        0.; /* a */
  t.max   =     2.*PI; /* b */ 
  t.step  =       0.1;  

CTRL_splot p;

  p.xmin = -4;
  p.xmax =  4;             
  p.ymin = -4;
  p.ymax =  4;	

 double sector =   1.;
 int    n      = 2*50;	

 clrscrn();
 printf(" If r is continuous on [a,b],               \n\n" 
        "        where 0 <= a  < b <= 2Pi,           \n\n" 
        " then the area A of the region bounded by the \n" 
        " graphs of r  with t = a and t = b is       \n\n" 
        "       / b                                    \n" 
        "      |                                       \n" 
        " A =  |   1/2 r(t)^2 dt                       \n" 
        "      |                                       \n"
        "     /   a                                \n\n\n");
 stop();

 clrscrn();

 printf(" r : t-> %s\n\n", req);

      G_polar_areaf(
              p,
              r,
              t,
              sector
            );

 printf(" Draw a typical circular sector.\n\n");
 printf(" To see the graph, open the file \"a_main.plt\" with Gnuplot.\n\n\n");

 printf(" Express the area of the sector as :\n\n");
 printf(" radius             : %s\n",req);
 printf(" angle              : dt\n\n");
 printf(" Area of the sector : 1/2 (%s)^2 dt\n",req);
 printf("\n");
 stop();

 clrscrn();
 printf(" If we apply \n\n\n");
 printf("     / %.2f\n",t.max);
 printf("    |  \n");
 printf("    |  \n");
 printf("   /   %.2f\n\n\n",t.min);
 printf(" to  :  1/2 (%s)^2 dt\n\n\n",req);
 printf(" We obtain the area of the region Rt.\n\n");

 printf("     / %.2f\n",t.max);
 printf("    |  \n");
 printf("    |     1./2.*(%s)^2 dt = %.6f\n",
                  req,simpson(SectorArea,t.min,t.max,n));
 printf("    |  \n");
 printf("   /   %.2f\n\n\n",t.min);

 stop();

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


Exemple de sortie écran :

  If r is continuous on [a,b],               

        where 0 <= a  < b <= 2Pi,           

 then the area A of the region bounded by the 
 graphs of r  with t = a and t = b is       

       / b                                    
      |                                       
 A =  |   1/2 r(t)^2 dt                       
      |                                       
     /   a                                


 Press return to continue.
The area A of the region bounded by the graphs of r = 2.+2.*cos(t) with gnuplot

Exemple de sortie écran :

 r : t-> 2.+2.*cos(t)

 Draw a typical circular sector.

 To see the graph, open the file "a_main.plt" with Gnuplot.


 Express the area of the sector as :

 radius             : 2.+2.*cos(t)
 angle              : dt

 Area of the sector : 1/2 (2.+2.*cos(t))^2 dt

 Press return to continue.


Exemple de sortie écran :

 If we apply 


     / 6.28
    |  
    |  
   /   0.00


 to  :  1/2 (2.+2.*cos(t))^2 dt


 We obtain the area of the region Rt.

     / 6.28
    |  
    |     1./2.*(2.+2.*cos(t))^2 dt = 18.849556
    |  
   /   0.00


 Press return to continue.