Mathc initiation/a30
Apparence
Installer ce fichier dans votre répertoire de travail.
fe.h |
---|
/* ---------------------------------- */
/* save as fe.h */
/* ---------------------------------- */
double f(
double x)
{
return(2.*x - x*x);
}
char feq[] = "2.*x - x**2";
/* ---------------------------------- */
double g(
double x)
{
return(.5);
}
char geq[] = ".5";
/* ---------------------------------- */
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)) ) );
}
/* ---------------------------------- */
/* ---------------------------------- */