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.
 A: 
But I am unable to find the value of the first integral. 

One may just expand the integrand,
$$
\int_{0}^ {\pi/2}(\sin x+a\cos x)^3dx=\int_{0}^ {\pi/2}(\sin^3 x+3a\sin^2 x \cos x+3a^2\sin x \cos^2 x+a^3\cos^3 x)\:dx
$$ then observing that,
$$
\begin{align}
&\int_{0}^ {\pi/2}\sin^3 x \:dx=\int_{0}^ {\pi/2}\cos^3 x \:dx==\int_{0}^ {\pi/2}(1-\sin^2 x)\cos x \:dx=\int_0^1(1-u^2)\:du=\frac23
\\\\&\int_{0}^ {\pi/2}\sin^2 x \cos x\:dx=\int_{0}^ {\pi/2}\cos^2 x \sin x\:dx=\int_0^1u^2\:du=\frac13
\end{align}
$$ we get, for the first integral,

$$
\int_{0}^ {\pi/2}(\sin x+a\cos x)^3dx=\frac23a^3+a^2+a+\frac23.
$$

A: As you are asked the sum of the roots, it is enough to compute the coefficients of the two leading terms of the expression, which is a cubic polynomial.
$$a^3\to\int_0^{\pi/2}\cos^3(x)dx=\int_0^{\pi/2}\cos(x)(1-\sin^2(x))dx=\int_0^1(1-t^2)dt=\frac23,$$
$$a^2\to3\int_0^{\pi/2}\sin(x)\cos^2(x)dx=-\int_1^03t^2dt=1.$$
Hence the answer $a_1+a_2+a_3=-\dfrac32$. There is no need to compute other terms. 
A: 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.
