Sommaire


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

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

double S01 = 0;
double S02 = 0;

double   j =  H;

/* --------------------------------- */
 clrscrn();
 printf(" The Green's theorem :   \n\n");
 
 printf("    (                            (b   (v(x)\n" 
        " int( M(x,y) + dx N(x,y) dy = int( int( (N_x - M_y) dx dy\n"
        "    (c                           (a   (u(x) \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(x) = %s   \n", veq); 
 printf(" u(x) = %s   \n", ueq);
 printf(" r(x) = %s \n\n", req);
 
 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);
 
 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_dydx();
 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éoreme de Green.


Exemple de sortie écran :

 The Green's theorem :   

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




 Use the line integral to evaluate :   

    ( 
 int( (x**2+y) + dx (x*y**2) dy =  
    (c



 Press return to continue.

Exemple de sortie écran :

 M(x,y) = (x**2+y) 
 N(x,y) = (x*y**2) 

 v(x) = -x   
 u(x) = x**2   
 r(x) = x 

    (
 int(  (x**2+y) dx =  -0.16667
    (C

    (
 int(  (x*y**2) dy =  +0.05000
    (C


    ( 
 int(  (x**2+y) dx + (x*y**2) dy =  -0.11667
    (C


 Press return to continue.
Cet article est issu de Wikibooks. Le texte est sous licence Creative Commons - Attribution - Partage dans les Mêmes. Des conditions supplémentaires peuvent s'appliquer aux fichiers multimédias.