Aller au contenu

Mathc initiation/a388

Un livre de Wikilivres.


Sommaire


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

c00c.c
/* ---------------------------------- */
/* save as c00c.c                     */
/* ---------------------------------- */
#include "x_afile.h"
#include      "fc.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<7; 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.\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]\
  (8.*x**2 - 7) / (exp(x)*(x+1)**2),\
  1./exp(x)

  reset

 Press return to continue.

Exemple de sortie écran :

 a_n : n-> (8.*n**2 - 7) / (exp(x)*(n+1)**2)

 b_n : n-> 1./exp(n)

 c_n : n-> a_n/b_n

 c_1 = 0.250 || c_10 = 6.553719 || c_100 = 7.84168219
 c_2 = 2.778 || c_20 = 7.240363 || c_200 = 7.92042276
 c_3 = 4.062 || c_30 = 7.484912 || c_300 = 7.94685489
 c_4 = 4.840 || c_40 = 7.610351 || c_400 = 7.96010597
 c_5 = 5.361 || c_50 = 7.686659 || c_500 = 7.96806786
 c_6 = 5.735 || c_60 = 7.737974 || c_600 = 7.97338047


 Press return to continue.


Exemple de sortie écran :

 a_n : n-> (8.*pow(n,2)-7) / (exp(n)*pow(n+1,2))  

 b_n : n-> 1./exp(n)


 Since S.b_n is a convergence geometric series .

 It follows from the theorem that S.a_n is     

 also converge.                              


 Press return to continue.