from sympy import *
# First we define our variable
t = Symbol('t')
# We then compute the answer to our given interval
ans = integrate((t**2 - 1)*(4 + 3*t))
# Finally, we print the answer
print(ans)
# Output:
3*t**4/4 + 4*t**3/3 - 3*t**2/2 - 4*t
Remember, when evaluating indefinite integrals, we have to add a general constant to our answer. Python does not include this when integrating, thus we should evaluate the output as the answer: