Riemann Sum - Maple Help (2024)

Riemann Sum - Maple Help (1)

Calling Sequence

RiemannSum(f(x), x= a..b, opts)

RiemannSum(Int(f(x), x= a..b), opts)

Riemann Sum - Maple Help (2)

Parameters

f(x)

-

algebraic expression in variable 'x'

x

-

name; specify the independent variable

a, b

-

algebraic expressions; specify the interval

opts

-

equation(s) of the form option=valuewhere optionis one of boxoptions, functionoptions, iterations, method, outline, output, partition, pointoptions, refinement, showarea, showfunction, showpoints, subpartition, or Student plot options; specify output options

Riemann Sum - Maple Help (3)

Description

The RiemannSum(f(x), x = a..b, opts)command calculates the Riemann sumof f(x)from ato busing the given method. The first two arguments (function expression and range) can be replaced by a definite integral.

Given a partition P=a=x0,x1,...,xN=bof the interval a,b, the Riemann sum is defined as:

i=1N⁡f⁡xi* ⁢xixi1

where the chosen point of each subinterval xi1,xiof the partition is a point xi* determined by the method. By default, the midpoint Riemann sum is used.

If method=procedureis given, the proceduremust take the four arguments: f⁡x,x,pi,pi+1where piand pi+1are the end points of an interval and return an algebraic value which is assumed to be a point between the two end points.

By default, the interval is divided into 10equal-sized subintervals.

These integration methods can be applied interactively, through the ApproximateInt Tutor.

The optsargument can contain any of the Student plot optionsor any of the following equations that (excluding output, method, and partition) set plot options.

boxoptions =list

A list of options for the plot of approximating boxes. For more information on plot options, see plot/options.

functionoptions =list

A list of options for the plot of the expression f⁡x. By default, the expression is plotted as a solid red line. For more information on plot options, see plot/options.

iterations =posint

The number of successive refinements in the animation. By default, the value is 6.

method =left, lower, midpoint, random, right, upper, or procedure

The method of approximating the integral. By default, the midpoint Riemann sum is used.

left

left Riemann Sum

lower

lower Riemann Sum

midpoint

midpoint Riemann Sum

random

random selection of point in each interval

right

right Riemann Sum

upper

upper Riemann Sum

procedure

custom procedure

If a procedure is given, it must take the four arguments: f⁡x,x,pi,pi+1, where piand pi+1are the end points of an interval, and return an algebraic value which is assumed to be a point between the two end points.

Note:The randommethod is not available when the option output=sumis included.

outline =trueor false

Whether the boxes as a whole are outlined. Setting this option to trueprovides a less cluttered image when the partition is large. By default, this value is false.

output =value, sum, plot, or animation

This option controls the return value of the function.

output = valuespecifies that the value of the approximation is returned. Plot options are ignored if output = value. This is the default.

output = sumspecifies that an inert sum with the appropriate summand is returned. Plot options are ignored if output = sum.

output = plotspecifies that a plot, which shows the expression and an approximation to the integral on a,b, is displayed.

output = animationspecifies that an animation, which shows the expression and approximations using a sequence of partitions, each of which is a refinement of its predecessor, is displayed.

partition =posint, list(algebraic), random[algebraic], or algebraic

The partitionoption controls the partitioning of the interval a,b.

By default, the interval is divided into 10equally spaced subintervals.

A positive integer value divides the interval into that number of equally spaced subintervals.

A list of algebraic values is assumed to be the partition. If the end points are not included in the partition, they are added. The values are assumed to be sorted in ascending order.

The value randomindexed by an algebraic value ccreates a random partition with the width of each subinterval chosen in the closed interval c2,c. The parameter cmust evaluate to a positive value.

An arbitrary algebraic expression given as the value of this option is assumed to be a positive integer and is useful only if the output option is sum.

pointoptions =list

A list of options for the plot of the chosen points x'⁢[i],f⁡x'⁢[i]for Riemann sums. By default, these points are plotted as green circles. For more information on plot options, see plot/options.

refinement =halve, random, or numeric in (0, 1)

In an animation, the refinement controls how an interval is subpartitioned. The default is halve.

The value halveindicates that the interval is subdivided into two equal subintervals.

The value randomindicates that the interval is randomly subdivided. The random value is chosen from the average of two uniform distributions.

A numeric value cmust be in the open interval 0,1and indicates the interval p,qis broken into the intervals p,p+c⁢qpand p+c⁢qp,q.

showarea =trueor false

Whether the approximation of the integral f⁡xis displayed on the plot. By default, this value is true.

showfunction =trueor false

Whether the expression f⁡xis plotted. By default, the value is true.

showpoints =trueor false

Whether the chosen points x'⁢[i]are marked. These are the points at which the function f⁡xis evaluated to obtain the height of the corresponding box. By default, the value is true.

subpartition =all, width, or area

In an animation, the subpartition controls which intervals are subpartitioned each iteration. The default is all.

The value allindicates that every subinterval is subpartitioned.

The value widthindicates that the interval with greatest width is subpartitioned. If there is more than one interval with largest width, the leftmost is chosen.

The value areaindicates that the interval with greatest area is subpartitioned. If there is more than one interval with largest area, the leftmost is chosen.

caption =anything

A caption for the plot.

The default caption is constructed from the parameters and the command options. caption = ""disables the default caption. For more information about specifying a caption, see plot/typesetting.

Riemann Sum - Maple Help (4)

Examples

>

with⁡StudentCalculus1:

>

RiemannSum⁡sin⁡x,x=0.0..5.0,method=lower

−0.0576648694

(1)
>

RiemannSum⁡x⁢x2⁢x3,x=0..5,method=upper,output=plot

Riemann Sum - Maple Help (5)

>

RiemannSum⁡tan⁡x2⁢x,x=1..1,method=left,output=plot,partition=20,boxoptions=filled=color=Burgundy

Riemann Sum - Maple Help (6)

The following table illustrates the available methods.

>

optsoutput=plot,partition=13,size=300,300,tickmarks=,,labels=,:DocumentTools:-Tabulate⁡RiemannSum⁡sin⁡x,x=0..Pi,method=left,caption=left Riemann sum,opts,RiemannSum⁡sin⁡x,x=0..Pi,method=right,caption=right Riemann sum,opts,RiemannSum⁡sin⁡x,x=0..Pi,method=lower,caption=lower Riemann sum,opts,RiemannSum⁡sin⁡x,x=0..Pi,method=upper,caption=upper Riemann sum,opts,RiemannSum⁡sin⁡x,x=0..Pi,method=midpoint,caption=midpoint Riemann sum,opts,RiemannSum⁡sin⁡x,x=0..Pi,method=random,caption=random Riemann sum,opts,widthmode=pixels,width=600:

Riemann Sum - Maple Help (7)

Riemann Sum - Maple Help (8)

Riemann Sum - Maple Help (9)

Riemann Sum - Maple Help (10)

Riemann Sum - Maple Help (11)

Riemann Sum - Maple Help (12)

To play the following animations in this help page, right-click (Control-click, on Mac) the plot to display the context menu. Select Animation> Play.

>

exact∫1100ln⁡xⅆx

exact≔99+200⁢ln⁡2+200⁢ln⁡5

(2)
>

evalf⁡exact

361.5170185

(3)
>

RiemannSum⁡ln⁡x,x=1..100,method=right,outline=true,output=animation

Riemann Sum - Maple Help (13)

>

RiemannSum⁡ln⁡x,x=1..100,method=random,outline=true,output=animation

Riemann Sum - Maple Help (14)

Riemann Sum - Maple Help (15)

Riemann Sum Methods

Left Riemann Sum

Lower Riemann Sum

Midpoint Riemann Sum

Right Riemann Sum

Upper Riemann Sum

See Also

plot/options

plot/typesetting

Student

Student plot options

Student[Calculus1]

Student[Calculus1][ApproximateInt]

Student[Calculus1][ApproximateIntTutor]

Riemann Sum - Maple Help (2024)

FAQs

Riemann Sum - Maple Help? ›

The RiemannSum(f(x), x = a.. b, opts) command calculates the Riemann sum of f(x) from a to b using the given method. The first two arguments (function expression and range) can be replaced by a definite integral.

How do you sum numbers in Maple? ›

The most common command for numerical summation is evalf(Sum(f, x=a.. b)) where the summation command is expressed in inert form to avoid first invoking the symbolic summation routines. It is also possible to invoke evalf on an unevaluated sum returned by the symbolic sum command, as in evalf(sum(f, x=a..

How to tell if Riemann sum is overestimate or underestimate? ›

It is usually easy to tell from the graph whether left endpoints or right endpoints give an over- estimate or underestimate of the true integral. In particular: ˆ If f(x) is increasing then the left endpoint rule gives an underestimate and the right endpoint rule gives an overestimate.

What is a Riemann sum for dummies? ›

A Riemann sum is an approximation of a region's area, obtained by adding up the areas of multiple simplified slices of the region.

How to do a sum formula? ›

To use the SUM function, type =sum() into a cell. The cell references of the cells you want to add go within the parentheses. The AutoSUM button, which looks like the Greek letter sigma, will automatically put the SUM function into a cell.

What is the difference between add and sum in Maple? ›

You can enter the sum command using either the 1-D or 2-D calling sequence. For example, sum(k^2, k) is equivalent to ∑ k ⁡ k 2 . To add a finite sequence of values, rather than compute a formula, use the add command. For example, add(k, k=0..

When calculating a Riemann sum what can you do to improve your approximation? ›

The Riemann sum is only an approximation to the actual area underneath the graph of f. To make the approximation better, we can increase the number of subintervals n, which makes the subinterval width Δx=(b−a)/n decrease.

What is the formula for the right Riemann sum? ›

The formula for a right Riemann sum is A = ∑ i = 1 n Δ x f ( x i ) where is the width of each of the rectangles and f ( x i ) is the height. Definite Integral: A definite integral is a means to determine the exact area under a curve from a lower bound, , to an upper bound, , using the formula A = ∫ a b f ( x ) d x .

Which Riemann sum is most accurate? ›

Midpoint rule

over the interval. This error is half of that of the trapezoidal sum; as such the middle Riemann sum is the most accurate approach to the Riemann sum.

What is the Riemann sum quick explanation? ›

Summary. A Riemann sum is simply a sum of products of the form f(x∗i)Δx f ( x i ∗ ) Δ x that estimates the area between a positive function and the horizontal axis over a given interval.

What are the three types of Riemann sums? ›

Left, right, and midpoint Riemann sums are the most common Riemann sums, used to approximate the area under a curve y=f(x).

What is Xi * in Riemann sum? ›

Here xi∗ is the sample point in the ith subinterval. If the sample points are the midpoints of the subintervals, we call the Riemann Sum the Midpoint Rule.

How to do the sum of numbers? ›

When we add two or more numbers, the result or the answer we get can be defined as the SUM. The numbers that are added are called addends. In the above example, 6 and 4 are addends, and 10 is their sum. In other words, we can say the sum of 8 and 5 is 13 or 8 added to 5 is 13.

How do you sum numbers in a table? ›

Click the table cell where you want your result to appear. On the Layout tab (under Table Tools), click Formula. In the Formula box, check the text between the parentheses to make sure Word includes the cells you want to sum, and click OK. =SUM(ABOVE) adds the numbers in the column above the cell you're in.

How do you sum digits? ›

The digit sum of a number, say 152, is just the sum of the digits, 1+5+2=8. If the sum of the digits is greater than nine then the process is repeated. For example, the sum of the digits for 786 is 7+8+6=21 and the sum of the digits for 21 is 3 so the digit sum of 786 is 3.

Top Articles
Latest Posts
Article information

Author: Edmund Hettinger DC

Last Updated:

Views: 6126

Rating: 4.8 / 5 (58 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Edmund Hettinger DC

Birthday: 1994-08-17

Address: 2033 Gerhold Pine, Port Jocelyn, VA 12101-5654

Phone: +8524399971620

Job: Central Manufacturing Supervisor

Hobby: Jogging, Metalworking, Tai chi, Shopping, Puzzles, Rock climbing, Crocheting

Introduction: My name is Edmund Hettinger DC, I am a adventurous, colorful, gifted, determined, precious, open, colorful person who loves writing and wants to share my knowledge and understanding with you.