Mathc initiation/Fichiers c : c23cf


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.


c3f.c
/* --------------------------------- */
/* save as c3f.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fc.h"
/* --------------------------------- */
int main(void)
{
double c  = 1; 
double h  = .0001;

 clrscrn();
 printf("   f : x-> %s\n\n" 
        " Df2 : x-> %s\n\n\n", feq, Dfeq2);

 printf("  Compute the second derivative of f when x = %0.3f\n\n", c);   
  
 printf("  with   Df2(%0.3f) = %0.8f  \n",c, Df2(c));
 printf("  with fx_xx(%0.3f) = %0.8f\n\n",c, fx_xx(f,c,h));

 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */



Exemple de sortie écran :

   f : x-> x*sin(cos(x))

 Df2 : x-> -2*cos(cos(x))*sin(x)  
           -x*sin(cos(x))*sin(x)**2  
           -x*cos(cos(x))*cos(x)


  Compute the second derivative of f when x = 1.000

  with   Df2(1.000) = -2.27077989  
  with fx_xx(1.000) = -2.27077989

 Press return to continue