How to write a function with an integral?


f[a_, b_] = Integrate[Sin[aPix]Sin[bPix], {x,0,1}];

This function does not work at some points. When I try to evaluate f[1,1], it says "Infinite expression 1/0 encountered."

How can I get around this? It should obviously return 1/2 at that point