Aller au contenu

Mathc initiation/Fichiers c : c49cb

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                                          \n\n");
 printf(" is an asymptote at the curve of f at oo+ (or oo-) if :\n\n\n");
 printf("  lim    f(x)  = a                                         \n");
 printf("  x->+oo                                               \n\n\n");

 printf("                            or                         \n\n\n");
 printf("  lim    f(x) = a                                          \n");
 printf("  x->-oo                                               \n\n\n");
 stop();

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

 for(i=1; i<10; i+=1)
     printf(" f(%+.0f) = %5.3f  || f(%+.0f) = %.3f\n",
     i*100,       f(i*100),
     i*1000000000,f(i*1000000000)
     );
          
 printf("\n\n");
 printf(" The computation gives the impression of  :  a = %.3f\n\n", 
          f(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 [-10.:10.] [-0.:3.] \
       2*x**2/(x**2+3.)
reset
# ---------------------


Exemple de sortie écran :

 The line y = a                                          

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


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


                            or                         


  lim    f(x) = a                                          
  x->-oo                                               


 Press return to continue.

Exemple de sortie écran :

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


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


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


 The computation gives the impression of  :  a = 2.000

 Press return to continue.