[ Prev | Main | Next ]

AveValue Applet

AveValue is used to show the concept of the average value of a continuous function over an interval. The curve is shown with the area under the curve highlighted. The user can then drag a slider or handle to resize a rectangle to what they think is a rectangle with the same area as the area under the curve. A button can then be clicked to show the proper rectangle whose height is the average value of the function over the interval.

The applet tag that creates the applet is as follows:

<applet code="net.sourceforge.webcompmath.calculus.AveValue" codebase="../../assets"
archive="webcompmath.jar,calculus.jar" height="480" width="640">
<param name="UseLoadButton" value="no" />
<param name="Example1" value="1. Line;x;0;2;-1,3,-1,3;0;true" />
<param name="Example2" value="2. Parabola;x^2;0;2;-1,3,-0.5,4.5;0;false" />
<param name="Example3" value="3. Cubic;-1/2(x-2)^3+4;1;4;-1,5,-2,5;0;false" />
<param name="Example4" value="4. Another Cubic;-1/2(x-2)^3+2;1;4;-1,5,-2,5;0;false" />
<param name="Example5" value="5. Yet Another Cubic;-(x-3)^3-3(x-3)^2+2;1;4;-1,5,-2,5;0;false" />
<param name="Example6" value="6. Sinusoid;sin(x)+1;pi/2;3pi/2;-1,5,-2,3;0;false" />
<param name="Example7" value="7. Sine;sin(x);pi/2;3pi/2;-1,5,-2,3;0;false" />

This applet takes the following parameters:

Param Name Type Default Description
Example1, ... String N/A Each example is a list of strings separated by semicolons. The strings, in order, are:
1. The name of the example, displayed in the example menu.
2. The expression for f(x).
3. The value for "a", the lower limit for the interval.
4. The value for "b", the upper limit for the interval.
5. The xmin, xmax, ymin and ymax values for the graph region, separated by commas.
6. The initial y coordinate for the draggable square.
7. Whether to show or hide the answer. "true" means to initially show the answer, "false" means to initially hide the answer.

[ Prev | Main | Next ]