David Little
Mathematics Department
Penn State University
Eberly College of Science
University Park, PA 16802
Office: 403 McAllister
Phone: (814) 865-3329
Fax: (814) 865-3735
e-mail:dlittle@psu.edu

The Integral of a Function

The following applet can be used to approximate the definite integral of f(t) from a to x, that is

by using the Riemann sum
where Δx = (x-a)/n and xi = a + iΔx. Simply enter the function f(x) and the values a and 0 ≤ n ≤ 20. The applet automatically draws the graph of f(x) and the corresponding Riemann sum function. As n increases, the graph of the Riemann sum function will approximate the graph of the definite integral of f(x) from a to x.

The user can also input the value of b and obtain an approximation to the definite integral of f(x) from a to b. This value is exactly the same as the value given using the Riemann Sums and the Area Under a Curve applet using the midpoint rule.

The value of a and b can be changed by simply typing a new value, such as "1.2345", "pi/2", "sqrt(5)+cos(3)", etc. You may also change these values by using the up/down arrow keys or dragging the corresponding point along the x-axis. To move the center of the graph, simply drag any point to a new location. To label the x-axis in radians (i.e. multiples of pi), click on the graph and press "control-r". To switch back, simply press "control-r" again.

Here is a list of functions that can be used with this applet.

Use the above applet to determine the integral of:

• f(x) = xn for various values of n
• f(x) = sin(ax) for various values of a
• f(x) = cos(ax) for various values of a
• f(x) = a^x for various values of a
• f(x) = ln(x)

© 2005 David P. Little
Download this applet for off-line viewing (includes source code). The above applet uses the Java Math Expression Parser (JEP) developed by Singular Systems