Você está na página 1de 7

A PROPOSED ALGORITHM FOR NUMERIC AND SCIENTIFIC COMPUTATION

Mohd. Sadiq, M. Sarosh Umar#, Jawed Ahmad, and Shahnawaz Husain


Computer Engineering Section, University Polytechnic, Faculty of Engineering and Technology, Jamia Millia Islamia (A Central University), Jamia Nagar, New Delhi-110025.(India) E-mail: msq_delhi @ yahoo.co.in # Department of Computer Engineering, Zakir Husain College of Engineering and Technology, Aligarh Muslim University, Aligarh 202002. U.P. (India) E-mail: sarosh.umar@gmail.com

ABSTRACT
The requirement for numerical algorithms range from basic numerical building blocks to advanced specialized optimization techniques. With the growth in the importance of using computers to carry out numerical procedures in solving mathematical models of the world, and area known as scientific computing or computational science has taken shape during the 1980s and 1990s. This area looks at the use of numerical analysis from a computer science perspective; it is concerned with using the most powerful tools of numerical analysis, computer graphics, symbolic mathematical computations, and graphical user interfaces to make it easier for a user to set up solve and interpret complicated mathematical models of the real world. We know that the flowchart and the algorithm are two key terms that are used to solve any numerical and nonnumerical problems. So in this paper we have designed a new numerical algorithm for the solution of definite integral, which can also be solved by means of Newton Cotes closed integration formulae i.e. Trapezoidal rule, Simpsons 1/3 rule, Simpsons 3/8 rule, Booles rule and Weddles rule. In this paper we have considered two integrals and solved it with the help of proposed algorithm and Newton Cotes closed integration formulae. And as a result we have shown that the proposed algorithm is much better than the Newton Cotes closed integration formulae.

Key words and Phrases: Algorithm, Integrals, Newton- Gregory forward difference formula. 1. Introduction
The rapid development of high speed digital computers and the increasing desire for numerical answers to applied problems have led to enhanced demands with the methods and techniques of numerical analysis. Although numerical methods have always been useful and their role in the present day scientific research is of fundamental importance. One reason for this is that numerical methods can give the solution when ordinary analytical methods fail, for example in finding the roots of transcendental equations, or in solving nonlinear differential equations. It is

therefore clear that training in applied science or engineering would be incomplete without an adequate understanding of numerical methods. Numerical analysis is the area of mathematics and computer science that creates, analyzes and implements algorithms for solving numerically the problems of continuous mathematics. Such problems originate generally from real world applications of algebra, geometry and calculus and they involve variables which vary continuously, these problems occur throughout the natural sciences, social sciences engineering medicine and business. During the past half century the growth in power and availability of digital computers has led to an increasing use of realistic mathematical models in science and engineering and numerical analysis of increasing sophistication has been needed to solve these more detailed mathematical models of the world. The formal academic area of numerical analysis varies from quite theoretical mathematical studies to computer science issues. Section 2 of this paper describes the common perspective in numerical analysis and its algorithm. Section 3 of this paper contains the information about the existing numerical algorithm. Section 4 presents the derivation of the proposed algorithm, in section 5 we have considered two example and finally section 6 conclude the paper.

2.

Common Perspectives in Numerical Analysis and its Algorithms

Numerical analysis is concerned with all aspects of the numerical solution of a problem, from the theoretical development and understanding of numerical methods to their practical implementation as reliable and efficient computer programs. Most numerical analysts specialize in small sub areas but they share some common concerns, perspectives and mathematical methods of analysis. This includes the following:When presented with a problem that cannot be solved directly then replace it with a nearby problem which can be solved more easily. Examples are the use of interpolation in developing numerical integration methods and root finding methods. There is widespread use of the language and results of linear algebra, real analysis and functional analysis (with its simplifying notation of norms, vector spaces and operators). Numerical analysis and mathematical modeling have become essential in many areas of modern life. Sophisticated numerical analysis software is being embedded in popular software packages e.g. spread sheet programs allowing many people to perform modeling even when they are unaware of the mathematics involved in the process. This requires creating problem solving environments (PSE) in which it is relatively easy to model a given situation. The PSE for a given problem area is usually based on excellent theoretical mathematical models made available to the user through a convenient graphical user interface. Such software tools are well advanced in some areas, e.g. computer aided design of structures, while other areas are still grappling with the more

basic problems of creating accurate mathematical models and accompanying tools for their solution e.g. atmospheric modeling.

3 Existing Numerical Algorithms


So far as the techniques of numerical integration are concerned, the following formulae in the simplest form are fairly well known in the literature of Numerical Analysis[1-10].

1. 2. 3. 4. 5.

I= f(x)dx =(h/2)*(f0 + f1), the lower and upper limit of this integral are x0 and x1 respectively or Trapezoidal Rule. I= f(x)dx)=(h/3)*(f0+4f1+f2) the lower and upper limit of this integral are x0 and x2 respectively or Simpsons, 1/3 Rule . I= f(x)dx)= (3h/8)*(f0+3f1+3f2+f3) the lower and upper limit of this integral are x0 and x3 respectively or Simpsons 3/8 Rule. I= f(x)dx=(2h/45)*(7f0+32f1+12f2+32f3+7f4) the lower and upper limit of this integral are x0 and x4 respectively or Booless Rule. I=f(x)=h/140*(41f0+216f1+27f2 +272f3+27f4+216f5+41f6) the lower and upper limit of this integral are x0 and x6 respectively or Weddles Rule.

In the continuation of earlier work, we obtain one more quadrature formula for nine equally spaced points in the following form. I= f(x)dx= (4h/14175)(989f0+ 5888f1 - 928f2 +10496f3 - 4540f4 + 10496f5 - 928f6 + 5888f7+ 989f8) the lower and upper limit of this integral are x0 and x8 respectively.

4. Derivation and Proposed Algorithm. 4.1 Derivation


Consider the following integral I =h f(x)dx , where the lower and upper limits of the integral are 0 and 8 respectively , and x 8 =x0+8h. Now using the well-known Newton Gregory forward difference formula for nine equally spaced points, we get I=f(x)dx = h [ f0+pf0+(p(p-1)/2!) 2f0 + (p(p-1)(p-2)/3!) 3 f0 +(p(p-1)(p-2)(p-3)/4!) 4f0 + (p(p-1)(p-2)(p-3)(p-4)/5!) 5f0 +(p(p-1)(p-2)(p-3)(p-4)(p-5)/6!) 6 f0 +( p(p-1)(p-2)(p-3)(p-4)(p-5) (p-6)/7!) 7 f0 + (p(p-1)(p-2)(p-3)(p-4)(p-5)(p-6)(p-7)/8!) 8 f0] dx. I=f(x)dx = h [ f0+pf0+{(p2-p)/2)} 2f0 +{(p3-3p2+2p)/6}3 f0 + {(p4-6p3+11p2- 6p)/24} 4f0 + {(p5- 10p4+ 35p3- 50p2 + 24p)/120} 5f0 + {(p6-15p5+ 85p4 - 225p3 + 274p2 - 120p )/720} 6 f0 + { (

p7 - 21p6 + 175p5 - 735p4 + 1624p3- 1764p2 + 720p )/5040} 7 f0 + {(p8- 28p7+ 322p6- 1960p5 + 6769p4 -13132p3 +13068p2- 5040p) /40320} 8 f0] dx. I=h[8f0+ 32f0 + (208/3)2 f0 + 963 f0+ (3928/45)4 f0+ (2336/45)5 f0 + (36256/1890)6 f0 + (736/189)7 f0+ (3956/14175) 8 f0] After putting the value of the forward differences, we get I=h[8f0 +32(f1- f0 ) + (208/3)(f2 -2f1 +f0 ) + 96 (f3 -3f2 +3f1 f0)+ (3928/45) (f4 - 4f3 + 6f2 - 4f1 +f0) + (2336/45) (f5 -5f4 +10f3 10f2 +5f1 f0) + (36256/1890) (f6 + 6f5 +15f4 - 20f3 +15f2 - 6f1 + f0 )+ (736/189) ( f7 - 7f6 + 21f5 -35f4 + 35f3 -21f2 +7f1 - f0 ) + (3956/14175) ( f8- 8f7 + 28f6 -56f5 +70f4 56f3 +28f2 - 8f1 + f0 ] After simplification we get the following quadrature formula I= f(x)dx= (4h/14175)(989f0+ 5888f1 - 928f2 +10496f3 - 4540f4 + 10496f5 - 928f6 + 5888f7+ 989f8) the lower and upper limit of this integral are x0 and x9 respectively.

4.2 Proposed Algorithm:


Step 1: Enter the value of lower limit and upper limit in LL and UL respectively. Step 2: Compute h i.e. (UL-LL)/8 Step 3: Find out all the values between UL and LL, with the difference of h, and we call it x 0, x1, x2, x3, x4, x5, x6, x7, and x8. Step 4: For each value of x0, ----------x8, calculate the value of given integrand and store the results in f0, ------, f8 respectively. Step 5: Calculate the value of given integral with the help of the following expression (4h/14175)(989f0+ 5888f1 - 928f2 +10496f3 - 4540f4 + 10496f5 - 928f6 + 5888f7+ 989f8) Step 6: Exit

5. Comparative Study:
The solutions of the following problems have been obtained through programmed written, compiled and run (executed) in C++.

Problem 5.1:
Consider the following integral I= 1/(1+x2 )dx , the lower and upper limit of this integral are 0 and 6 respectively. The exact value of the above integral is 1.405647649 Using Trapezoidal Rule the value of the above integral is 1.405875. The difference between the exact value and the value obtained by Trapezoidal Rule is 0.000227351. Using Simpsons 1/3 Rule the value of the above integral is 1.3905. The difference between the exact value and the value obtained by Simpsons 1/3 Rule is + 0.015397649.

Using Simpsons 3/8 Rule the value of the above integral is 1.3775625. The difference between the exact value and the value obtained by Simpsons 3/8 Rule is + 0. 028085149. Using Booles Rule the value of the above integral is 1.3947. The difference between the exact value and the value obtained by Booles Rule is +0.010947649. Using Weddles Rule the value of the above integral is 1.4004. The difference between the exact value and the value obtained by Weddles Rule is +0.005247649. Using Proposed Algorithm the value of the above integral is 1.403436825. The difference between the exact value and the value obtained by Proposed Algorithm is +0.002210824.

Problem 5.2
Consider the following integral I= lnx dx , the lower and upper limit of this integral are 4 and 5.2 respectively. The exact value of the above integral is 1.827847409. Using Trapezoidal Rule the value of the above integral is 1.827735. The difference between the exact value and the value obtained by Trapezoidal Rule is +0.000112409. Using Simpsons 1/3 Rule the value of the above integral is 1.82784. The difference between the exact value and the value obtained by Simpsons 1/3 Rule is + 0.000007409. Using Simpsons 3/8 Rule the value of the above integral is 1.797474375. The difference between the exact value and the value obtained by Simpsons 3/8 Rule is + 0. 030373034. Using Booles Rule the value of the above integral is 1.82784. The difference between the exact value and the value obtained by Booles Rule is +0.000007409. Using Weddles Rule the value of the above integral is 1.85211. The difference between the exact value and the value obtained by Weddles Rule is -0.024262591 Using Proposed Algorithm the value of the above integral is 1.827822163. The difference between the exact value and the value obtained by Proposed Algorithm is +0.000025246.

6 Conclusions:
From the problem I and II it is clear that the results that are coming from the proposed algorithm are nearer to the exact solution and it is also better than the existing Newton Cotes closed integration formulae. If we compare the results of problem 5.1 as shown in graph A so we conclude that results of proposed Algorithms are better than existing algorithms except Trapezoidal Rule, and if we talk about the problem 5.2, than in this case the results obtained by proposed algorithm are nearly equivalent to exact solution and better than Newton -Cotes closed integration formulae.

Comparative Study Between Newton Cotes Fromulae & Proposed Algorithm


1.41 1.405 1.4 1.395 1.83 Computed Values 1.39 1.82 1.385 1.81 1.38 1.8 1.375 1.37 1.365 1.36 1 2 3 4 Algorithms 5 6 7 8 1.79 Series2 Series1 Series3 1.86

1.85

1.84

1.78

1.77

References:

1.

Atkinson, K.E.(1978); An introduction to Numerical Analysis, John Wiley and sons, New York.

2. Booth, A.D. (1958); Numerical Methods, Academic Press, New York. 3. Burden, R.L. and Faires, J.D. (1993); Numerical Analysis, V edition, PWS-Kent Publishing Co. Boston. 4. Conte, S.D.(1965); Elementary Numerical Analysis, McGraw Hill, New York. 5. Grewal, B.S.(2002): Numerical Methods in Engineering and Science, Khanna Publishers, Delhi. 6. Jain, M.K. (1971); Numerical Analysis for Scientist and Engineers, S.B.W., Publishers, Delhi.

7.

Jain, M.K., Iyenger, S.R.K. and Jain, R.K. (1985); Numerical Methods for Scientific and Engineering Computation, I edition, Wiley Eastern Limited, New Delhi.

8. Kumar, M.S. (1987) Computer Based Numerical Analysis, Khanna Publishers, Delhi. 9. Raja Raman, V.(1993); Computer Oriented Numerical Methods, III edition, prentice Hall of India, Private Limited, Delhi. 10. Sastry , S. S.(2003): Introductory Methods of Numerical Analysis, Prentice-Hall of India, Private Limited, New Delhi.

Você também pode gostar