Nodes

Number of subintervals or list of x-values for subintervals

Value Summary

OptionalList of arithmetical expressions

Graphics Primitives

ObjectsNodes Default Values
plot::Integral[10]

Description

Nodes is a positive number of subintervals for numeric approximation of integrals. The given interval for approximation is divided into the given number of subintervals, all of the same width.

Otherwise, Nodes can be a list of x-values for dividing the given interval. The interval is divided into subintervals at the given x-values.

When a number is given for Nodes, the number can be given as a list with this one number, too.

When a list with x-values is given, the left and right border of the whole (approximation) interval can be omitted. In this case, the number of subintervals is the number of given x-values plus one.

Nodes outside the approximation interval are ignored. Duplicate values are ignored.

The nodes need not be ordered.

Examples

Example 1

Nodes determines the number of rectangles for Riemann sums:

f := plot::Function2d(x*(x+4)*(x-4)):
plot(plot::Integral(f, Nodes = 25, IntMethod = RiemannLower), f)

Increasing of Nodes decreases the error or the approximation:

plot(plot::Integral(f, Nodes = 125, IntMethod = RiemannLower), f)

delete f:

Example 2

We request a specific division into subintervals:

f := plot::Function2d(sin(x), x = -2*PI..2*PI):
plot(
  plot::Integral(f, Nodes = [i*PI/2 $ i = -4..4],
                    IntMethod = Trapezoid),
    f)

The subintervals do not need to be of equal width:

f := plot::Function2d(sin(x), x = 0..PI):
plot(
  plot::Integral(f, [PI/3, PI/2, 2*PI/3],
                  IntMethod = Trapezoid),
   f)

delete f:

See Also

MuPAD Functions

Was this topic helpful?