Mathc initiation/a387
Installer et compiler ces fichiers dans votre répertoire de travail.
c00b.c |
---|
/* ---------------------------------- */
/* save as c00b.c */
/* ---------------------------------- */
#include "x_afile.h"
#include "fb.h"
/* ---------------------------------- */
int main(void)
{
double i;
clrscrn();
printf(" Limit comparison test. \n\n\n");
printf(" Let S.a_n and S.b_n be positive-term series. \n\n");
printf(" If there is a positive real number c such that \n\n\n");
printf(" lim n->oo (a_n/b_n) = c >0 \n\n\n");
printf(" The either both series converge or both series diverge.\n\n");
stop();
clrscrn();
printf("# Copy and past this file into the screen of gnuplot\n\n"
" set zeroaxis lt 3 lw 1\n"
" set grid\n"
" plot [0.:20.] [-.01:0.1]\\\n"
" %s,\\\n"
" %s\n\n"
" reset\n\n",a_xeq, b_xeq);
stop();
clrscrn();
printf(" a_n : n-> %s\n\n", a_neq);
printf(" b_n : n-> %s\n\n", b_neq);
printf(" c_n : n-> a_n/b_n\n\n");
for(i=1; i<10; i++)
printf(" c_%.0f = %5.3f || c_%.0f = %5.6f || c_%.0f = %5.8f\n",
i, a_n(i)/b_n(i),
i*10, a_n(i*10)/b_n(i*10),
i*100,a_n(i*100)/b_n(i*100) );
printf("\n\n");
stop();
clrscrn();
printf(" a_n : n-> %s \n\n", a_neq);
printf(" b_n : n-> %s\n\n\n", b_neq);
printf(" Since S.b_n is a convergence geometric series (r=n<1).\n\n");
printf(" It follows from the theorem that S.a_n is \n\n");
printf(" also converge. \n\n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
Limit comparison test.
Let S.a_n and S.b_n be positive-term series.
If there is a positive real number c such that
lim n->oo (a_n/b_n) = c >0
The either both series converge or both series diverge.
Press return to continue.
Exemple de sortie écran :
# Copy and past this file into the screen of gnuplot
set zeroaxis lt 3 lw 1
set grid
plot [0.:20.] [-.01:0.1]\
(3*x**2 + 5*x) / ((2**x)*x**2 + 2**x),\
1/2**x
reset
Press return to continue.
Exemple de sortie écran :
a_n : n-> (3*n**2 + 5*n) / ((2**n)*n**2 + 2**n)
b_n : n-> 1/2**n
c_n : n-> a_n/b_n
c_1 = 4.000 || c_10 = 3.465347 || c_100 = 3.04969503
c_2 = 4.400 || c_20 = 3.241895 || c_200 = 3.02492438
c_3 = 4.200 || c_30 = 3.163152 || c_300 = 3.01663315
c_4 = 4.000 || c_40 = 3.123048 || c_400 = 3.01248117
c_5 = 3.846 || c_50 = 3.098760 || c_500 = 3.00998796
c_6 = 3.730 || c_60 = 3.082477 || c_600 = 3.00832498
c_7 = 3.640 || c_70 = 3.070802 || c_700 = 3.00713672
c_8 = 3.569 || c_80 = 3.062022 || c_800 = 3.00624530
c_9 = 3.512 || c_90 = 3.055178 || c_900 = 3.00555184
Press return to continue.
Exemple de sortie écran :
a_n : n-> (3.*pow(n,2.)+5.*n) / (pow(2.,n)*pow(n,2.)+pow(2.,n))
b_n : n-> 1./pow(2.,n)
Since S.b_n is a convergence geometric series (r=n<1).
It follows from the theorem that S.a_n is
also converge.
Press return to continue.