Mathc initiation/Fichiers c : c53c1b


Sommaire


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

Crystal Clear mimetype source c.png c18b.c
'
/* ---------------------------------- */
/* save as c18b.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include      "fb.h"
/* --------------------------------- */
int main(void)
{
double a = 0;
double b = PI/2.;
int    n = 2*20;  

double S01 = 0;
double S02 = 0;

double   j =  H;

/* --------------------------------- */
 clrscrn();
 printf(" The Green's theorem :   \n\n");
 
 printf("    (                            (b   (v(y)\n" 
        " int( M(x,y) + dx N(x,y) dy = int( int( (N_x - M_y) dy dx\n"
        "    (c                           (a   (u(y) \n\n\n\n\n");
 
 printf(" Use the line integral to evaluate :   \n\n");  
 
 printf("    ( \n");
 printf(" int( %s + dx %s dy =  \n", Meq, Neq);
 printf("    (c\n\n\n\n");         
 stop(); 
 
/* --------------------------------- */ 
 clrscrn();
 printf(" M(x,y) = %s \n",   Meq);
 printf(" N(x,y) = %s \n\n", Neq);
 
 printf(" v(y) = %s   \n", veq); 
 printf(" u(y) = %s   \n", ueq);
 printf(" r(y) = %s \n\n", req);
 
 S01 = lineintegral_dx( M,r,u,a,b,n,j) + lineintegral_dx( M,r,v,b,a,n,j);
 S02 = lineintegral_dy( N,r,u,a,b,n,j) + lineintegral_dy( N,r,v,b,a,n,j);
 
 printf("    (\n" 
        " int(  %s dx =  %+.5f\n"
        "    (C\n\n",  Meq,S01 );
        
  printf("    (\n" 
         " int(  %s dy =  %+.5f\n"
         "    (C\n\n\n", Neq, S02); 
                          
                          
 printf("    ( \n" 
        " int(  %s dx + %s dy =  %+.5f\n"
        "    (C\n\n\n",Meq,Neq,S01+S02 ); 
 stop();

 return 0;
}
/* --------------------------------- 
  * With simpson_dydy();
 S01 = lineintegral_dx( M,r,u,a,b,n,j) + lineintegral_dx( M,r,v,b,a,n,j);
 S02 = lineintegral_dy( N,r,u,a,b,n,j) + lineintegral_dy( N,r,v,b,a,n,j);

 * With simpson_dxdy();
 S01 = lineintegral_dx( M,u,r,b,a,n,j) + lineintegral_dx( M,v,r,a,b,n,j);
 S02 = lineintegral_dy( N,u,r,b,a,n,j) + lineintegral_dy( N,v,r,a,b,n,j) ;
 
   --------------------------------- */
/* --------------------------------- */
/* --------------------------------- */


On utilise les intégrales curviligne du théorème de Green.


Exemple de sortie écran :

 The Green's theorem :   

    (                            (b   (v(y)
 int( M(x,y) + dx N(x,y) dy = int( int( (N_x - M_y) dy dx
    (c                           (a   (u(y) 




 Use the line integral to evaluate :   

    ( 
 int( (y-sin(x)) + dx (cos(x)) dy =  
    (c



 Press return to continue.

Exemple de sortie écran :

 M(x,y) = (y-sin(x)) 
 N(x,y) = (cos(x)) 

 v(y) = 2*y/Pi   
 u(y) = 0   
 r(y) = y 

    (
 int(  (y-sin(x)) dx =  -0.78540
    (C

    (
 int(  (cos(x)) dy =  -0.63662
    (C


    ( 
 int(  (y-sin(x)) dx + (cos(x)) dy =  -1.42202
    (C


 Press return to continue.