Implementing convolution using SymPy
Your code shouldn't work:
You are calculating:
$$\int_a^b f(t) \, g(t - \tau) \; d\tau$$
but convolution is defined as:
$$f(t) \, * \, g(t) \equiv \int_{-\infty}^{\infty} f(\tau) \, g(t - \tau) \; d\tau$$
so the default limits of integration should be \$-\infty\$ to \$\infty\$. More importantly you should use the proper argument for f (the integration variable). Finally, naming the integration variable y feels unusual.

from sympy import oo, Symbol, integrate
def convolve(f, g, t, lower_limit=-oo, upper_limit=oo):
    tau = Symbol('__very_unlikely_name__', real=True)
    return integrate(f.subs(t, tau) * g.subs(t, t - tau), 
                     (tau, lower_limit, upper_limit))