Sommaire


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

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

CTRL_splot w;

w.xmin = -2.0; w.xmax = +2.0,
w.ymin = -9.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 PB, the length of the tangent from P to the y axis.\n\n\n");

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

 printf(" B( 0,     %6.3f)            B(0, f(c)-c*Df(c))\n\n\n", 
        f(c)-c*Df(c));

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

 printf(" Open the file ... load \"a_main.plt\" ... with gnuplot.\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 = 0.500, the equation of the tangent is :

        y = Df(c) (x-c) + f(c) =  1.000*x -5.750


 Find PB, the length of the tangent from P to the y axis.


 P( 0.500, -5.250)            P(c, f(c))         
 B( 0,     -5.750)            B(0, f(c)-c*Df(c))


 PB = sqrt(c**2*(1+Df(c)**2)) =  0.707 


 Open the file ... load "a_main.plt" ... with gnuplot.

 Press return to continue.