Aller au contenu

Mathc initiation/a319

Un livre de Wikilivres.


Sommaire


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


c_zrk.c
/* --------------------------------- */
/* save as c_zrk.c                   */
/* --------------------------------- */
#include  "x_hfile.h"
#include    "f_zrk.h"
/* --------------------------------- */
int main(void)
{
double M =  cylindrical_dzdrdk( f,
                                u,v,LOOP,
                                s,t,LOOP,
                                a,b,LOOP); 
 clrscrn();
 
 printf(" With the cylindrical coordinates. dzdrdk\n\n");
 printf("     f : r,k,z -> %s\n\n", feq);

 printf(" z = v : r,k   -> %s  \n", veq);
 printf(" z = u : r,k   -> %s\n\n", ueq);

 printf(" r = t :   k   -> %s  \n", teq);
 printf(" r = s :   k   -> %s\n\n", seq);

 printf(" k = b :       -> %s  \n", beq); 
 printf(" k = a :       -> %s\n\n", aeq);
                          
 printf("        (k=b   (r=t(k)   (z=v(r,k)    \n");
 printf(" m = int(   int(      int(      f(r,k,z) *r* dzdrdk = %.6f\n",M);
 printf("        (k=a   (r=s(k)   (z=u(r,k) \n\n");

 printf("  Code mathematica  : \n\n" 
        "  integral z * (r) dz dr dk from 0 to sqrt(4-r**2)"
        "  from 0 to Pi/2 from 0 to 1\n\n\n");
        
 stop();

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


Exemple de sortie écran :

 With the cylindrical coordinates. dzdrdk

     f : r,k,z -> z

 z = u : r,k   -> 0  
 z = v : r,k   -> sqrt(4-r**2)

 r = s :   k   -> 0  
 r = t :   k   -> 1

 k = a :       -> 0  
 k = b :       -> PI/2.

        (k=b   (r=t(k)   (z=v(r,k)    
 m = int(   int(      int(      f(r,k,z) *r* dzdrdk = 1.374447
        (k=a   (r=s(k)   (z=u(r,k) 

  Code mathematica  : 

  integral z * (r) dz dr dk from 0 to sqrt(4-r**2)  from 0 to Pi/2 from 0 to 1


 Press return to continue.