Indeed, when f and g are symbolic variables, and x is a symbolic variable, then f(x) and g(x) will both evaluate to x, and integral(f(x)*g(x), (x,0,1)) hence evaluates to integral(x^2, (x,0,1)) which is indeed 1/3.