Mathc initiation/Fichiers c : c78cj
Installer et compiler ces fichiers dans votre répertoire de travail.
c01j.c |
---|
/* --------------------------------- */
/* save as c1j.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fj.h"
/* --------------------------------- */
int main(void)
{
double x = 1.2;
double y = 1.4;
clrscrn();
printf(" x = %0.1f \n",x);
printf(" y = %0.1f \n\n\n",y);
printf(" %s \t\t\t\t\t= %0.8f\n",f1eq, f1(x,y));
printf(" %s \t= %0.8f\n\n\n", f2eq, f2(x,y));
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Vérifions par le calcul :
x = 1.2
y = 1.4
tanh(x-y) = -0.19737532
[tanh(x)-tanh(y)] / [1+(-)tanh(x)*tanh(y)] = -0.19737532
Press return to continue.
Vérifions les égalités :
Nous savons :
sinh(x-y)
tanh(x-y) = --------
cosh(x-y)
sinh(x)cosh(y)-cosh(x)sinh(y)
= -----------------------------
cosh(x)cohs(y)-sinh(x)sinh(y)
sinh(x)cosh(y)-cosh(x)sinh(y) (1/(cosh(x)cosh(y))
= -------------------------
cosh(x)cosh(y)-sinh(x)sinh(y) (1/(cosh(x)cosh(y))
sinh(x)cosh(y) cosh(x)sinh(y)
-------------- - --------------
cosh(x)cosh(y) cosh(x)cosh(y)
= ---------------------------------
cosh(x)cosh(y) sinh(x)sinh(y)
-------------- - --------------
cosh(x)cosh(y) cosh(x)cosh(y)
tanh(x) - tanh(y)
= -----------------------------
1 - tanh(x)tanh(y)
soit
tanh(x) - tanh(y)
tanh(x-y) = ------------------
1 - tanh(x)tanh(y)