Using "eval" for user-supplied integration function?
<p>I am trying to understand eval(), but am not having much luck.</p>

<p>I am writing my own math library and am trying to include integration into the library. I need help getting python to recognize the function as a series of variables, constants, and operators. I was told that eval would do the trick but how would i go about it? </p>

<pre><code>fofx = input ("Write your function of x here &gt;")
def integrate (fofx):
    #integration algorithm here
    #input fofx and recognize it as f(x) to be integrated.
</code></pre>

<p>i have tried the documentation but that is limited and i have no clue how i could apply it to my function to be evaluated. </p>
