Mathc initiation/001J
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c00bc |
|---|
/* --------------------------------- */
/* save as c00b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double c = 4.;
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-> [x sqrt(2x+1)]/[exp(x) cos(x)]
Df : x-> [[x sqrt(2x+1)]/[exp(x) cos(x)]] [1/x + 1/(2x+1)-1+(sin(x)/cos(x))]
Compute the derivative of f when x = 4
with Df(4.000) = -0.17449102
with fx_x(4.000) = -0.17449102
Press return to continue.
Calculons la dérivé :
Utilisons les logarithmes pour dériver y :
y = [ x sqrt(2x+1)] / [exp(x) cos(x)] avec y > 0
ln(y) = ln([ x sqrt(2x+1)] / [exp(x) cos(x)])
ln(y) = ln(x) + 1/2 ln(2x+1) - ( x + ln(cos(x)))
1/y dy/dx = [1/x + 1/(2x+1) - 1 - (-sin(x)/cos(x))]
dy/dx = y [1/x + 1/(2x+1) - 1 + sin(x)/cos(x) ]
dy/dx = [[x sqrt(2x+1)] / [exp(x) cos(x)]] [1/x + 1/(2x+1) - 1 + sin(x)/cos(x) ]