Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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.