Aller au contenu

Mathc initiation/Fichiers h : c50a5

Un livre de Wikilivres.


Sommaire

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

c00c.c
/* ---------------------------------- */
/* save as c00c.c                     */
/* ---------------------------------- */
#include "x_afile.h"
#include      "fc.h"
/* ---------------------------------- */
int main(void)
{
 clrscrn();

 printf(" g : (x,y)-> %s\n\n", geq);
 printf(" v :   (x)-> %s  \n", veq);
 printf(" u :   (x)-> %s\n\n", ueq);
 printf(" b =    %+.1f\n a =    %+.1f\n\n\n",b,a);

 printf(" Find the surface area for the given functions\n");
 printf(" with the simpson's rule.\n\n\n");
 printf("    (b     (v(x)\n");
 printf(" int(   int(     sqrt(g_x()**2 + g_y()**2 + 1)  dydx = %.3f\n",
                                             S_dydx(g, u,v,LOOP, a,b,LOOP));
 printf("    (a     (u(x)\n\n\n");

 stop();

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


Exemple de sortie écran :

 g : (x,y)-> 4-x**2-y**2

 v :   (x)-> sqrt(4-x**2)  
 u :   (x)-> 0

 b =    +2.0
 a =    +0.0


 Find the surface area for the given functions
 with the simpson's rule.


    (b     (v(x)
 int(   int(     sqrt(g_x()**2 + g_y()**2 + 1)  dydx = 9.044
    (a     (u(x)




 Press return to continue.


Exemple de sortie écran :

Verify with maple

 restart:
 
 g := (x,y)->4-x^2-y^2:
 Int(
 Int(
 
 sqrt( diff(g(x,y),x)^2 + diff(g(x,y),y)^2 + 1),
 
 y = 0 .. sqrt(4-x^2)),
 x = 0 .. 2);

                             2
              2    sqrt(4 - x )
             /    /
            |    |                      2      2
            |    |              sqrt(4 x  + 4 y  + 1) dy dx
            |    |
           /    /
             0    0

 evalf(value(%));
 

                             9.044225799