Code covered by the BSD License  

Highlights from
Area Under A Curve

image thumbnail
from Area Under A Curve by Vaishali Shrivastava
Visualization of the area under a curve

Integration :: Area Under A Curve

 

Visualization of Integration

Area Under Curve

The GUI provides an interface to visualize and compute the area under a curve.  Given a function f(x), also called a curve of a real variable x and an interval [a, b] of the real line, the integral is equal to the area of a region in the xy-plane bounded by the graph f(x), the x-axis and the vertical lines x = a and x = b.

Steps

  1. Visualize an example curve or create a new curve via Example and Custom radio buttons.
  2. Select the Degree of Polynomial/Curve or Example curve - Line, 2nd Degree, 3rd Degree, 4th Degree, 5th Degree. 
  3. Specify the coefficients of the polynomial - a0, a1, a2, a3, a4, a5.
  4. Equation of the curve/polynomial will appear at the bottom of the Curve Properties Panel - f(x) = a0+a1*x+a2*x^2+a3*x^3+a4*x^4+a5*x^5.
  5. The 2 plots show the area under the curve f(x). 
  6. Specify the bounds of integration - Lower Limit and Upper Limit.
  7. Specify the width of the rectangles in the area computed via approximation.
  8. Click on the Compute Area to calculate the area under the curve.
  9. The interface has the Sample MATLAB Code displayed on the right side.
  10. Click on Show Code to look at the source code.
  11. Click on Exit or X to close the GUI.

© 1984-2008 The MathWorks Consulting Group, The MathWorks, Inc.

Contact us at files@mathworks.com