Mathc initiation/a380
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)
{
int n = 2*300;
double a = 1.;
double oo = 1000.;
clrscrn();
printf(" If S.a_n is a serie, let f(x) = a_n \n");
printf(" and let f be the function obtained \n");
printf(" by replacing n with x.\n\n");
printf(" Use the integral test to determine whether\n");
printf(" the serie converge or diverge.\n\n");
printf(" If f is a positive valued function. (verify) \n");
printf(" If f is continuous on [1,oo). (verify) \n");
printf(" If f' is negative. (verify)\n\n");
printf(" Then f is decreasing on [1,oo). \n\n");
printf(" The serie converge (diverge) if\n");
printf(" / oo\n");
printf(" |\n");
printf(" | f(x) dx = Converge (diverge)\n");
printf(" |\n");
printf(" / 1\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.:40.] [-.01:0.1]\\\n"
" atan(x)/(1+x**2)\n\n\n\n\n\n\n\n\n\n"
" reset");
stop();
clrscrn();
printf(" Compute the derivative of f when x = %0.3f\n\n", 2.);
printf(" with fx_x(%0.3f) = %0.8f\n\n\n",2., fx_x(f,2.,H));
printf(" / oo\n");
printf(" |\n");
printf(" | %s dx = %.12f\n", feq, simpson(f,a,oo,n));
printf(" |\n");
printf(" / %+.2f\n\n\n\n", a);
printf(" Converge then the serie S.a_n converge. \n\n");
stop();
return 0;
}
/* ---------------------------------- */
/* ---------------------------------- */
Exemple de sortie écran :
If S.a_n is a serie, let f(x) = a_n
and let f be the function obtained
by replacing n with x.
Use the integral test to determine whether
the serie converge or diverge.
If f is a positive valued function. (verify)
If f is continuous on [1,oo). (verify)
If f' is negative. (verify)
Then f is decreasing on [1,oo).
The serie converge (diverge) if
/ oo
|
| f(x) dx = Converge (diverge)
|
/ 1
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.:40.] [-.01:0.1]\
atan(x)/(1+x**2)
Compute the derivative of f when x = 2.000
with fx_x(2.000) = -0.14269908
/ oo
|
| atan(x)/(1+pow(x,2)) dx = 0.917339908361
|
/ +1.00
Converge then the serie S.a_n converge.
Press return to continue.