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)
{
double a = 0;
double b = 2;

double n = 2*100;

double x = simpson(f,a,b,n);
double y = simpson(g,a,b,n);
      
 clrscrn();
 printf(" r(t) a vector function \n\n\n");

 printf("     / b           / b                    \n");
 printf("    |             |                       \n");
 printf("    |   r(t) dt = |    f(t)i + g(t)j  dt =\n");
 printf("    |             |                       \n");
 printf("   /   a          /   a             \n\n\n\n");
                                                                
 printf("     / b            / b           / b          \n");
 printf("    |              |             |             \n");
 printf("    |   r(t) dt = (| f(t)dt) i + (| g(t)dt) j =\n");
 printf("    |              |             |             \n");
 printf("   /   a          /   a         /   a        \n\n");
 
 stop();

 clrscrn();
 printf(" Evaluate the integral \n\n" 
        " With \n\n" 
        " %+.2f < t < %+.2f \n\n",a,b);

 printf("     / b           / b = %+.2f           \n",b);
 printf("    |             |                      \n");
 printf("    |   r(t) dt = |    (%s)i + (%s)j  dt \n", feq, geq);
 printf("    |             |                      \n");
 printf("   /   a          /  a = %+.2f       \n\n\n",a);
 
 printf("     / b = %+.2f                         \n",b);
 printf("    |                                    \n");
 printf("    |   r(t) dt = %+.2fi  %+.2fj         \n",x,y);
 printf("    |                                    \n");
 printf("   /   a = %+.2f                       \n\n",a);

 stop();

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


Exemple de sortie écran :

 r(t) a vector function 


     / b           / b                    
    |             |                       
    |   r(t) dt = |    f(t)i + g(t)j  dt =
    |             |                       
   /   a          /   a             



     / b            / b           / b          
    |              |             |             
    |   r(t) dt = (| f(t)dt) i + (| g(t)dt) j =
    |              |             |             
   /   a          /   a         /   a        

 Press return to continue.


Exemple de sortie écran :

 Evaluate the integral 

 With 

 +0.00 < t < +2.00 

     / b           / b = +2.00           
    |             |                      
    |   r(t) dt = |    (6*t**2)i + (-4*t)j  dt 
    |             |                      
   /   a          /  a = +0.00       


     / b = +2.00                         
    |                                    
    |   r(t) dt = +16.00i  -8.00j         
    |                                    
   /   a = +0.00                       

 Press return to continue.