# If $x \cos\theta+y\sin\theta=a$ and $x\sin\theta-y\cos\theta=b$, then $\tan\theta=\frac{bx+ay}{ax-by}$. (Math Olympiad)

If $$x \cos\theta+y\sin\theta=a$$ $$x\sin\theta-y\cos\theta=b$$ then $$\tan\theta=\frac{bx+ay}{ax-by}$$

I've spent many hours trying. Thanks in advance.

• Please preview your post before submitting it.As I can see no image has been added to the post.Edit it. – user517784 Feb 16 '18 at 3:34
• Hint: consider $a/b$. – David Feb 16 '18 at 3:36
• There is no need to link to an image. You can format the question using the advice here: math.stackexchange.com/help/notation – David K Feb 16 '18 at 3:47
• Somehow in the many hours you tried, you had some ideas you can share with us? At least to help us avoid telling you something you already know? (My hint would be: write $bx+ay$ and $ax-by$ in terms of $x,$ $y,$ and $\theta.$) – David K Feb 16 '18 at 3:52

For fun, here's a trigonograph: $$\tan\theta = \tan(\phi + \psi) = \frac{\tan\phi+\tan\psi}{1-\tan\phi\tan\psi} = \frac{\;\dfrac{y}{x}+\dfrac{b}{a}\;}{\;1-\dfrac{y}{x}\dfrac{b}{a}\;}=\frac{ay+bx}{ax-by}$$

We first try to find $\sin \theta$ in terms of $a, b, x, y$

Multiply equation first by $y$ and the equation $2^{nd}$ by $x$ and add the resultant equations to get $$\sin \theta= \frac {bx+ay}{x^2+y^2}$$

Now multiply the first equation by $x$ and second equation by $y$ to get following equations

$$x^2\cos \theta+xy\sin \theta=ax$$ And $$xy\sin\theta-y^2\cos\theta=by$$

Hence we get $$\cos\theta=\frac {ax-by}{x^2+y^2}$$ By subtracting resultant $2^{nd}$ equation from the resultant $1^{st}$ equation.

Using these values of $\sin\theta$ and $\cos\theta$ we get $$\tan\theta = \frac {bx+ay}{ax-by}$$

Hint:

Solve the two simultaneous linear equation for $\sin\theta,\cos\theta$

$$x\cos \theta+y\sin\theta=a$$

$$\implies x+y\tan\theta=a\sec\theta$$

$$\implies \sec \theta=\frac{x+y\tan\theta}{a} ...(1)$$

$$x\sin\theta-y\cos\theta=b$$

$$\implies x\tan\theta-y=b\sec\theta$$

$$\implies \sec\theta=\frac{x\tan\theta-y}{b}...(2)$$ From $$1$$ and $$2$$,

$$\frac{x+y\tan\theta}{a}=\frac{x\tan\theta-y}{b}$$

$$\implies bx+by\tan\theta=ax\tan\theta-ay$$

$$\implies \tan\theta(ax-by)=bx+ay$$

$$\tan\theta=\frac{bx+ay}{ax-by}$$

$$x \cos\theta + y\sin\theta = a, \,\, x \sin\theta - y\cos\theta = b$$. Therefore:

$$\dfrac{x \cos\theta + y\sin\theta}{x \sin\theta - y\cos\theta} = \dfrac{a}{b}$$ $$\implies \dfrac{x + y\tan\theta}{x \tan\theta - y} = \dfrac{a}{b}$$ $$\implies bx + by\tan\theta = ax \tan\theta - ay$$ $$\implies (ax - by) \tan\theta = bx + ay$$ $$\implies \tan\theta = \dfrac{bx + ay}{ax - by}$$