Hi Eric!

You can rewrite tan x = A + B sin x as:Substitute y=sin x, and you get:which yields:

This is a 4th order polynomial, which can be solved as explained for instance here: Quartic function - Wikipedia, the free encyclopedia

This may be more involved than you'd like, although I have to say that the article makes it appear more difficult than it actually is.

Afterward, you get the answer with .

Is this what you had in mind, or were you hoping for an easier solution?