Aller au contenu

Mathc initiation/005f

Un livre de Wikilivres.


Sommaire

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

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

v3d    u = {1,0,1};

 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 = (-(u.i), -(u.j), 1) dA             dA = dydx\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(" y1 :    (y)-> %s            \n", y1eq);
 printf(" y0 :    (y)-> %s          \n\n", y0eq);
  
 printf(" x1 = %+.1f\n x0 = %+.1f   \n\n",x1,x0);
 
  m = stokes_dydx(           M,N,P,
                             f,
                             y0,y1,LOOP,
                             x0,x1,LOOP,
                             u);

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

Exemple de sortie écran :

 Let S be the part of the graph of z = (1-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) = + 2*yi + cos(z)*xj  -(sin(x)*y)k




 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 = (-(u.i), -(u.j), 1) dA             dA = dydx

 Press return to continue. 


 With the Stokes's theorem you find :


 F : (x,y,z)-> + 2*yi + cos(z)*xj  -(sin(x)*y)k 

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

 y1 :    (y)-> +(1)            
 y0 :    (y)-> -(0)          

 x1 = +1.0
 x0 = -0.0   

   / x1  / y1(y)
  |     |      
  |     | (curl F).(-(u.i), -(u.j), 1) dy dx = -0.755
  |     |      
 /  x0 /   y0(y)


 Press return to continue.