Mathc initiation/Fichiers h : c51fb
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00a.c |
|---|
/* --------------------------------- */
/* save as c00a.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fa.h"
/* --------------------------------- */
int main(void)
{
double c = .5;
clrscrn();
printf(" f : x-> %s\n"
" Df : x-> %s\n\n"
" g : x-> %s\n"
" Dg : x-> %s\n\n\n", feq, Dfeq, geq, Dgeq);
printf(" Compute the derivative of f and g with their definitions\n"
" and the function fx_x(); 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",c, fx_x(f,c,H));
printf(" with Dg(%0.3f) = %0.8f \n",c, Df(c));
printf(" with fx_x(%0.3f) = %0.8f\n\n\n",c, fx_x(g,c,H));
printf(" Remark : f(x) and f(x) + C have the same derivative\n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
f : x-> cos(x)
Df : x-> -sin(x)
g : x-> cos(x) + 5
Dg : x-> -sin(x)
Compute the derivative of f and g with their definitions
and the function fx_x(); when x = 0.500
with Df(0.500) = -0.47942554
with fx_x(0.500) = -0.47942554
with Dg(0.500) = -0.47942554
with fx_x(0.500) = -0.47942554
Remark : f(x) and f(x) + C have the same derivative
Press return to continue.