Mathc initiation/Fichiers c : c78hd2



Sommaire


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

c01d.c
/* --------------------------------- */
/* save as c1d.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fd.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) 			        = -0.54175405
  2 sinh( (x+y)/2 )   sinh( (x-y)/2 ) 	= -0.54175405  


 Press return to continue.


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