Aller au contenu

Mathc initiation/Fichiers c : c78hc2

Un livre de Wikilivres.



Sommaire


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

c01c.c
/* --------------------------------- */
/* save as c1c.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fc.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)   


  cosh(x) + cosh(y) 		    	= 4.16306518
  2 cosh((x+y)/2)   cosh((x-y)/2)  	= 4.16306518  


 Press return to continue.


Vérifions les égalités : 
     cosh(x) + cosh(y) = 2 cosh( (x+y)/2 )   cosh( (x-y)/2 )     
     
      
                                                         cosh(   X  )  =  [e**X         + e**(-X)      ] / 2
                                                         cosh((x+y)/2) =  [e**((x+y)/2) + e**(-(x+y)/2)] / 2
                                                         cosh((x-y)/2) =  [e**((x-y)/2) + e**(-(x-y)/2)] / 2
                                                         
     
     cosh(x) + cosh(y) = 2 cosh( (x+y)/2 )   cosh( (x-y)/2 )      
     
     cosh(x) + cosh(y) = 2 [e**((x+y)/2)+e**(-(x+y)/2)] / 2   [e**((x-y)/2)+e**(-(x-y)/2)] / 2
     
  2[cosh(x) + cosh(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[cosh(x) + cosh(y)] =    e**x+e**y+e**(-y)+e**(-x)      
     
  2[cosh(x) + cosh(y)] =    e**x+e**(-x) + e**y+e**(-y) 
  
    cosh(x) + cosh(y)  =    [e**x+e**(-x)]/2 + [e**y+e**(-y)]/2  
    
    cosh(x) + cosh(y)  =    cosh(x) + cosh(y)