Aller au contenu

Mathc initiation/a471

Un livre de Wikilivres.


Sommaire


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


c00b1.c
/* --------------------------------- */
/* save as c00b1.c                   */
/* --------------------------------- */
#include  "x_afile.h"
#include      "f_b.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(" b :           -> %s  \n", beq); 
 printf(" 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 (r*cos(k) *  r*sin(k) * z) * (r) dz dr dk\n"
        " from 0 to r from 0 to PI/2 from 0 to 1 \n\n");
        
 stop();

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


Exemple de sortie écran :

 With the cylindrical coordinates. dzdrdk

     f : r,k,z -> (r*cos(k) *  r*sin(k) * z)

 z = v : r,k   -> r  
 z = u : r,k   -> 0

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

 b :           -> +PI/2  
 a :           -> 0

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

  Code mathematica  : 

 integral (r*cos(k) *  r*sin(k) * z) * (r) dz dr dk
 from 0 to r from 0 to PI/2 from 0 to 1 

 Press return to continue.