Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

IntMethod

Method for integral approximation

Value Summary

OptionalExact, RiemannLeft, RiemannRight, RiemannLower, RiemannUpper, RiemannMiddle, RiemannLowerAbs, RiemannUpperAbs, Simpson, or Trapezoid

Graphics Primitives

ObjectsIntMethod Default Values
plot::IntegralExact

Description

IntMethod determines the method of the visualization of plot::Integral objects.

Following methods are implemented:

  • Exact

     the area between x-axis and function graph is colored

  • RiemannLower

     display boxes between x-axis and function graph using the smallest value of the function in each subinterval

  • RiemannLowerAbs

     display boxes between x-axis and function graph using the smallest absolut value of the function in each subinterval

  • RiemannUpper

     display boxes between x-axis and function graph using the greatest value of the function in each subinterval

  • RiemannUpperAbs

     display boxes between x-axis and function graph using the greatest absolut value of the function in each subinterval

  • RiemannLeft

     display boxes between x-axis and function graph using the function value of the left border in each subinterval

  • RiemannMiddle

     display boxes between x-axis and function graph using the function value of the middle in each subinterval

  • RiemannRight

     display boxes between x-axis and function graph using the function value of the right border in each subinterval

  • Trapezoid

     display an approximation of the integral using the Trapezoidal rule

  • Simpson

     interpolate the graph of the function using Simpsons rule

Examples

Example 1

The following example shows all implemented methods:

f := plot::Function2d(x*(x-3)*(x+4), Color = RGB::Black):
plot(plot::Scene2d(plot::Integral(f, 7, IntMethod = method,
                                  Color = [frandom() $ i=1..3],
                                  ShowInfo = [IntMethod, Integral,
                                  Error, Position = [-5,90]]), f)
     $ method in [RiemannLower, RiemannLowerAbs, Trapezoid,
                  RiemannUpper, RiemannUpperAbs, Simpson,
                  RiemannLeft,  RiemannRight,    RiemannMiddle],
     Columns = 3, TextFont = [8], Width = 200, Height = 180)

Was this topic helpful?