<s>[INST] Simplifying a definite integral expression 
If $a_1,a_2,a_3$ are the three values of a which satisfy the equation $$\int_{0}^ {\pi/2}(\sin x+a\cos x)^3dx-\frac{4a}{\pi-2}\int_{0}^{\pi/2}x\cos x dx=2$$ Find the value of $a_1+a_2+a_3$. 

Now I did find the value of the second integral which comes out to be $\frac{\pi-2}{2}$. But I am unable to find the value ofhe first integral. Please help, thanks.
 [/INST] To find the value of the first integral, 
using that
$$\sin^3\alpha=\frac{-\sin(3\alpha)+3\sin\alpha}{4}\quad\text{and}\quad\cos^3\alpha=\frac{3\cos\alpha+\cos(3\alpha)}{4}$$
gives
$$\begin{align}&\int_{0}^{\pi/2}(\sin x+a\cos x)^3dx\\&=\int_{0}^{\pi/2}(\sin^3x+3a\sin^2x\cos x+3a^2\sin x\cos^2x+a^3\cos^3x)dx\\&=\left[\frac{\cos(3x)-9\cos x}{12}+a\sin^3x-a^2\cos^3x+\frac{9\sin x+\sin(3x)}{12}a^3\right]_{0}^{\pi/2}\\&=\left(a+\frac{8}{12}a^3\right)-\left(\frac{-8}{12}-a^2\right)\\&=\frac 23a^3+a^2+a+\frac 23\end{align}$$
Finally, use Vieta's formula.
</s>