Mathc initiation/Fichiers h : c23ba


Sommaire



Installer ce fichier dans votre répertoire de travail.

Les fonctions f
fa.h
/* --------------------------------- */
/* save as fa.h                      */
/* --------------------------------- */
double f(
double x)
{
 return(       3.0*x*x  - 2.0*x - 5.0);
}
char  feq[] = "3.0*x**2 - 2.0*x - 5.0";
/* --------------------------------- */
double Df(
double x)
{
 return(       6.0*x - 2.0);
}
char Dfeq[] = "6.0*x - 2.0";
/* --------------------------------- */
double Df2(
double x)
{
 return(       6.0);
}
char Dfeq2[] = "6.0";
/* --------------------------------- */
fb.h
/* --------------------------------- */
/* save as fb.h                      */
/* --------------------------------- */
double f(
double x)
{
 return(       cos(x));
}
char  feq[] = " cos(x)";
/* --------------------------------- */
double Df(
double x)
{
 return(  (-sin(x)) );
}
char Dfeq[] = " (-sin(x)) ";
/* --------------------------------- */
double Df2(
double x)
{
 return(  (-cos(x)) );
}
char Dfeq2[] = " (-cos(x)) ";
/* --------------------------------- */
fc.h
/* --------------------------------- */
/* save as fc.h                      */
/* --------------------------------- */
double f(
double x)
{
 return(       x*sin(cos(x)));
}
char  feq[] = "x*sin(cos(x))";
/* --------------------------------- */
double Df(
double x)
{
 return(       sin(cos(x))-x*cos(cos(x))*sin(x));
}
char Dfeq[] = "sin(cos(x))-x*cos(cos(x))*sin(x)";
/* --------------------------------- */
double Df2(
double x)
{
 return(-2*cos(cos(x))*sin(x)-
         x*sin(cos(x))*sin(x)*sin(x)-
         x*cos(cos(x))*cos(x));
}
char Dfeq2[] = "-2*cos(cos(x))*sin(x)"
               "-x*sin(cos(x))*sin(x)**2"
               "-x*cos(cos(x))*cos(x)";
/* --------------------------------- */