Aller au contenu

Mathc initiation/Fichiers h : c53a1

Un livre de Wikilivres.


Sommaire


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


c00d.c
/* --------------------------------- */
/* save as c00d.c                    */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fd.h"
/* --------------------------------- */
int main(void)
{
 clrscrn();
 
 printf(" h : (r,k)-> %s\n\n", heq);
 printf(" t :   (r)-> %s  \n", teq);
 printf(" s :   (r)-> %s\n\n", seq);

 printf(" b =    %+.1f\n a =    %+.1f\n\n\n",br,ar);

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

 stop();

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


Exemple de sortie écran :

 h : (r,k)-> 7 - 7./25 * r**2

 s :   (r)-> 0  
 t :   (r)-> 2*Pi

 a = +0.0   b = +5.0 



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


    (b     (t(r)
 int(   int(     sqrt(h_r()**2 + h_k()**2 + 1)  * r dkdr = 168.855326
    (a     (s(r)


 Press return to continue.


Exemple de sortie écran :

Verify with maple

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

                5    2 Pi
               /    /
              |    |                     2
              |    |      1/25 sqrt(196 r  + 625) r dk dr
              |    |
             /    /
               0    0

> evalf(value(%));
> 

                             168.8553261

>