Aller au contenu

Mathc initiation/Fichiers c : c49cc

Un livre de Wikilivres.


Sommaire


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

c02c.c
/* ---------------------------------- */
/* save as c02c.c                     */
/* ---------------------------------- */
#include "x_hfile.h"
#include       "fa.h"
/* ---------------------------------- */
int main(void)
{
double Lf = f(1000000000); 

 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");
 getchar();
 
 clrscrn(); 
 printf(" f : x-> %s\n\n\n", feq);
 printf("       a =  lim    f(x)       = %.3f\n", Lf); 
 printf("            x->+oo            \n\n\n");

 printf(" The line y = %.3f ", Lf);
 printf(" is an horizontal asymptote at the curve of f at +oo \n\n\n"); 
 
 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.),\
         2
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


Exemple de sortie écran :

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


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


 The line y = 2.000  is an horizontal asymptote at the curve of f at +oo 


 Press return to continue.