# Why sin and cos do not get the same result that as tan, in this case?

Let $x=3$ and $y=3$. Then $\tan\theta = \frac{3}{3} = 1$.

However if we use pythagorean theorem to find the value of hypotenuse and $\sin$ or $\cos$ function we get very different value. Here it is:

$$\text{hypotenuse} = \sqrt{3^2 + 3^2} = \sqrt{18} = 3\sqrt{2}\\ \sin\theta = \frac{3}{3\sqrt{2}} = \frac{1}{\sqrt{2}} \text{ or:}\\ \cos\theta = \frac{3}{3\sqrt{2}} = \frac{1}{\sqrt{2}}$$

What I am doing so horribly that getting such a wrong result? I think this is wrong because the value of $\theta$ should be equal regardless of trig function as long as the value of $x$, $y$ and $r$ are the same.

• Everything is correct. What's the problem? – Hans Lundmark Mar 28 '14 at 13:47
• The value of theta should not be different. Same x and y value should always give you the same angle. – bman Mar 28 '14 at 13:50
• But you're not computing $\theta$, you're computing $\tan\theta$,$\sin\theta$ and $\cos\theta$... – fgp Mar 28 '14 at 13:51

There is nothing wrong here, you have a triangle with sides $3,3,3\sqrt 2$. Its angle $\theta$ (the $45$ degree one) has $\tan(\theta)=1$ and $\cos(\theta)=\sin(\theta)=\frac{1}{\sqrt2}$
The value of theta is quite constant, in fact it is $45°$ in degrees or $\frac\pi4$ in radians. It is true, of course, that $\tan(\theta)\neq \sin(\theta)$, but that is nothing unusual.
Recall that $\tan(\theta)=\frac{\sin(\theta)}{\cos(\theta)}$, which is true for the values that you used, since $\frac{\frac{1}{\sqrt{2}}}{\frac{1}{\sqrt{2}}}=1$.