# Easier way to solve the integration

I often need to solve a type of integral which is :

$$\int x \ \sin ( n_1 x) \ \sin (n_2 x) \ dx$$ $$n_1$$ and $$n_2$$ are integers.

where the $$n_1$$ and $$n_2$$ are the integer number. The way I solve this integral is to break down the $$\sin n_1 x \sin n_2 x$$ first using formula $$\cos C - \cos D$$ and then take the partial integration.

Is there any easy way to solve this integral?

• You already have the best way to integrate this function. No easier way! – Kavi Rama Murthy Aug 12 at 9:54
• You can generalise this method to arbitrary $n_1$ and $n_2$ to get this result from Wolfram Alpha. – Toby Mak Aug 12 at 9:54
• Listen to @KaviRamaMurthy – Kevin Nivek Aug 13 at 10:17