What is $\tan \alpha$, if $(a+2)\sin\alpha +(2a - 1)\cos\alpha =2a + 1$? I tried the following:
$$\begin{aligned}a\sin\alpha +2\sin\alpha + 2a\cos\alpha - \cos\alpha &= 2a+1\\
a(\sin\alpha +2\cos\alpha)+(2\sin\alpha-\cos\alpha)&=2a+1\end{aligned}$$
Therefore,
$$\sin\alpha +2 \cos\alpha=2$$
$$2\sin\alpha - \cos\alpha=1$$
From these two equations, we get
$$\sin\alpha=\frac{4}{5},\cos\alpha=\frac{3}{5}$$
Therefore,
$$\tan\alpha = \frac{\sin\alpha} {\cos\alpha} = \frac{4} {3}$$
Is this a correct method to solve the question? Since $a$ is a constant, it does not seem necessary to me that its coefficients on the two sides of the equation be equal. Should I find $\sin\alpha$ and $\cos\alpha$ using some other method? Are there specific cases where this method of equating the coefficients will break?
 A: The OP finds one constant root that applies for all $a$.  But there is a second root for most specific values of $a$, which is a function of $a$.  The full answer is $\tan\alpha\in\{4/3,2a/(a^2-1)\}$.
Properly, the given equation should be combined with the identity $\sin^2\alpha+\cos^2\alpha=1$.  There are two ways to do this:
Method 1
Isolate one of the trigonometric function, square the resulting equations and substitute to get a quadratic equation for the remaining function.  Choosing to isolate the cosine we then have
$(2a-1)\cos\alpha=(2a+1)-(a+2)\sin\alpha$
$(2a-1)^2\cos^2\alpha=(2a+1)^2-2(2a+1)(a+2)\sin\alpha+(a+2)^2\sin^2\alpha$
$(4a^2-4a+1)-(4a^2-4a+1)\sin^2\alpha=(4a^2+4a+1)-(4a^2+10a+4)\sin\alpha+(a^2+4a+4)\sin^2\alpha$
$(5a^2+5)\sin^2\alpha-(4a^2+10a+4)\sin\alpha+8a=0$
The quadratic equation looks like a mouthful, but its discriminant is a squared quantity, to wit $(4a^2-10a+4)^2$, thus we get the two roots
$\sin\alpha=\dfrac{(4a^2+10a+4)\pm(4a^2-10a+4)}{2(5a^2+5)}\in\{4/5,2a/(a^2+1)\}$
For each root of $\sin\alpha$ the previous equation with $\cos\alpha$ isolated is used to assure the proper sign of that function:
$(2a-1)\cos\alpha=(2a+1)-(a+2)(4/5); \cos\alpha=3/5$
$(2a-1)\cos\alpha=(2a+1)-(a+2)(2a/(a^2+1)); \cos\alpha=(a^2-1)/(a^2+1)$
Correspondingly $\tan\alpha\in\{4/3,2a/(a^2-1)\}$.
Thus the answer given by the OP is correct for one root that applies for all $a$, but in most cases there will be a second root for any specific value of $a$ (the only exceptions being $a=2$ where there is one doubly degenerate root instead, and $a=\pm 1$ where the second root fails to give a defined value for $\tan\alpha$; also $a=-1/2$ gives the second root with $\tan\alpha=4/3$ but different values for the sine and cosine).  The existence of two roots ultimately comes from the fact that except for $\pm 1$, any value of the sine or cosine corresponds to two different arguments within any fundamental period.
Method 2
In this method, we use a trick by combining the original equation with one involving the orthogonal linear combination.  To get the orthogonal combination, switch the coefficients $a+2$ and $2a-1$ and then reverse the sign before the second term.
$(a+2)\sin\alpha+(2a-1)\cos\alpha=(2a+1)$
$(2a-1)\sin\alpha-(a+2)\cos\alpha=x$
Square both sides and add them together getting:
$(5a^2+5)(\sin^2\alpha+\cos^2\alpha)=5a^2+5=(2a+1)^2+x^2$
Thus $x=\pm\sqrt{5a^2+5-(2a+1)^2}=\pm(a-2)$.  We then have a linear system to solve for $\sin\alpha$ and $\cos\alpha$ for each root  of $x$.  For example, $x=+(a-2)$ gives
$(a+2)\sin\alpha+(2a-1)\cos\alpha=(2a+1)$
$(2a-1)\sin\alpha-(a+2)\cos\alpha=a-2$
whose solution is $\sin\alpha=4/5,\cos\alpha=3/5$.  Putting $-(a-2)$ for $x$ similarly gives a linear system with solution $\sin\alpha=2a/(a^2+1),\cos\alpha=(a^2-1)/(a^2+1)$.
The remainder of the solution, and the comments that follow, are identical to Method 1.
A: Hint:
Use  Weierstrass substitution  to form a quadratic equation $$\tan\dfrac\alpha2=t$$
$$(a+2)\cdot\dfrac{2t}{1+t^2}+(2a-1)\cdot\dfrac{1-t^2}{1+t^2}=2a+1$$
$$\iff-t^2(2a+1+2a-1)+2t(a+2) +2a-1-(2a+1)=0$$
$$\iff2at^2-t(a+2)+1=0$$
Now use $\tan2A=\dfrac{2\tan A}{1-\tan^2A}$
A: The problem is that $a$ is a constant, not a variable. Therefore equating by parts does not work here: if we separate $2a - 1$ into $2(a-1) + 1$, $2(a-2) + 3$ and so on, we end up with a different set of solutions each time. If you try substituting $\sin \alpha$ and $\cos \alpha$ back into the original question, the LHS does not equal $2a-1$, so clearly something must have gone wrong.
Instead, notice that as this is an identity, so it must hold for all $a$. Substituting $a = -2, \frac{1}{2}$ to cancel one of the terms, we get:
$$-5 \cos a = -5 \Rightarrow \cos a = 1$$
$$\frac{5}{2} \sin a = 0 \Rightarrow \sin a = 0$$
