**Finding a Limit of Integration**

The algorithms used in EES Integral function for numerical integration do not allow EES to directly solve for a limit of integration. For example, the following equation would produce an error in EES.

3=integral(x^2 ,x, 0, a)

It is possible, however, to solve this problem in several other ways. Perhaps the simplest solution is to use a Subprogram in which the limit, (variable a in this problem) is provided as a parameter. The method is illustrated in the following equations.

SubProgram FindLimit(a:L)

L=integral(x^2, x, 0, a)

end

L=3

Call FindLimit(a:L)

a_exact=9^(1/3)

Another way to solve this problem is to reformulate the problem to be an optimization problem and use the Min/Max command. In this case, EES will adjust variable a so as to minimize an objective function. The method is illustrated in the following equations.

L=integral(x^2, x, 0, a)

f=abs(L-3)

a_exact=9^(1/3)

This simple problem has an analytic solution which is the cube root of 9.