The given function is,
f( x )= sinx sin( x−a ) = sin( x−a+a ) sin( x−a ) .
Integrate both sides,
∫ f( x )dx = ∫ sin( x−a )cosa+cos( x−a )sina sin( x−a ) dx = ∫ sin( x−a )cosa sin( x−a ) dx + ∫ cos( x−a )sina sin( x−a ) dx =cosa ∫ dx +sina ∫ cot( x−a )dx =xcosa+sinalog| sin( x−a ) |+c
Thus, integration of f( x ) is xcosa+sinalog| sin( x−a ) |+c.