Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

numerical_integral throwing an error

Hi.

Can anyone explin why the following is producing an error please. First integral works, the second fails.

g(x) = 2*x

print numerical_integral(g, 1, 2)

(3.0, 3.3306690738754696e-14)

h(x) = x

print numerical_integral(h, 1, 2)

Traceback (most recent call last):

ValueError: free variable: x |--> x