Aller au contenu

Mathc initiation/Fichiers h : c52fa

Un livre de Wikilivres.


Sommaire


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


c00b.c
/* --------------------------------- */
/* save as c00b.c                    */
/* --------------------------------- */
#include  "x_hfile.h"
#include       "fb.h"
/* --------------------------------- */
int main(void)
{
double m = simpson_drdzrdxy( P,
                             ar, br, LOOP,
                             azr,bzr,LOOP,
                             axy,bxy,LOOP);
 clrscrn();
 
 printf(" With spherical coordinates.\n\n\n");
 printf(" P   : r,zr,xy -> %s                \n\n",   Peq);

 printf(" br  :   zr,xy -> %s                  \n",  breq);
 printf(" ar  :   zr,xy -> %s         [0..oo]\n\n",  areq);

 printf(" bzr :      xy -> %s                  \n", bzreq);
 printf(" azr :      xy -> %s         [0..PI]\n\n", azreq);

 printf(" bxy :         -> %s                  \n", bxyeq);
 printf(" axy :         -> %s        [0..2PI]\n\n", axyeq);
 printf("        (bxy   (bzr(xy)  (br(zr,xy)    \n");
 printf(" m = int(   int(      int(f(r,zr,xy) r**2 sin(zr) dr dzr dxy = %.6f\n",m);
 printf("        (axy   (azr(xy)  (ar(zr,xy) \n\n");

 stop();

 return 0;
}
/* --------------------------------- */
/* --------------------------------- */
My spherical coordinates for my work in language c

Exemple de sortie écran :

 With spherical coordinates.


 P   : r,zr,xy -> r**2                

 ar  :   zr,xy -> 0           [0..oo]
 br  :   zr,xy -> sqrt(8)                

 azr :      xy -> 0           [0..PI]
 bzr :      xy -> PI/4                

 axy :         -> 0          [0..2PI]
 bxy :         -> 2*Pi                

        (bxy   (bzr(xy)  (br(zr,xy)    
 m = int(   int(      int(f(r,zr,xy) r**2 sin(zr) dr dzr dxy = 66.508669
        (axy   (azr(xy)  (ar(zr,xy) 

 Press return to continue.


Exemple de sortie écran :

Verify with maple

> restart:
> 
> f := (p,i,j) -> p**2:
> Int(
> Int(
> Int(
> 
> f(p,i,j) * (p^2*sin(i)),
> 
> p = 0 ..  sqrt(8)),
> i = 0 ..  Pi/4),
> j = 0 ..  2*Pi);

             2 Pi    1/4 Pi    2 sqrt(2)
            /       /         /
           |       |         |            4
           |       |         |           p  sin(i) dp di dj
           |       |         |
          /       /         /
            0       0         0

> evalf(value(%));
> 

                             66.62606254

>