TITLE: Find all $x$ such that $\sin x = \frac{4}{5}$ and $\cos x = \frac{3}{5}$.
QUESTION [5 upvotes]: Let 
  $$
\left\{ 
\begin{array}{c}
\sin x = \frac{4}{5} \\ 
\cos x = \frac{3}{5}
\end{array}
\right. 
$$
Find all of the possible values for $x$.

My try: By dividing the equations we obtain $\tan x = \frac{4}{3}$ and then $$x = \arctan\frac{4}{3} + k\pi$$ 
But WolframAlpha gives 
$$x = 2k\pi + 2\arctan\frac{1}{2}$$ 
Using $\arctan(x)+\arctan(y) = \arctan\left(\frac{x+y}{1-xy}\right)$, we get $$2\arctan\frac{1}{2} = \arctan\frac{4}{3}$$ 
but the answers are different still.
Why does this happen? And what is the correct answer?

REPLY [3 votes]: $\cos x=\dfrac35$
$\implies x=2n\pi\pm\arccos\dfrac35$
As for $x>0,\arccos x=\arcsin\sqrt{1-x^2}=\arctan\dfrac{\sqrt{1-x^2}}x$
$\implies x=2n\pi\pm\arcsin\dfrac45$ where $n$ is any integer
Now , $\sin x=\sin\left(2n\pi\pm\arcsin\dfrac45\right)=\pm\dfrac45$
But $\sin x=+\dfrac45$
$$\implies x=2n\pi+\arcsin\dfrac45=2n\pi+\arccos\dfrac35=2n\pi+\arctan\dfrac43$$
Further if $2y=\arctan\dfrac43,\dfrac43=\tan2y=\dfrac{2\tan y}{1-\tan^2y}$
Solve the  quadratic equation in $\tan y$ to find the values to be $\dfrac12,-2$
But as $0<2y<\dfrac\pi2, y=\arctan\dfrac12$
which can be validated using Inverse trigonometric function identity doubt: $\tan^{-1}x+\tan^{-1}y =-\pi+\tan^{-1}\left(\frac{x+y}{1-xy}\right)$, when $x<0$, $y<0$, and $xy>1$