Mathc initiation/Fichiers c : c77cal

Un livre de Wikilivres.


Sommaire


Installer et compiler ces fichiers dans votre répertoire de travail.

c01l.c
/* --------------------------------- */
/* save as c1l.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fl.h"
/* --------------------------------- */
int main(void)
{
double x  = 0.8;      

 clrscrn();

 
 printf("  %s \t\t= %0.8f    \n", f1eq, f1(x));
 printf("  %s \t= %0.8f  \n\n\n", f2eq, f2(x));
 
 stop();

 return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */


Vérifions par le calcul :
  cos(atan(x)) 		= 0.78086881    
  1/sqrt(1+x**2) 	= 0.78086881  


 Press return to continue.


Vérifions les égalités :
  Posons :
    
               y =     atan(x)         (1)    
          tan(y) = tan(atan(x))                            
   sin(y)/cos(y) =          x      
                
          sin(y) = x cos(y)            (2)
    

  Nous savons :
              
         sin(y)**2 + cos(y)**2 = 1           
                                
                                
 Introduisons (2)    sin(y) = x cos(y)  
 
 
     (x cos(y))**2 + cos(y)**2 = 1 
 
   (x**2 cos(y)**2) + cos(y)**2 = 1 
 
 
 Factorisons cos(y)**2
 
    cos(y)**2 (x**2+1) = 1
        
    cos(y)**2          = 1/    (x**2+1)
                                
    cos(y)             = 1/sqrt(x**2+1)
    
    
 Introduisons (1)  y = atan(x)
    
    cos(atan(x))    = 1/sqrt(x**2+1)