Integrate the following functions w.r.t. x.
∫sin xsin(x−a)dx.
∫sin xsin(x−a)dx=∫sin{(x−a)+a}sin(x−a)dx=∫sin(x−a)cos a+cos(x−a)sin asin(x−a)dx [∵ sin (A+B)=sin A cos B+cos A sin B]=∫sin(x−a)cos asin(x−a)dx+∫cos(x−a)sin asin(x−a)dx=cos a∫1 dx+sin a∫cot(x−a)dx=(cos a)x+sin a.log|sin(x−a)|+C