Mathc initiation/Fichiers c : c52c1a
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00c.c |
---|
/* --------------------------------- */
/* save as c00c.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fc.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;
}
/* --------------------------------- */
/* --------------------------------- */
Exemple de sortie écran :
With spherical coordinates.
P : r,zr,xy -> r*cos(zr)
ar : zr,xy -> 0 [0..oo]
br : zr,xy -> 1
azr : xy -> 0 [0..PI]
bzr : xy -> PI/2.
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 = 0.785398
(axy (azr(xy) (ar(zr,xy)
Press return to continue.
Exemple de sortie écran :
Verify with maple
> restart:
>
> f := (p,i,j) -> p*cos(i):
> Int(
> Int(
> Int(
>
> f(p,i,j) * (p^2*sin(i)),
>
> p = 0 .. 1),
> i = 0 .. Pi/2),
> j = 0 .. 2*Pi);
2 Pi 1/2 Pi 1
/ / /
| | | 3
| | | p cos(i) sin(i) dp di dj
| | |
/ / /
0 0 0
> evalf(value(%));
>
.7853981635
>