Mathc initiation/Fichiers c : c77cq
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c1q.c |
---|
/* --------------------------------- */
/* save as c1q.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fq.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= %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
tan(x+y) = -0.60159661
(tan(y)+tan(x))/(1-tan(x)*tan(y)) = -0.60159661
Press return to continue.
Vérifions les égalités :
Nous avons vu que :
sin(x+y)
tan(x+y) = --------
cos(x+y)
cos(x)sin(y)+sin(x)cos(y)
= -------------------------
cos(x)cos(y)-sin(x)sin(y)
cos(x)sin(y)+sin(x)cos(y) (1/(cos(x)cos(y))
= -------------------------
cos(x)cos(y)-sin(x)sin(y) (1/(cos(x)cos(y))
cos(x)sin(y) sin(x)cos(y)
------------ + ------------
cos(x)cos(y) cos(x)cos(y)
= -----------------------------
cos(x)cos(y) sin(x)sin(y)
------------ - ------------
cos(x)cos(y) cos(x)cos(y)
tan(y) + tan(x)
= -----------------------------
1 - tan(x)tan(y)
soit
tan(x) + tan(y)
tan(x+y) = ----------------
1 - tan(x)tan(y)