Mathc initiation/Fichiers c : c78hb2
Installer et compiler ces fichiers dans votre répertoire de travail.
c01b.c |
---|
/* --------------------------------- */
/* save as c1b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.h"
/* --------------------------------- */
int main(void)
{
double x = 1.2;
double y = 1.5;
clrscrn();
printf(" (x,y) = (%0.1f,%0.1f) \n\n\n",x,y);
printf(" %s \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,y) = (1.2,1.5)
sinh(x) - sinh(y) = -0.61981810
2 cosh((x+y)/2) sinh((x-y)/2) = -0.61981810
Press return to continue.
Vérifions les égalités :
sinh(x) - sinh(y) = 2 cosh( (x+y)/2 ) sinh( (x-y)/2 )
sinh( X ) = [e**X - e**(-X) ] / 2
sinh((x-y)/2) = [e**((x-y)/2) - e**(-(x-y)/2)] / 2
cosh( X ) = [e**X + e**(-X) ] / 2
cosh((x+y)/2) = [e**((x+y)/2) + e**(-(x+y)/2)] / 2
sinh(x) - sinh(y) = 2 cosh( (x+y)/2 ) sinh( (x-y)/2 )
sinh(x) - sinh(y) = 2 [e**((x+y)/2) + e**(-(x+y)/2)]/2 [e**((x-y)/2) - e**(-(x-y)/2)]/2
2[sinh(x) - sinh(y)] = [e**((x+y)/2) + e**(-(x+y)/2)] [e**((x-y)/2) - e**(-(x-y)/2)]
(x+y)/2 + (x-y)/2 = x
(x+y)/2 + (-(x-y)/2)) = y
-(x+y)/2) + (x-y)/2 = -y
-(x+y)/2) + (-(x-y)/2) = -x
2[sinh(x) - sinh(y)] = e**x-e**y+e**(-y)-e**(-x)
2[sinh(x) - sinh(y)] = e**x-e**(-x) - e**y+e**(-y)
2[sinh(x) - sinh(y)] = e**x-e**(-x) - [e**y-e**(-y)]
sinh(x) - sinh(y) = [e**x-e**(-x)]/2 - [e**y-e**(-y)]/2
sinh(x) - sinh(y) = sinh(x) - sinh(y)