A Short Dissertation on Numerical Integration

A Short Dissertation on Numerical Integration

<p> A Short Dissertation on Integrating Irregular Functions: Numerical Integration and Curve Fits -by Peter Andersen</p><p>There are three very commonly used methods for integrating functions that are not associated with a well-defined analytical function. I will go over each.</p><p>1) Using a simple Riemann sum Approximation. Remember from basic calculus that the fundamental theorem of calculus is derived from this method. Basically, this method consists of breaking the function into small subintervals and evaluating the function at each subinterval. The area of one subinterval is then f(x)*dx. This method, however, will in general give an “over shot”/”undershot” value for the area, depending on the f(x) chosen. Perhaps a pictorial description would be more helpful. a: Choosing the first value b: Choosing the second value</p><p> f(x) f(x)</p><p>|dx | </p><p>**it can be easily seen that if dx is “small” the error is also small. **Additionally, it can be (quite easily) shown that the trapezoidal method reduces these errors by effectively taking the average of the two methods.</p><p>FIGURE 1: comparison of choosing upper and lower bounds on Reimann Sum</p><p>2) Using what is called the Trapezoidal Method. This is an expansion/refinement on the Reimann sum. Where the Reimann sum assumes a constant value on the subinterval, (a zero’th order approximation), the Trapezoidal method consists of assuming a linear solution over the element—thereby obtaining a more accurate solution. In fact, with sufficiently smooth curve, and with sufficiently small intervals, this approximation is VERY good. This method can be easily implemented in a spreadsheet, as one can easily obtain that the area of the trapezoidal element is equal to ½[f(x)+f(x+dx)]*dx. Alternatively, many computer programs have a built in function to do it (somewhat mindlessly), notably Matlab, with the ‘trapz’ command.</p><p>3) The third and generally least accurate method is to assume a solution form OVER THE ENTIRE DOMAIN, (e.g. 2nd order polynomial, logarithmic, etc), fit a ‘least squares fit’ curve of the assumed form, and then simply use analytical integration to evaluate the area. This method is easy to do using common functions using many current spreadsheet applications, but generally depends on a heuristic idea about the type of relation to be obtained. Additionally, only a limited number of function types are generally given. These types of functions are all easily integrated, but may not be indicative of the particular function under consideration.</p><p> a: The Trapezoidal Method effectively b: The “curve fit” method can be very uses the AVERAGE value of Inaccurate f(x), and does a Reimann Sum</p><p>FIGURE 2: Trapezoidal method and ‘curve fit’ method</p><p>Thus, for purposes of this lab, use the trapezoidal method. However, it may be interesting (and not entirely difficult) to use other methods and compare the accuracy of these methods to the trapezoidal method. For instance, a percent error in the Curve Fit method can be found as:</p><p>ACurve  ATtrapezoid  %  Fit EQUATION 1 ATrapezoid This may be an interesting way to extend your study and check the numerical values of your numerical methods. This is important because a factor could easily be off in the spreadsheet, yielding large errors. However, integrating a 3rd order polynomial, for example, is not difficult and should differ by ±20% or less.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us