Aller au contenu

Mathc initiation/Fichiers c : c59cb2

Un livre de Wikilivres.


Sommaire


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


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

 clrscrn();
 printf(" Evaluate the line integral :\n\n" 

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

        "     /           /         \n" 
        "    |           |          \n" 
        "    O F.T ds  = O  F  dr   \n" 
        "    |           |          \n" 
        "   / C         / C       \n\n" 

        "     /                                           \n" 
        "    |                                            \n" 
        "    O  M(x,y,z) dx + N(x,y,z) dy + P(x,y,z) dz = \n" 
        "    |                                            \n" 
        "   / C                                         \n\n");
 stop();

 clrscrn();
 
      m  = lint3d_dx(M,
                     g,h,k,
                     a,b,LOOP);

      m += lint3d_dy(N,
                     g,h,k,
                     a,b,LOOP);

      m += lint3d_dz(P,
                     g,h,k,
                     a,b,LOOP);
                     
 printf(" Let S be the part of the graph of z = %s with z >= 0.  \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",Meq,Neq,Peq);                    

 printf(" if C has the parametrization :\n\n");
 printf(" x = %s;  y = %s;  z = %s;     (z = %s) \n\n", geq, heq,keq, feq);
 printf("      %.1f < t =< %.1f   \n\n",a, b);

 printf(" With the line integral you find :\n");
 printf("     /                               \n");
 printf("    |                                \n");
 printf("    O  (%s) dx + (%s) dy + (%s) dz = %+.3f \n", Meq, Neq, Peq,m);
 printf("    |                                \n");
 printf("   / C                             \n\n");
 stop();

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


Vérifions le théorème de Stoke partie 2.


Exemple de sortie écran :

 Evaluate the line integral :

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

     /           /              
    |           |               
    O F.T ds  = O  F  dr        
    |           |               
   / C         / C            

     /                                           
    |                                            
    O  M(x,y,z) dx + N(x,y,z) dy + P(x,y,z) dz = 
    |                                            
   / C                                         

 Press return to continue.

Exemple de sortie écran :

 Let S be the part of the graph of z = 4-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 + exp(z)j  - atan(x)k


 if C has the parametrization :

 x =  2*cos(t);  y =  2*sin(t);  z = 0;     (z = 4-x**2-y**2) 

      0.0 < t =< 6.3   

 With the line integral you find :
     /                               
    |                                
    O  (+ 2*y) dx + (+ exp(z)) dy + ( - atan(x)) dz = -25.133 
    |                                
   / C                             

 Press return to continue.