/* ---------------------------------- */
/* 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(fx_x(f,x,H),2) ) );
}
/* ---------------------------------- */
double SurfaceArea(
double x)
{
return( 2. * PI * f(x) * ds(x) );
}
/* ---------------------------------- */
/* ---------------------------------- */