Aller au contenu

Mathc initiation/Fichiers h : c52a1

Un livre de Wikilivres.


Sommaire


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


c00a.c
/* --------------------------------- */
/* save as c00a.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fa.h"
/* --------------------------------- */
int main(void)
{
 clrscrn();
 
 printf(" h : (r,k)-> %s\n\n", heq);
 printf(" t :   (k)-> %s  \n", teq);
 printf(" s :   (k)-> %s\n\n", seq); 
 
 printf(" b =    %+.1f\n a =    %+.1f\n\n\n",bk,ak);

 printf(" Find the surface area for the given functions\n");
 printf(" with the simpson's rule. (polar form)\n\n\n");
 printf("    (b     (t(k)\n");
 printf(" int(   int(     sqrt(h_r()**2 + h_k()**2 + 1)  * r drdk = %.6f\n", 
                                           S_drdk(h, s,t,LOOP, ak,bk,LOOP));
 printf("    (a     (s(k)\n\n\n");

 stop();

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


Exemple de sortie écran :

 h : (r,k)-> 4 - r**2

 s :   (k)-> 0  
 t :   (k)-> 2

 a = +0.0   b = +1.6 



 Find the surface area for the given functions
 with the simpson's rule. (polar form)


    (b     (t(k)
 int(   int(     sqrt(h_r()**2 + h_k()**2 + 1)  * r drdk = 9.044226
    (a     (s(k)


 Press return to continue.


Exemple de sortie écran :

Verify with maple

> restart:
> 
> f := (r,k)->4-r^2:
> Int(
> Int(
> 
> sqrt( (diff(f(r,k),r)^2 + diff(f(r,k),k)^2 + 1) ) * r,
> 
> r = 0 .. 2),
> k = 0 .. Pi/2);

                   1/2 Pi    2
                  /         /
                 |         |           2
                 |         |   sqrt(4 r  + 1) r dr dk
                 |         |
                /         /
                  0         0

> evalf(value(%));
> 

                             9.044225805

>