Mathc initiation/a280

Un livre de Wikilivres.


Sommaire


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

c00a.c
/* ------------------------------------ */
/*  Save as :   c00a.c                  */
/* ------------------------------------ */
#include  "x_hfile.h"
#include       "fa.h"
/* ------------------------------------ */
int main(void)
{
double t =   5.; // Try : 1.  2.  3.  5. 

 clrscrn();
 
 printf(" Calculate the slope of the tangent of a polar curve\n\n\n"
        " r : t-> %s  \n\n" 
        " t = %+.2f \n\n\n", req, t);
 
 printf(" x(t) = r(t) cos(t)    \n"
        " y(t) = r(t) sin(t)\n\n\n"
        
        " dy    dy/dt     r(t) cos(t) + r'(t) sin(t)      \n"
        " --  = -----  =  --------------------------      \n"
        " dx    dx/dt    -r(t) sin(t) + r'(t) cos(t)  \n\n\n");
 stop();
 
 clrscrn();
 
 printf(" r : t-> %s  \n\n" 
        " t = %+.2f \n\n\n", req, t);
  
 printf("  Compute the derivative of r when t = %0.3f\n\n"   
        "  with dy_dx(%0.3f) = %0.8f Verify -> %0.8f\n\n\n", 
          t, t, dy_dx(r, t, H), 
          
           (tan(t)-t)
                /
          (t*tan(t)+1.) );
          
          
 printf("  The equation of the tangente \n\n");          
 eq_tan(t,r);

 stop();

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


Exemple de sortie écran :

 Calculate the slope of the tangent of a polar curve


 r : t-> 1./(t)  

 t = +5.00 


 x(t) = r(t) cos(t)    
 y(t) = r(t) sin(t)


 dy    dy/dt     r(t) cos(t) + r'(t) sin(t)      
 --  = -----  =  --------------------------      
 dx    dx/dt    -r(t) sin(t) + r'(t) cos(t)  


 Press return to continue.


Exemple de sortie écran :

 r : t-> 1./(t)  

 t = +5.00 


  Compute the derivative of r when t = 5.000

  with dy_dx(5.000) = 0.52699107 Verify -> 0.52699107


  The equation of the tangente 

 0.526991069*t -0.221682343


 Press return to continue.