- Quadrature Rules
Determine constants a, b, c, d, and e that will produce a quadrature formula as follows that has degree of precision 4. (i.e. exact for a polynomial of degree 4 with arbitrary coefficients)
- Composite Integration
Here, lets define n as the number of intervals. Note that the number of nodes will depend on whether you are using Trapezoid Rule (integrals with upper and lower bounds xj+1 and xj) and Simpsons Rule (integrals with upper and lower bounds xj+2 and xj). In terms of defining the appropriate h, be careful as to whether you are using number of nodes or number of intervals.
- Create function files for composite trapezoid and composite Simpsons rules. The mainfile should be able to call these functions that have an input including the function along with the upper bound b, lower bound a and either n or h.
- Approximate the following integrals:
Note that the exact value for the first integral is (5/2) 26 (1/2)ln(5 + 26) and the exact value for the second is 2.
- (4 points) Create Tables similar to those below describe error and convergence. Discuss the behavior of the error with regards to varying the total number of intervals n or number of points NTot (or as h decreases by a factor of 2).
|
|
Reviews
There are no reviews yet.