Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Introduccin
INTEGRACIN
Para esto empleamos el polinomio de interpolacin de NewtonLagrange o de Diferencias Divididas de grado1, es decir, una recta.
Ejercicio:
Calcular:
b=0.8
f(x)=0.2+25x-200x2+675x3-900x4+400x5
f(a)=f(0)=0.2+25(0)-200(0)2+675(0)3-900(0)4+400(0)5
f(a)=0.2
f(b)=f(0.8)=0.2+25(0.8)-200(0.8)2+675(0.8)3-900(0.8)4+400(0.8)5
f(b)=0.232
2 intervalos
Ejercicio:
Calcular
Utilizando la regla de Simpson de 1/3 simple.
Solucin:
f(x)
0.5
30.26
915.65
Particin en subintervalos
/*
PROGRAMA PARA APROXIMAR EL AREA BAJO LA CURVA DE UNA FUNCION
POR EL METODO SIMPSON COMPUESTO, USANDO 2, 4, 8, ... 1024
SUBINTERVALOS.
DESCRIPCION DE VARIABLES :
N
A
B
AREA
AV
NUMERO DE SUBINTERVALOS.
LIMITE INFERIOR.
LIMITE SUPERIOR.
APROXIMACION OBTENIDA.
VALOR VERDADERO DE LA INTEGRAL (DE TABLAS).
*/
void Simpson_13();
void Lee_Datos();
double Av,A,B,Eror,Area;
int
N,J,Respuesta;
main()
{
/* Principal */
Av=0.682;
Lee_Datos();
printf("
APROXIMACION DEL AREA BAJO LA FUNCION\n");
printf("
F(X)=1/SQR(2*3.14159)*EXP(-X^2/2)\n");
printf("
DESDE X= %6.2f HASTA X= %6.2f\n ",A,B);
if (Respuesta == 1)
printf("
N
APROXIMACION AL AREA
ERROR EN %\n");
else
printf("
APROXIMACION AL AREA\n");
SE CAMBIA EL VALOR DE N.
*/
N=2*N;
}
if (Respuesta == 1)
printf("
EL VALOR VERDADERO DE LA INTEGRAL ES : %10.4f\n",Av);
getch();
double F(double X)
{
return(1/sqrt(2*3.14159)*exp(-X*X/2));
}
void Lee_Datos()
{
/*Las siguientes instrucciones permiten leer los datos desde el teclado
*/
clrscr();
printf("Desea correr el programa con :\n");
printf("1.- Datos del ejemplo 6.7\n");
A ");
B ");
B=1;
}
}
void Simpson_13()
{
double X,S1,S2,H;
int I;
X=A;
/*
S1=0;
S2=0;
H=(B-A)/N;
if (N==2) ;
else
/* SE USA UN CICLO ITERATIVO PARA EVALUAR LA FUNCION EN
LOS PUNTOS INTERMEDIOS.
*/