Sommaire


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

c00a5.c
/* ---------------------------------- */
/* save as c00a5.c                    */
/* ---------------------------------- */
#include  "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double c = 1;

CTRL_splot w;

w.xmin = -2.0; w.xmax = +3.0,
w.ymin = -6.0; w.ymax = +2.0;

 clrscrn();
 
 printf("  f : x-> %s\n\n", feq);
 printf("  Df: x-> %s\n\n\n",Dfeq);

 printf(" With c = %0.3f, the equation of the tangent is :\n\n",c);
 printf("       y =  Df(c) (x-c) + f(c) = ");
 
 eq_Tan(  c,
          f,Df);

 printf("\n\n\n"
        " Find PA, the length of the tangent from P to the x axis.\n\n");

 printf(" P(%6.3f, %6.3f)           P(c, f(c))       \n", 
          c,f(c));

 printf(" A(%6.3f, 0)                A(c-f(c)/Df(c), 0)\n\n\n",
          c-(f(c)/Df(c)));

 printf(" PA =  sqrt(f(c)**2*(1 +(1/Df(c)**2))) = %6.3f\n\n\n", 
          sqrt(pow(f(c),2)*(1+(1/pow(Df(c),2)))));
                                                
       G_TanPx ( w,      
                 c,
                 f,feq,Df);

 printf("\n\n"
        " With gnuplot... load \"a_main.plt\"\n\n"); 
 stop();

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



Exemple de sortie écran :
  f : x-> 3.0*x**2 - 2.0*x - 5.0

  Df: x-> 6.0*x - 2.0


 With c = 1.000, the equation of the tangent is :

       y =  Df(c) (x-c) + f(c) =  4.000*x -8.000


 Find PA, the length of the tangent from P to the x axis.

 P( 1.000, -4.000)           P(c, f(c))       
 A( 2.000, 0)                A(c-f(c)/Df(c), 0)


 PA =  sqrt(f(c)**2*(1 +(1/Df(c)**2))) =  4.123




 With gnuplot... load "a_main.plt"

 Press return to continue.