Mathc initiation/003o
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00e0.c |
|---|
/* --------------------------------- */
/* save as c00e0.c */
/* --------------------------------- */
#include "x_afile.h"
#include "fe0.h"
/* --------------------------------- */
int main(void)
{ //dbdadr
double m = simpson_dydxdz( g,
b0, b1, LOOP,
a0, a1, LOOP,
r0, r1, LOOP);
clrscrn();
printf(" With spherical coordinates.\n\n\n");
printf(" f : a,b,r -> %s \n", feq);
printf(" g : a,b,r -> %s \n\n", geq);
printf(" b1 : a,r -> %s \n", b1eq);
printf(" b0 : a,r -> %s [0..PI]\n\n", b0eq);
printf(" a1 : r -> %s \n", a1eq);
printf(" a0 : r -> %s [0..2PI]\n\n", a0eq);
printf(" r1 : -> %s \n", r1eq);
printf(" r0 : -> %s [0..oo]\n\n", r0eq);
printf(" (%s (%s (%s \n", r1eq,a1eq,b1eq);
printf(" m = int( int( int( g(a,b,r) dbdadr = %.6f\n",m);
printf(" (%s (%s (%s\n\n", r0eq,a0eq,b0eq);
printf(" Code Mathematica : \n"
" integral (r*cos(b))*(r**2 *sin(b)) db da dr"
" from 0 to (1) from 0 to (2*Pi) from 0 to Pi/2\n\n");
stop();
return 0;
}
/* --------------------------------- */
/* --------------------------------- */

Exemple de sortie écran :
With spherical coordinates.
f : a,b,r -> (z cos(y))
g : a,b,r -> (r cos(b)) [r**2 sin(b)]
b1 : a,r -> PI/2
b0 : a,r -> 0 [0..PI]
a1 : r -> 2PI
a0 : r -> 0 [0..2PI]
r1 : -> 1
r0 : -> 0 [0..oo]
(1 (2PI (PI/2
m = int( int( int( g(a,b,r) dbdadr = 0.785398
(0 (0 (0
Code Mathematica :
integral (r*cos(b))*(r**2 *sin(b)) db da dr from 0 to (1) from 0 to (2*Pi) from 0 to Pi/2
Press return to continue.