Aller au contenu

Mathc initiation/Fichiers c : c56cb

Un livre de Wikilivres.


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 [-8.:8.] [-10.:5.] \
           (x-1)**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)**3/x**2)


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


 L1(+100) = 0.970  || L1(+1000000000) = 1.000
 L1(+200) = 0.985  || L1(+2000000000) = 1.000
 L1(+300) = 0.990  || L1(+3000000000) = 1.000
 L1(+400) = 0.993  || L1(+4000000000) = 1.000
 L1(+500) = 0.994  || L1(+5000000000) = 1.000
 L1(+600) = 0.995  || L1(+6000000000) = 1.000
 L1(+700) = 0.996  || L1(+7000000000) = 1.000
 L1(+800) = 0.996  || L1(+8000000000) = 1.000
 L1(+900) = 0.997  || L1(+9000000000) = 1.000


 The computation gives the impression of  :  a = 1.000

 Press return to continue.