/* ---------------------------------- */
/* save as fa.h */
/* ---------------------------------- */
double f(
double x)
{
return(sqrt(x));
}
char feq[] = "x**(1./2.)";
/* ---------------------------------- */
double Df(
double x)
{
return( 1./(2.*(sqrt(x))) );
}
char Dfeq[] = "1./(2.*(x**(1./2.)))";
/* ---------------------------------- */
double ds(
double x)
{
return( sqrt(1.+ pow(Df(x),2) ) );
}
/* ---------------------------------- */
double SurfaceArea(
double x)
{
return( 2. * PI * f(x) * ds(x) );
}
/* ---------------------------------- */
/* ---------------------------------- */