Gauss-Legendre,Simpson‘s 1/3 Rule,ROMBERG INTEGRATION을 이용한 연습문제풀이 및 코딩프로그램
- 최초 등록일
- 2008.03.21
- 최종 저작일
- 2007.03
- 9페이지/ 한컴오피스
- 가격 1,000원
소개글
Gauss-Legendre,Simpson‘s 1/3 Rule,ROMBERG INTEGRATION을 이용한 연습문제풀이 및 코딩프로그램이 들어 있는 A+ 레포트 입니다.^^
목차
없음
본문내용
Problem 1
Use Romberg integration to evaluate to an accuracy of . Your result should be presented in the form of Fig.22.3
Comments
이번 문제는 ROMBERG INTEGRATION을 이용하여 푸는 문제였다. 이 방 법은 연속적으로 TRAPEZOIDAL RULE을 적용하는 것에 근거를 두고 구하 는 방법인데 위의 문제를 풀어본 결과 ROMBERG INTEGRATION을 이용함 으로써 상대 오차가 TRAPEZOIDAL RULE을 이용한 것에 비해 훨씬 작아 지는 값을 얻게 된다. 즉, 오차 O()를 갖는 두 개의 TRAPEZOIDAL RULE을 조합시킴으로 인해 오차 O()를 갖는 제3의 추정값을 얻는 방법 이다. 이런 조합의 방법으로 오차 O() ,오차 O()의 정확도를 갖는 추 정값을 얻음으로 인해 정확한 참값을 수가 있다.
#include
#include < stdlib.h >
#include
void Composite_int(int, double, double);
double f(double);
void main()
{
double a, b; int n;
printf("n구간 [a , b]는? ");
scanf("%lf %lf", &a, &b);
printf("소구간의 개수 n(짝수)은? ");
scanf("%d", &n);
Composite_int(n, a, b);
return;
}
void Composite_int(int n, double a, double b)
{
double h,approx, sum, sum2; int m, i;
h=(b-a)/n;
printf("n Multiple-Application Trapezoidal : ");
sum=0.;
for(i=1; i sum=sum+f(a+i*h);
approx=h*(f(a)+2*sum+f(b))/2.;
printf("%lfn", approx);
if(fmod(n,2)!=0)
{
참고 자료
없음