# How do I compute $\cos$ and $\sin$ in a given interval if I know $\tan$?

$$\tan x = -\frac{2}{3}$$

when $\dfrac{5\pi}{2} < x < 3\pi$.

I understand this, but I don't know how to calculate the two other functions' values, $\cos x$, $\sin x$, using $\tan x$

So, $$\frac{\sin x}{-2}=\frac{\cos x}3=\pm\frac{\sqrt{\sin^2x+\cos^2x}}{\sqrt{(-2)^2+3^2}}=\pm\frac1{\sqrt{13}}$$

So, if $\sin x=\mp\frac2{\sqrt{13}},\cos x=\pm\frac3{\sqrt{13}}$

Now as $\frac{5\pi}2<x<3\pi,$ x lies in the second Quadrant.

Using "All Sin Tan Cos" formula, $\sin x>0$ and $\cos x<0$

So, $\sin x=\frac2{\sqrt{13}}, \cos x=-\frac3{\sqrt{13}}$

$$\frac{\sin x}{\cos x} = \frac{-2}{3} = \frac{-2/\sqrt{(-2)^2+3^2}}{3/\sqrt{(-2)^2+3^2}} = \underbrace{\frac{-2/\sqrt{13}}{3/\sqrt{13}} = \frac{2/\sqrt{13}}{-3/\sqrt{13}}}_{\text{Which one of these?}}.$$

One divides by $\sqrt{(-2)^2+3^2}$ in order to make the squares of the numerator and denominator add up to $1$, since one must have $\sin^2 x+\cos^2 x = 1$.

One chooses between the two alternatives over the $\underbrace{\text{underbrace}}$ by looking at which quadrant one is in. In that quadrant, the sine is positive and the cosine is negative.

From $\frac{5\pi}2<x<3\pi$, we conclude that $\sin x>0$, $\cos x<0$. Now from $$\frac49=\tan^2x =\frac{\sin^2 x}{\cos^2 x}=\frac{\sin^2 x}{1-\sin^2x}$$ we obtain $$\frac49(1-\sin^2x)=\sin^2x$$ hence $$\sin^2 x=\frac4{13},\qquad \cos^2 x=1-\sin^2x=\frac9{13}$$ and ultimately (using the above remark about the signs) $$\sin x=\frac2{\sqrt{13}},\qquad \cos x=-\frac3{\sqrt{13}}.$$

• This answer seems more complicated than it needs to be. Mar 2, 2013 at 13:56

Consider the trigonometric identity:

$$\sec^2 x = \tan^2 x + 1.$$

Since $\sec x = \frac{1}{\cos x},$ this implies that

$$|\cos x \,| = \frac{1}{\sqrt{\tan^2 x + 1}}.$$

Note that $\tan (x + \pi) = \tan x$, but $\cos (x + \pi) = -\cos x,$ so we really do need the absolute value function (or a $\pm$ sign) in the equation above. Additional information is needed in order to decide whether to use the positive or negative value of $\cos x$; if we are given that $\frac52 \pi < x < 3\pi$ then we should use the negative value (since $\cos x < 0$ for every such $x$), hence

$$\cos x = -\frac{1}{\sqrt{\tan^2 x + 1}} = -\frac{3}{\sqrt{13}}.$$

For $\sin x$, simply take

$$\sin x = (\cos x)(\tan x) = \left(-\frac{3}{\sqrt{13}}\right)\left(-\frac23\right) = \frac{2}{\sqrt{13}}.$$

If we did not already know that $\cos x < 0$ from the restriction $\frac52 \pi < x < 3\pi,$ we would have to take other measures to deal with the sign of $\cos x$. For example, if we know that $2\pi < x < 3\pi,$ then that alone does not tell us whether $\cos x$ should be positive or negative; but since $\sin x > 0$ for every $x$ in that range and we are given that $\tan x = -\frac23 < 0$, then $\cos x = \frac{\sin x}{\tan x} < 0.$