Aller au contenu

Mathc initiation/a39

Un livre de Wikilivres.


Sommaire


Installer ce fichier dans votre répertoire de travail.

fc2.h
/* ---------------------------------- */
/* save as fc2.h                      */
/* ---------------------------------- */
double f(
double x)
{
         return( (sin(x)+2.)-4 );
}
char  feq[] =  "(sin(x)+2.)-4";
/* ---------------------------------- */
double g(
double x)
{
         return( (cos(x)+2.)-4 );
}
char  geq[] =  "(cos(x)+2.)-4";
/* ---------------------------------- */
double h(
double x)
{
         return(x);
}
char  heq[] =  "x";
/* ---------------------------------- */
double VCylindricalShell(
double x)
{
/*
 Volume of a cylindrical shell = 2Pi(average radius)(altitude)(thickness)
*/

        return( 2 * PI * h(x) * ( (f(x)) - (g(x)) ) );
}
/* ---------------------------------- */
/* ---------------------------------- */