Question: How to equate coefficients on both sides of an equation?

Hi, I have the following equation defined in Maple:

f:=-4*a*sin(2*x)+4*b*cos(2*x)=-8*sin(2*x)+20*cos(2*x);

And I want to equate the coefficients of the similar terms (sin with sin and cos with cos), in order to do this:

-4a=-8

+4b=20

And then solve for the variables a, b in that 2 new equations.

Any ideas?

Please Wait...