Aller au contenu

Mathc initiation/Fichiers c : c77cz

Un livre de Wikilivres.


Sommaire


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

c1zc
/* --------------------------------- */
/* save as c1z.c                     */
/* --------------------------------- */
#include "x_hfile.h"
#include      "fz.h"
/* --------------------------------- */
int main(void)
{
double x  = 1.5;
double y  = 1.3;

 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.5,1.3)   


  sin(y) + sin(x)  			        = 1.96105317
  2.*sin((x+y)/2.)*cos((x-y)/2.)) 	= 1.96105317


 Press return to continue.


Vérifions les égalités :
   posons :
     
     sin(x) + sin(y) = 2 sin( (x+y)/2 )   cos( (x-y)/2 )    
     
  Soit :  
                          = 2 sin( x/2 + y/2 ) cos( x/2 - y/2 )      
 
     Nous avons vu que :
    
     sin(x+y) = cos(x) sin(y) + sin(x) cos(y)
     cos(x-y) = cos(x) cos(y) + sin(x) sin(y)   
     
   donc  

     sin(x) + sin(y) = 2 [sin( x/2 + y/2 )]
                         [cos( x/2 - y/2 )]
     
                     = 2 [cos(x/2) sin(y/2) + sin(x/2) cos(y/2)]
                         [cos(x/2) cos(y/2) + sin(x/2) sin(y/2)]
                         
                     = 2 [cos(x/2)**2 sin(y/2)cos(y/2)  + 
                          sin(y/2)**2 sin(x/2)cos(x/2)  +
                          
                          cos(y/2)**2 sin(x/2)cos(x/2)  +
                          sin(x/2)**2 sin(y/2)cos(y/2)]                        
                         
                     
                     = 2 [cos(x/2)**2   sin(y/2)cos(y/2)  +                         
                          sin(x/2)**2   sin(y/2)cos(y/2)  +
                                                   
                          cos(y/2)**2   sin(x/2)cos(x/2)  +
                          sin(y/2)**2   sin(x/2)cos(x/2)  ]                        
                                                 
    
                                                                       cos(x)**2+sin(x)**2=1 
                         
                     =   2[ (cos(x/2)**2+sin(x/2)**2) sin(y/2)cos(y/2)) +
                               
                            (cos(y/2)**2+sin(y/2)**2) sin(x/2)cos(x/2) ) ]
                         
                         
                     =   2[ sin(y/2)cos(y/2) + sin(x/2)cos(x/2) ]   
                     
                                                                        sin(x/2) = sqrt((1-cos(x))/2)
                                                                        cos(x/2) = sqrt((1+cos(x))/2)
                                                                        
                     =   2[ sqrt((1-cos(y))/2) sqrt((1+cos(y))/2) +
                            sqrt((1-cos(x))/2) sqrt((1+cos(x))/2)  ]     


                     =   2[ sqrt( (1-cos(y))/2 (1+cos(y))/2 ) +         sqrt(x) sqrt(y) = sqrt(xy)
                            sqrt( (1-cos(x))/2 (1+cos(x))/2 )  ]
                                                                 
                                                                 
                     =   2[ sqrt( (1-cos(y))    (1+cos(y))/4) +
                            sqrt( (1-cos(x))    (1+cos(x))/4)  ] 
                                                                 
                                                                 
                     =      sqrt(  (1-cos(y)) (1+cos(y)) ) +             (x-y)(x+y) = x**2-y**2
                            sqrt(  (1-cos(x)) (1+cos(x)) )   
                            
          
                     =      sqrt(  (1-cos(y)**2)  ) +                    sin(x)**2+cos(x)**2=1  
                            sqrt(  (1-cos(x)**2)  )                      
                                                                         1-cos(x)**2 = sin(x)**2 
                                                                          
                     =      sqrt(sin(y)**2) +                             
                            sqrt(sin(x)**2)                               
                                 
                      =      sin(y) + sin(x)