Aller au contenu

Mathc initiation/a349

Un livre de Wikilivres.


Sommaire


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

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

CTRL_splot w;

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

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

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

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

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


Résultat dans gnuplot
Tangente01
Exemple de sortie écran :
  f : x->  cos(x)

  f': x->  (-sin(x)) 


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

       y = f'(c) (x-c) + f(c) =  -0.841*x +1.382

 With gnuplot... load "a_main.plt"

 Press return to continue.