First time here? Check out the FAQ!
answered 2021-03-24 02:42:35 +0100
Your expressions are ill defined. A python function does the job
def inner_product(f,g): return integral(f*g, (x,-pi,pi))
Thus
inner_product(sin(3*x),sin(3*x))
returns $\pi$.
See here for symbolic computation.