Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Animation · Left rectangles

Block 2 · Watch, pause, and explain

San Diego State University

A left rectangle replaces the function on each panel by its value at the left endpoint. The film accumulates these areas and then refines the partition for f(x)=exf(x)=e^x on [0,1][0,1].

Before watching

As the panels get narrower, which changes: the area of each rectangle, the number of rectangles, or both? Predict whether left rectangles underestimate or overestimate this increasing function.

Mathematical connection

For a panel [a,a+h][a,a+h], write x=a+tx=a+t. Taylor expansion gives

f(a+t)=f(a)+tf′(a)+O(t2).f(a+t)=f(a)+tf'(a)+O(t^2).

Integrating from t=0t=0 to hh gives

∫aa+hf(x) dx=hf(a)+h22f′(a)+O(h3).\int_a^{a+h}f(x)\,dx=hf(a)+\frac{h^2}{2}f'(a)+O(h^3).

The rectangle keeps hf(a)hf(a). Its local truncation error is O(h2)O(h^2). Over a fixed interval of length LL, there are L/hL/h panels, giving composite error O(h)O(h) for a sufficiently smooth function. These orders describe truncation error, not floating-point error.

Explain what you saw

The running sum covers only the shaded panels. Explain why its error must be compared with the exact integral over that same covered interval. When the entire interval is covered, the exact integral is e−1e-1.

Use the player controls to pause, replay, or view fullscreen. The animation has no narration; its labels and the explanation above carry the content.

Continue: Lecture 7 · Full reading · All animations