How to find $\tan x $ from $(a+1)\cos x + (a-1)\sin x=2a+1$? How do I find $\tan x$ from this equation?

$$(a+1)\cos x + (a-1)\sin x=2a+1$$

Thanks for any help!!

using the so-called Weierstrass substitution we get this here
$${\frac { \left( a+1 \right)  \left( 1- \left( \tan \left( x/2 \right) 
 \right) ^{2} \right) }{1+ \left( \tan \left( x/2 \right)  \right) ^{2
}}}+2\,{\frac { \left( a-1 \right) \tan \left( x/2 \right) }{1+
 \left( \tan \left( x/2 \right)  \right) ^{2}}}=2\,a+1
$$
further use that $$\tan(x+y)={\frac {\tan \left( x \right) +\tan \left( y \right) }{1-\tan \left( x
 \right) \tan \left( y \right) }}
$$
