Mathc initiation/a21
Installer et compiler ces fichiers dans votre répertoire de travail.
c01a.c |
---|
/* --------------------------------- */
/* save as c1a.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fa.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-> sin(x)
Df : x-> cos(x)
Compute the derivative of f when x = 1.000
with Df(1.000) = 0.54030231
with fx_x(1.000) = 0.54030230
Press return to continue.
Calculons la dérivé :
sin(x+h) - sin(x)
sin(x)' = lim -----------------
h->0 h
(sin(x)cos(h)+cos(x)sin(h)) - sin(x)
sin(x)' = lim -----------------------------------
h->0 h
sin(x)cos(h)-sin(x) + cos(x)sin(h)
sin(x)' = lim ----------------------------------
h->0 h
sin(x)(cos(h)-1) cos(x)sin(h)
sin(x)' = lim ---------------- + lim ------------
h->0 h h->0 h
(cos(h)-1) sin(h)
sin(x)' = sin(x) lim ---------- + cos(x) lim ------
h->0 h h->0 h
sin(x)' = sin(x) 0 + cos(x) 1
sin(x)' = cos(x)