integral-simbolica.py
[codesyntax lang=”python”]
from sympy import *
init_printing(use_unicode=False, wrap_line=False, no_global=True)
x = Symbol(‘x’)
n = Symbol(‘n’, integer=True, positive=True)
f = x*exp(-2*pi*I*n*x)
a = simplify(integrate(f, (x,0,1)))
print(a)
[/codesyntax]