Mathc initiation/Fichiers c : c76cg

Un livre de Wikilivres.


Sommaire


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

c01g.c
/* --------------------------------- */
/* save as c1g.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fg.h"
/* --------------------------------- */
int main(void)
{
double c  = 1;

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

 printf("  Compute the derivative of f when x = %0.3f\n\n", c);   
  
 printf("  with   Df(%0.3f) = %0.8f    \n",c, Df(c));
 printf("  with fx_x(%0.3f) = %0.8f\n\n\n",c, fx_x(f,c,H));
 stop();

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


Calculons la dérivé de la fonction f :


Exemple de sortie écran :
  f : x-> csc(x)

 Df : x-> -cot(x)*csc(x)


  Compute the derivative of f when x = 1.000

  with   Df(1.000) = -0.76305972    
  with fx_x(1.000) = -0.76305973


 Press return to continue.


Calculons la dérivé :
        y =   csc(x)                                       
        
        y =   1/sin(x)
        
        y'= ( 1/sin(x) )'
        
        
        y'=   -cos(x)
              ---------
              sin(x)**2
                 
        y'=   -cos(x)    1
              -------  ------
               sin(x)  sin(x)     
                       
        y'=   -cot(x)  csc(x)