MCS 471 Computer Problem 3: Numerical Integration using Maple/Octave
Due: Friday 20 April 1996
Background Reading: Gerald and Wheatley, Chapter 4
Topics
- 4.2 Derivatives from Difference Tables
- 4.3 Higher-Order Dervatives
- 4.4 Extrapolation Techniques
- 4.5 Newton-Cotes Integration Rules
- 4.6 Trapezoidal Rule
- 4.7 Simpson's Rule
- 4.9 Gaussian Quadrature
- 4.10 Adaptive Integration
Maple/Octave Computer Problem:
You can use either Octave or Maple for this assignment.
You must hand in a Octave or Maple worksheet that is well documented with
comments and plots of integrand functions.
Refer to the Class Octave and Maple Pages, or in particular to the
"Integrating a Function with Maple int (newly Revised!):"
http://www.math.uic.edu/~hanson/MAPLE/MapleIntegral.html
or "Octave Example for Evaluating an Integral:"
http://www.math.uic.edu/~hanson/Octave/OctaveIntegralEG.html
See also the main class Maple and Octave pages for more help.
Find the integral of the following three functions:
- f1(x) = x**5 - x**3 on (0,2).
Remark 1: This is a test function that can easily be integrated exactly
as a check to your methods.
Remark 2: Give the exact answer in you documentary comments.
- f2(x) = {sqrt(x) if x > 0, else x**4} on (-1.,+1.).
Remark 1: This is a nonsmooth example with piecewise definition.
Remark 2: For Maple, use the Maple function "piecewise" given in the above
Class Maple integration page, since if-then-else or procedure constructs lead
to mysterious Maple errors. Octave should be OK.
- f3(x) = {exp(-x^3)/sqrt(x) if x > 0.1, else 10.-68.4*x} on (0,4).
Remark 1: This is a nonsmooth nearly singular example with piecewise
definition.
Remark 2: For Maple, use the Maple function "piecewise" given in the above
Class Maple integration page, since if-then-else or procedure constructs lead
to mysterious Maple errors. Also, Maple "piecewise" works better, if at all,
with the nearly singular part in the "FunctionIfTrue" argument, rather than
the "FunctionElse" argument. Octave should be OK.
Web Source: http://www.math.uic.edu/~hanson/M471/mcs471cp3.html
Email Comments or Questions to
hanson@math.uic.edu
Click Here For Class HomePage