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
    Hint: Take a triangle with sides $x$ and $y$. Just divide the numerator and denominator by $\sqrt{x^{2}+y^{2}}$.2011-10-14
  • 1
    What is $f$ equal to? What you have there looks to have been the result of rotating coordinates...2011-10-14
  • 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) $$

  • 1
    Simply beautiful.2011-10-14
  • 0
    Better yet, it might have been more natural to set $x=\rho\cos\,\beta$ and $y=\rho\sin\,\beta$, leading to the expression $\cot(\theta+\beta)$...2011-10-14
  • 1
    @j.M. That is how I had it initially, but in former Soviet Union, they did not favor cotangents, so I changed the parameterization to get the tangent. Why do you say the contangent would have been better ?2011-10-14
  • 0
    I did say "might", and somehow it felt more natural to have $x$ correspond to "cosine" and $y$ to correspond to "sine". The two approaches are equivalent, of course... :) Interesting bit about Soviet trigonometry... why is $\mathrm{ctg}$ frowned upon?2011-10-14
  • 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.

  • 3
    One might need the services of the two-argument arctangent here... :)2011-10-14
  • 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