Mathc initiation/Fichiers c : c76cm

Un livre de Wikilivres.


Sommaire


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

c01m.c
/* --------------------------------- */
/* save as c1m.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fm.h"
/* --------------------------------- */
int main(void)
{
double c  = .5;

 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-> acos(x)

 Df : x-> -1/(1-x**2)


  Compute the derivative of f when x = 0.500

  with   Df(0.500) = -1.15470054    
  with fx_x(0.500) = -1.15470054


 Press return to continue.



Calculons la dérivé :
         y    = acos(x)                             *  y = acos(x)
        
     cos(y)   = cos(acos(x))
    
     cos(y)   = x    
    
    (cos(y))' = (x)'  
       

    (-sin(y)) dy/dx = 1
    
    
               dy/dx =  1/(-sin(y))  
                     = -1/sin(y)                      *  y = acos(x)       
       
       d(acos(x))/dx = -1/sin(acos(x))
                                               *** sin(acos(x)) = sqrt(1-x**2) ***    
          (acos(x))' = -1/sqrt(1-x**2)
 *** sin(acos(x)) = sqrt(1-x**2) ***