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

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