Contents - Index
The IntegralValue is used to retrieve data from the Integral Table for the main program that is created using the $IntegralTable directive in the main EES code. In that sense, the IntegralValue function is similar to the TableValue function which retrieve data from the Parametric Table and the Lookup and Interpolate functions which retrieves data from the Lookup Table window or Lookup files. The format of the IntegralValue command is
t is the value of the independent integration variable for which the value of X is to be returned.
X is the name of a variable that has been included in the Integral Table. (The single quotes around the variable name are optional.)
The value provided for t must be less than or equal to the current value of the independent integration variable. Values of X corresponding to values of t that are not included in the integration range may not be properly defined.
"This example illustrates the IntegralValue function to numerically estimate the derivative of Z with respect to X"
Z=integral(X^2,x,0,1) "Z is the integral of X^2 dx for 0<=X<=1"
z_last=integralValue(X-0.01,z) "Z_Last is the value of Z at X-0.1"
$integraltable X, Z, Z_Last, dZ\dX , dz\dx_act "Construct an integral table containing X, Z, X_Last, and dZ\dX"
dz\dx=(z-z_last)/0.01 "Numerical approximation of the average derivative "
dz\dx_act=X^2 "Analytical derivative for comparison"
"View the Integral table by pressing Ctrl-I or selecting it from the Windows menu."
Note that Integral tables can be created in Subprograms, but the IntegralValue function only designed for use in the main program.