4
$\begingroup$

I have the following equation, and I want to solve for $\theta$ :

$f(x,y,\theta) = \frac{x \cos(\theta) - y \sin(\theta)}{x \sin(\theta) + y \cos(\theta)}$

It seems to me this equation should be easily solvable given known $x$ and $y$, however I cannot find it. Any help/hints?

EDIT: There was an error in my equation. I also must add that I know the value of $f$. Currently working on it with the tip given by Chandrasekhar.

It is important to note that $\theta$ and $x$, $y$ are not related. Yes it can be seen as a rotation... (or the division of the two terms from a rotation).

  • 0
    I forgot to say that I also know what $f$ is equal to...2011-10-14

2 Answers 2

7

Let $x = r \sin(\alpha)$ and $y = -r \cos(\alpha)$. Then $ f(x,y,\theta) = \frac{ \sin(\alpha) \cos(\theta) + \cos(\alpha) \sin(\theta)}{ \sin(\alpha) \sin(\theta) - \cos(\alpha) \cos(\theta)} = \frac{ \sin( \alpha+\theta )}{ \cos(\alpha+\theta)} = \tan(\alpha+\theta) $

  • 0
    @J.M. I actually do not know. It was present in encyclopedias, but was not taught in schools, so I always tend to write things in $\tan$, $\sin$, $\cos$, avoiding $\cot$, $\sec$ and $\csc$.2011-10-14
2

First observe

$f(x,y,\theta ) = \frac{1 - y/x}{\tan \theta + y/x} $.

Then $ 1 - y/x = f * (\tan \theta + y/x)$, $\tan \theta = (1 - (1+f) y/x) / f$, and

$ \theta = \tan^{-1} \left( \frac{1 - (1+f) \frac{y}{x}}{f} \right) $.

Of course all of this assumes $x\neq 0$ and $\cos \theta \neq 0$. I'll leave you to figure out how to deal with those cases.

  • 1
    Note to all: The question was modified after this answer was posted, so it addresses the first version of the question.2011-10-14