Mathc initiation/Fichiers c : c48cb


Sommaire


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

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

 clrscrn();
 printf(" The line y = a x + b              (a!=0)                \n\n");
 printf(" is an asymptote at the curve of f at oo+ (or oo-) if :\n\n\n");
 printf("  lim    f(x)                lim    [f(x)-a*x] = b      \n");
 printf("  x->+oo ----  = a    and    x->+oo                     \n");
 printf("          x                                         \n\n\n");
 printf("                            or                      \n\n\n");
 printf("  lim    f(x)                lim    [f(x)-a*x] = b      \n");
 printf("  x->-oo ----  = a    and    x->-oo                     \n");
 printf("          x                                         \n\n\n");
 stop();

 clrscrn();
 printf(" f : x-> %s\n\n\n", feq);
 printf("             lim    f(x)            \n");
 printf(" Compute :   x->+oo ----  = a       \n");
 printf("                     x          \n\n\n");

 for(i=1; i<10; i+=1)
 
     printf(" L1(%+.0f) = %5.3f  || L1(%+.0f) = %.3f\n",
     
     i*100,       f_a(i*100),
     i*1000000000,f_a(i*1000000000)     );
          
 printf("\n\n");
 printf(" The computation gives the impression of  :  a = %.3f\n\n", 
          f_a(i*1000000000)); 
 stop();

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


Fichier de commande gnuplot :
# ---------------------
# Copy and past this file into the screen of gnuplot
#
#
set zeroaxis lt 3 lw 1
set grid
 plot [-5.:5.] [-1.:10.] \
     x+1.+sqrt(x*x-3.*x+2.)
reset
# ---------------------


Exemple de sortie écran :

 The line y = a x + b              (a!=0)                

 is an asymptote at the curve of f at oo+ (or oo-) if :


  lim    f(x)                lim    [f(x)-a*x] = b      
  x->+oo ----  = a    and    x->+oo                     
          x                                         


                            or                      


  lim    f(x)                lim    [f(x)-a*x] = b      
  x->-oo ----  = a    and    x->-oo                     
          x                                         


 Press return to continue.

Exemple de sortie écran :

 f : x-> x+1.+sqrt(x*x-3.*x+2.)


             lim    f(x)            
 Compute :   x->+oo ----  = a       
                     x          


 L1(+100) = 1.995  || L1(+1000000000) = 2.000
 L1(+200) = 1.997  || L1(+2000000000) = 2.000
 L1(+300) = 1.998  || L1(+3000000000) = 2.000
 L1(+400) = 1.999  || L1(+4000000000) = 2.000
 L1(+500) = 1.999  || L1(+5000000000) = 2.000
 L1(+600) = 1.999  || L1(+6000000000) = 2.000
 L1(+700) = 1.999  || L1(+7000000000) = 2.000
 L1(+800) = 1.999  || L1(+8000000000) = 2.000
 L1(+900) = 1.999  || L1(+9000000000) = 2.000


 The computation gives the impression of  :  a = 2.000

 Press return to continue.