I want to integrate xe^(-4(x^2)) from x=0 to x=1. When i get integral result, result seems not numerical.
我的法典是:
import sympy as sp
def f(x):
return x * sp.exp(-4 * (x ** 2))
x = sp.symbols( x )
integral = sp.integrate(f(x), (x, 0, 1))
print(f Result of analytic integration = {integral} )
产出是:
Result of analytic integration = 1/8 - exp(-4)/8