Mathc initiation/Fichiers c : c30cb
Apparence
Installer et compiler ces fichiers dans votre répertoire de travail.
c2b.c |
---|
/* --------------------------------- */
/* save as c2b.c */
/* --------------------------------- */
#include "x_hfile.h"
#include "fb.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) = %8.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) = %8.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 = -6\n\n", feq);
stop();
return 0;
}
/* --------------------------------- */
On peut obtenir le même résultat en utilisant la Règle de L'Hôpital. [wikipedia].
(sin(x)-7*x )'/(x*cos(x))' = (cos(x)-7)/(cos(x)-x*sin(x)) et lim x->0 (cos(x)-7)/(cos(x)-x*sin(x)) = (1 -7)/(1-1*0) = -6
Exemple de sortie écran :
Does lim x->0 ( sin(x)-7*x ) / (x*cos(x) ) exist ?
Substituing 0 for x gives 0/0.
Press return to continue.
Exemple de sortie écran :
f : x-> ( sin(x)-7*x ) / (x*cos(x) )
Approximate f(x) by the right,
for x near 0.
f(+1.0) = -11.398 || f(+0.10) = -6.031800 || f(+0.010) = -6.00031668
f(+0.9) = -9.861 || f(+0.09) = -6.025737 || f(+0.009) = -6.00025651
f(+0.8) = -8.760 || f(+0.08) = -6.020321 || f(+0.008) = -6.00020267
f(+0.7) = -7.949 || f(+0.07) = -6.015549 || f(+0.007) = -6.00015517
f(+0.6) = -7.341 || f(+0.06) = -6.011417 || f(+0.006) = -6.00011400
f(+0.5) = -6.884 || f(+0.05) = -6.007925 || f(+0.005) = -6.00007917
f(+0.4) = -6.543 || f(+0.04) = -6.005070 || f(+0.004) = -6.00005067
f(+0.3) = -6.296 || f(+0.03) = -6.002851 || f(+0.003) = -6.00002850
f(+0.2) = -6.129 || f(+0.02) = -6.001267 || f(+0.002) = -6.00001267
f(+0.1) = -6.032 || f(+0.01) = -6.000317 || f(+0.001) = -6.00000317
Press return to continue.
Exemple de sortie écran :
f : x-> ( sin(x)-7*x ) / (x*cos(x) )
Approximate f(x) by the left,
for x near 0.
f(-1.0) = -11.398 || f(-0.10) = -6.031800 || f(-0.010) = -6.00031668
f(-0.9) = -9.861 || f(-0.09) = -6.025737 || f(-0.009) = -6.00025651
f(-0.8) = -8.760 || f(-0.08) = -6.020321 || f(-0.008) = -6.00020267
f(-0.7) = -7.949 || f(-0.07) = -6.015549 || f(-0.007) = -6.00015517
f(-0.6) = -7.341 || f(-0.06) = -6.011417 || f(-0.006) = -6.00011400
f(-0.5) = -6.884 || f(-0.05) = -6.007925 || f(-0.005) = -6.00007917
f(-0.4) = -6.543 || f(-0.04) = -6.005070 || f(-0.004) = -6.00005067
f(-0.3) = -6.296 || f(-0.03) = -6.002851 || f(-0.003) = -6.00002850
f(-0.2) = -6.129 || f(-0.02) = -6.001267 || f(-0.002) = -6.00001267
f(-0.1) = -6.032 || f(-0.01) = -6.000317 || f(-0.001) = -6.00000317
Press return to continue.
Exemple de sortie écran :
With the table we arrive at the following conjecture.
lim x->0 ( sin(x)-7*x ) / (x*cos(x) ) = -6
Press return to continue.