Aller au contenu

Mathc initiation/0052

Un livre de Wikilivres.


Sommaire

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

c0a1.c
/* ---------------------------------- */
/* save as c0a1.c                     */
/* ---------------------------------- */
#include "x_afile.h"
#include      "fa.h"
/* ---------------------------------- */
int main(void)
{
double m =  0.;

 clrscrn();
 printf(" Let S be the part of the graph of z = %s with z >= 0.  \n\n", feq);
 printf(" Let C be the trace of S on the x-y-plane.              \n\n");
 printf(" Verify Stokes's theorem for the vector field,          \n\n");
 printf("     F(x,y,z) = %si %sj %sk\n\n\n\n\n",Meq,Neq,Peq);

 printf(" Stoke's theorem.             \n\n" 
        "     /           //            \n" 
        "    |           ||             \n" 
        "    O F.T ds  = || (curl F).dS \n" 
        "    |           ||             \n" 
        "   / C         //              \n" 
        "               S           \n\n\n");
 stop();

 clrscrn();
 printf("     //                    \n" 
        "    ||                     \n" 
        "    || (curl F).dS =       \n" 
        "    ||                     \n" 
        "   //                      \n" 
        "   S                   \n\n\n" 
        
        "   with F = Mi + Nj + Pk \n\n" 
        
        " (curl F) = [(P_y-N_z)i + (M_z-P_x)j + (N_x-M_y)k]  \n\n\n\n" 
        
        "       dS = (-f_x, -f_y, 1) dA                 dA = dxdy\n\n"); 
 stop();

 clrscrn();
 printf(" With the Stokes's theorem you find :\n\n\n");
 printf(" F : (x,y,z)-> %si %sj %sk \n\n",Meq,Neq,Peq);
 printf(" f :   (x,y)-> %s          \n\n", feq);

 printf(" x1 :    (y)-> %s            \n", x1eq);
 printf(" x0 :    (y)-> %s          \n\n", x0eq);
  
 printf(" y1 = %+.1f\n y0 = %+.1f\n\n",Y1,Y0);
 
  m = stokes_dxdy(           M,N,P,
                             f,
                             x0,x1,LOOP,
                             Y0,Y1,LOOP);

 printf("   / y1  / x1(y)\n" 
        "  |     |      \n" 
        "  |     | (curl F).(-f_x, -f_y, 1) dx dy = %.3f\n"
        "  |     |      \n" 
        " /  y0 /   x0(y)\n\n\n",m);
 stop();
 
 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */

Exemple de sortie écran :

 Let S be the part of the graph of z = 9-x**2-y**2 with z >= 0.  

 Let C be the trace of S on the x-y-plane.              

 Verify Stokes's theorem for the vector field,          

     F(x,y,z) = + 3*z*yi + 4*xj  + 2*y*xk




 Stoke's theorem.             

     /           //            
    |           ||             
    O F.T ds  = || (curl F).dS 
    |           ||             
   / C         //              
               S           


 Press return to continue.  


     //                    
    ||                     
    || (curl F).dS =       
    ||                     
   //                      
   S                   


   with F = Mi + Nj + Pk 

 (curl F) = [(P_y-N_z)i + (M_z-P_x)j + (N_x-M_y)k]  



       dS = (-f_x, -f_y, 1) dA                 dA = dxdy

 Press return to continue. 


 With the Stokes's theorem you find :


 F : (x,y,z)-> + 3*z*yi + 4*xj  + 2*y*xk 

 f :   (x,y)-> 9-x**2-y**2          

 x1 :    (y)-> +sqrt(9-y**2)            
 x0 :    (y)-> -sqrt(9-y**2)          

 y1 = +3.0
 y0 = -3.0

   / y1  / x1(y)
  |     |      
  |     | (curl F).(-f_x, -f_y, 1) dx dy = 113.006
  |     |      
 /  y0 /   x0(y)


 Press return to continue.