Use a suitable trial function to find the particular solution of

$\displaystyle \frac{dy}{dx}+6y=3sin(4x)$

$\displaystyle y=Acos(4x)+Bsin(4x)$

$\displaystyle \frac{dy}{dx}=-4Asin(4x)+4Bcos(4x)$

From the equation, $\displaystyle -4Asin(4x)+4Bcos(4x)+6[Acos(4x)+Bsin(4x)]=3sin(4x)$

Now I don't understand the last bit where you have to pick the two parts which correspond to 0 and 3. Could someone explain it for me?