<s>[INST] Question about Euler's formula I have a question about Euler's formula
$$e^{ix} = \cos(x)+i\sin(x)$$
I want to show 
$$\sin(ax)\sin(bx) = \frac{1}{2}(\cos((a-b)x)-\cos((a+b)x))$$
and
$$  \cos(ax)\cos(bx) = \frac{1}{2}(\cos((a-b)x)+\cos((a+b)x))$$
I'm not really sure how to get started here.
Can someone help me?
 [/INST] $$\sin { \left( ax \right)  } \sin { \left( bx \right) =\left( \frac { { e }^{ aix }-{ e }^{ -aix } }{ 2i }  \right) \left( \frac { { e }^{ bix }-{ e }^{ -bix } }{ 2i }  \right)  } =\frac { { e }^{ \left( a+b \right) ix }-e^{ \left( a-b \right) ix }-{ e }^{ \left( b-a \right) ix }+{ e }^{ -\left( a+b \right) ix } }{ -4 } \\ =-\frac { 1 }{ 2 } \left( \frac { { e }^{ \left( a+b \right) ix }+{ e }^{ -\left( a+b \right) ix } }{ 2 } -\frac { { e }^{ \left( a-b \right) ix }+{ e }^{ -\left( a-b \right) ix } }{ 2 }  \right) =\frac { 1 }{ 2 } \left( \cos { \left( a-b \right) x-\cos { \left( a+b \right) x }  }  \right)   $$
same method you can do with $\cos { \left( ax \right) \cos { \left( bx \right)  }  } $

Edit:
$$\int { \sin { \left( ax \right) \sin { \left( bx \right)  }  } dx=\frac { 1 }{ 2 } \int { \left[ \cos { \left( a-b \right) x-\cos { \left( a+b \right) x }  }  \right] dx=\quad  }  } $$$$\frac { 1 }{ 2 } \int { \cos { \left( a-b \right) xdx }  } -\frac { 1 }{ 2 } \int { \cos { \left( a+b \right) xdx= }  } $$
now to order calculate $\int { \cos { \left( a+b \right) xdx }  } $  write 
$$t=\left( a+b \right) x\quad \Rightarrow \quad x=\frac { t }{ a+b } \quad \Rightarrow dx=\frac { 1 }{ a+b } dt\\ \int { \cos { \left( a+b \right) xdx=\frac { 1 }{ a+b } \int { \cos { \left( t \right)  } dt=\frac { 1 }{ a+b } \sin { \left( t \right) = }  } \frac { 1 }{ a+b } \sin { \left( a+b \right) x }  }  } +C\\ $$
</s>