Worksheets/Simpsons Rule: Difference between revisions
From charlesreid1
| Line 30: | Line 30: | ||
We can approximate this by splitting up the interval into sub-intervals, constructing strips, and approximating the area of each strip | We can approximate this by splitting up the interval into sub-intervals, constructing strips, and approximating the area of each strip | ||
==Left Hand, Right Hand, and Midpoint Rules== | |||
Chapter 5, first introduction to integration: we explored the left-hand, right-hand, and midpoint rules. | Chapter 5, first introduction to integration: we explored the left-hand, right-hand, and midpoint rules. | ||
These use a constant function. 1 parameter, 1 function evaluation. | These use a constant function. 1 parameter, 1 function evaluation. | ||
==Trapezoid Rule== | |||
Trapezoid rule: extends the technique by approximating with a line. 2 parameters, 2 function evaluations. 1 rectangle strip. | Trapezoid rule: extends the technique by approximating with a line. 2 parameters, 2 function evaluations. 1 rectangle strip. | ||
| Line 40: | Line 44: | ||
A = \Delta x \left( \frac{1}{2} y_0 + y_1 + y_2 + \dots + y_{N-1} + \frac{1}{2} y_{N} \right) | A = \Delta x \left( \frac{1}{2} y_0 + y_1 + y_2 + \dots + y_{N-1} + \frac{1}{2} y_{N} \right) | ||
</math> | </math> | ||
Recurrence relation: | |||
<math> | |||
A_j = A_{j-1} + \frac{\Delta x}{2} \left( y_{j-1} + y_{j} \right) | |||
</math> | |||
==Simpson's Rule== | |||
Simpson's Rule: extension to quadratic polynomial approximation. 3 parameters, 3 function evaluations. 2 rectangle strips. | Simpson's Rule: extension to quadratic polynomial approximation. 3 parameters, 3 function evaluations. 2 rectangle strips. | ||
For the simplest case of two intervals, Simpson's Rule is given by: | |||
<math> | |||
A = \Delta x \left( \frac{1}{3} y_0 + \frac{4}{3} y_1 + \frac{1}{3} y_2 \right) | |||
</math> | |||
Combining these expressions for a large number of intervals, we can get a general expression for Simpson's Rule: | |||
<math> | |||
</math> | |||
Revision as of 10:23, 8 May 2016
Background
When might we need to evaluate an integral with data?
Numerical routine to integrate two functions and find a centroid - Magrab p. 154 (uses quadc() routine)
Expectations:
- Answers with complete sentences
- Some analytical work, some numerical work
- Final answers in report!
- Plot/chart to answer question
PowerPoint Problem Setup
Explanation of numerical integration background, equation derivation
Cover the questions
Cover strategy, writing out what to do before implementing, how to implement in a spreadsheet
Spend a day working in a computer lab
Worksheet Content
Simpson's Rule to approximate the integral of a function,
$ I = int_{a}^{b} f(x) dx $
We can approximate this by splitting up the interval into sub-intervals, constructing strips, and approximating the area of each strip
Left Hand, Right Hand, and Midpoint Rules
Chapter 5, first introduction to integration: we explored the left-hand, right-hand, and midpoint rules.
These use a constant function. 1 parameter, 1 function evaluation.
Trapezoid Rule
Trapezoid rule: extends the technique by approximating with a line. 2 parameters, 2 function evaluations. 1 rectangle strip.
$ A = \Delta x \left( \frac{1}{2} y_0 + y_1 + y_2 + \dots + y_{N-1} + \frac{1}{2} y_{N} \right) $
Recurrence relation:
$ A_j = A_{j-1} + \frac{\Delta x}{2} \left( y_{j-1} + y_{j} \right) $
Simpson's Rule
Simpson's Rule: extension to quadratic polynomial approximation. 3 parameters, 3 function evaluations. 2 rectangle strips.
For the simplest case of two intervals, Simpson's Rule is given by:
$ A = \Delta x \left( \frac{1}{3} y_0 + \frac{4}{3} y_1 + \frac{1}{3} y_2 \right) $
Combining these expressions for a large number of intervals, we can get a general expression for Simpson's Rule:
$ $