Mathc initiation/Fichiers c : c53c1a


Sommaire


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

Crystal Clear mimetype source c.png c18a.c
'
/* ---------------------------------- */
/* save as c18a.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
double ax = 0;
double bx = PI/2.;
int    nx = 2*20;
int    ny = 2*20; 
/* --------------------------------- */                 
 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 Green's theorem to evaluate :   \n\n");  
 
 printf("    (                                  (%.3f   (%s\n",    bx, veq);
 printf(" int( %s dx + %s dy = int(     int( %s dy dx\n", 
                       Meq, Neq, N_x_mns_M_y_eq);
 printf("    (c                                 (%.3f   (%s\n\n\n\n\n", ax, ueq);         
 stop(); 
 
/* --------------------------------- */ 
 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");
        
 printf(" M(x,y) = %s \n",   Meq);
 printf(" N(x,y) = %s \n\n", Neq);

 
 printf(" N_x_mns_M_y(x,y) = %s  \n\n", N_x_mns_M_y_eq);
 
 printf(" v(y) = %s   \n", veq); 
 printf(" u(y) = %s \n\n", ueq);

 printf(" With simpson_dydx().\n\n");
 printf("    (%.1f    (%s\n", bx, veq);
 printf(" int(    int( %s  dy dx = %.5f\n", N_x_mns_M_y_eq, 
             simpson_dydx(N_x_mns_M_y, ax,bx,nx, u,v,ny) );
 printf("    (%.1f    (%s\n\n\n", ax, ueq);

 stop();

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


On utilise l'intégrale double 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 Green's theorem to evaluate :   

    (                                  (1.571   (2*y/Pi
 int( (y-sin(x)) dx + (cos(x)) dy = int(     int( (-sin(x))-(1) dy dx
    (c                                 (0.000   (0




 Press return to continue.

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)


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

 N_x_mns_M_y(x,y) = (-sin(x))-(1)  

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

 With simpson_dydx().

    (1.6    (2*y/Pi
 int(    int( (-sin(x))-(1)  dy dx = -1.42202
    (0.0    (0


 Press return to continue.