Mathc initiation/Fichiers c : c78ci
Installer et compiler ces fichiers dans votre répertoire de travail.
c01i.c |
---|
/* --------------------------------- */
/* save as c1i.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fi.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.98902740
[tanh(x)+tanh(y)] / [1-(-)tanh(x)*tanh(y)] = 0.98902740
Press return to continue.
Vérifions les égalités :
Nous savons :
sinh(x+y)
tanh(x+y) = --------
cosh(x+y)
cosh(x)sinh(y) + sinh(x)cosh(y)
= -------------------------------
cosh(x)cosh(y) + sinh(x)sinh(y)
cosh(x)sinh(y) + sinh(x)cosh(y) (1/(cosh(x)cosh(y))
= -------------------------------
cosh(x)cosh(y) + sinh(x)sinh(y) (1/(cosh(x)cosh(y))
cosh(x)sinh(y) sinh(x)cosh(y)
------------ + --------------
cosh(x)cosh(y) cosh(x)cosh(y)
= ---------------------------------
cosh(x)cosh(y) sinh(x)sinh(y)
------------ + --------------
cos(x)hcosh(y) cosh(x)cosh(y)
tanh(y) + tanh(x)
= -------------------------------
1 + tanh(x)tanh(y)
soit
tanh(y) + tanh(x)
tanh(x+y) = ----------------
1 + tanh(x)tanh(y)