Mathc initiation/Fichiers c : c76cd

Un livre de Wikilivres.


Sommaire


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

c01d.c
/* --------------------------------- */
/* save as c1d.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fd.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-> tanh(x)

 Df : x-> sech(x)**2


  Compute the derivative of f when x = 1.000

  with   Df(1.000) = 0.41997434    
  with fx_x(1.000) = 0.41997434


 Press return to continue.


Calculons la dérivé :
        y =   tanh(x)                                       
        
        y =   sinh(x)/cosh(x)
        
        y'= ( sinh(x)/cosh(x) )'
        
        
        y'=   cosh(x)cosh(x) - (sinh(x))sinh(x)
              ------------------------------
                       cos(x)**2
                 
        y'=      cosh(x)**2 - sinh(x)**2
                 -----------------------
                       cosh(x)**2       
                       
        y'=                1
                       ----------
                       cosh(x)**2   
                                          
        y'=            sech(x)**2