Mathc initiation/Fichiers c : c30cg


Sommaire


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

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

 clrscrn();
 printf(" Does lim x->0 %s exist ?\n\n", feq);
 printf(" Substituing 0 for x gives 0/0.\n");
 stop();


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

 printf(" Approximate f(x) by the right,\n");
 printf(" for x near 0.\n\n");

 for(i=1; i>0.1; i+=-.1)
     printf(" f(%+.1f) = %5.3f || f(%+.2f) = %5.6f || f(%+.3f) = %5.8f\n",
     i,    f(i),
     i*.1, f(i*.1),
     i*.01,f(i*.01)
     );
 stop();


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

 printf(" Approximate f(x) by the left,\n");
 printf(" for x near 0.\n\n");

 for(i=-1; i<-0.1; i+=.1)
     printf(" f(%+.1f) = %5.3f || f(%+.2f) = %5.6f || f(%+.3f) = %5.8f\n",
     i,    f(i),
     i*.1, f(i*.1),
     i*.01,f(i*.01)
     );
  stop();


 clrscrn();
 printf(" With the table we arrive at the following conjecture.\n\n");
 printf("     lim x->0 %s = 1\n\n", feq);
 stop();

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


On peut obtenir le même résultat en utilisant la Règle de L'Hôpital. [wikipedia].

  (tan(x))'/(x)' = sec**2(x)/1 et lim x->0 sec**2(x) = 1 
  Remarque :
 (tan(A*x))'/(B*x)' = A*sec**2(A*x)/B et lim x->0 A*sec**2(A*x)/B = A*sec**2(A*0)/B = A/B 


Exemple de sortie écran :

 Does lim x->0 tan(x)/x exist ?

 Substituing 0 for x gives 0/0.
 Press return to continue. 


****************************


 f : x-> tan(x)/x

 Approximate f(x) by the right,
 for x near 0.

 f(+1.0) = 1.557 || f(+0.10) = 1.003347 || f(+0.010) = 1.00003333
 f(+0.9) = 1.400 || f(+0.09) = 1.002709 || f(+0.009) = 1.00002700
 f(+0.8) = 1.287 || f(+0.08) = 1.002139 || f(+0.008) = 1.00002133
 f(+0.7) = 1.203 || f(+0.07) = 1.001637 || f(+0.007) = 1.00001633
 f(+0.6) = 1.140 || f(+0.06) = 1.001202 || f(+0.006) = 1.00001200
 f(+0.5) = 1.093 || f(+0.05) = 1.000834 || f(+0.005) = 1.00000833
 f(+0.4) = 1.057 || f(+0.04) = 1.000534 || f(+0.004) = 1.00000533
 f(+0.3) = 1.031 || f(+0.03) = 1.000300 || f(+0.003) = 1.00000300
 f(+0.2) = 1.014 || f(+0.02) = 1.000133 || f(+0.002) = 1.00000133
 f(+0.1) = 1.003 || f(+0.01) = 1.000033 || f(+0.001) = 1.00000033
 Press return to continue. 


****************************


 f : x-> tan(x)/x

 Approximate f(x) by the left,
 for x near 0.

 f(-1.0) = 1.557 || f(-0.10) = 1.003347 || f(-0.010) = 1.00003333
 f(-0.9) = 1.400 || f(-0.09) = 1.002709 || f(-0.009) = 1.00002700
 f(-0.8) = 1.287 || f(-0.08) = 1.002139 || f(-0.008) = 1.00002133
 f(-0.7) = 1.203 || f(-0.07) = 1.001637 || f(-0.007) = 1.00001633
 f(-0.6) = 1.140 || f(-0.06) = 1.001202 || f(-0.006) = 1.00001200
 f(-0.5) = 1.093 || f(-0.05) = 1.000834 || f(-0.005) = 1.00000833
 f(-0.4) = 1.057 || f(-0.04) = 1.000534 || f(-0.004) = 1.00000533
 f(-0.3) = 1.031 || f(-0.03) = 1.000300 || f(-0.003) = 1.00000300
 f(-0.2) = 1.014 || f(-0.02) = 1.000133 || f(-0.002) = 1.00000133
 f(-0.1) = 1.003 || f(-0.01) = 1.000033 || f(-0.001) = 1.00000033
 Press return to continue. 


****************************


 With the table we arrive at the following conjecture.

     lim x->0 tan(x)/x = 1

 Press return to continue.