Aller au contenu

Mathc initiation/Fichiers c : c62ca

Un livre de Wikilivres.


Sommaire


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


c00a.c
/* ---------------------------------- */
/* save as c00a.c                     */
/* ---------------------------------- */
#include "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double  m = IntFlux_simpson_dxdy( M,N,P,
                                  f,
                                  u,  v,LOOP,
                                  ay,by,LOOP);
 clrscrn();

 printf(" Let S be the part of the graph of z = %s with z >= 0.  \n\n", feq);
 printf(" If F(x,y,z) = %si %sj %sk, find the flux of F through S\n\n\n",
          Meq,Neq,Peq);
 printf(" Consider f(x,y) = (%s)\n\n",feq);
 printf("          n      = grad(f(x,y)) / ||grad(f(x,y))||\n\n\n");

 printf(" The flux of F through S is \n\n");
 printf("     //                       \n");
 printf("    ||                        \n");
 printf("    || F.n  dS = %.3f         \n"  ,m);
 printf("    ||                        \n");
 printf("   //                         \n");
 printf("   S                      \n\n\n");
 stop();

 clrscrn();
 printf("     / b   / v(y)\n");
 printf("    |     |      \n");
 printf("    |     |     F.(-f_xi-f_yj+k)    [f_x**2+f_y**2+1]**1/2 dx dy = %.3f\n",m);
 printf("    |     |        -----------     \n");
 printf("    |     |     [f_x**2+f_y**2+1]**1/2\n");
 printf("    |     |      \n");
 printf("   /  a  /   u(y)\n\n\n");

 printf("     / b   / v(y)\n");
 printf("    |     |       \n");
 printf("    |     |     F.(-f_xi-f_yj+k) dx dy = %.3f\n",m);
 printf("    |     |       \n");
 printf("   /  a  /   u(y)\n\n\n");

 stop();

 clrscrn();
 printf("     / b   / v(y)\n");
 printf("    |     |      \n");
 printf("    |     |     F.(-f_xi-f_yj+k)  dx dy = %.3f\n",m);
 printf("    |     |      \n");
 printf("   /  a  /   u(y)\n\n\n");

 printf(" With.\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(" v :     (y)-> %s          \n",   veq);
 printf(" u :     (y)-> %s        \n\n",   ueq); 
 printf(" b = %+.1f\n a = %+.1f \n\n\n", by,ay);

 stop();

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


Dans cette version nous utilisons l'algorithme simplifié qui calcule les intégrales de flux de surface.


     / b   / v(y)
    |     |      
    |     |     F.(-f_xi-f_yj+k)  dx dy = 890.585
    |     |      
   /  a  /   u(y)


 With.


 F : (x,y,z)-> + 3*xi + 3*yj  + zk 

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

 u :     (y)-> -sqrt(9-y**2)      
 v :     (y)-> +sqrt(9-y**2)    

 a = -3.0   b = +3.0 


 Press return to continue.