# Calculating $\tan 2\theta$ in terms of correlation coefficients and variances

I know I am asking a few questions and I apologize for that. However I shall try to read the solutions and know the loopholes in my theory. Here it is:

If $u=x\cos \theta+y\sin\theta$ and $v=y \cos \theta-x\sin\theta$. The variables $u$ and $v$ are uncorrelated, then how may I prove that $$\tan 2\theta=\frac{2r_{xy}s_xs_y}{s_x^2-s_y^2}$$ where $r_{xy}$ is the correlation co-efficient between $x$ and $y$ and $s_i$ is the standard deviation of a variable $i$. Sorry for asking so many questions without much effort but it is late at night now and I need to identify my faults soon.

-
Hint: Algebraically manipulate $0 = \text{Cov}(u,v)$. You should expect to use the double-angle formulae $\cos(2\theta)=\cos^2(\theta)-\sin^2(\theta)$ and $\sin(2\theta) = 2\sin(\theta)\cos(\theta)$. – whuber Sep 1 '12 at 20:13
Thanks.I solved this one too. – user13772 Sep 2 '12 at 4:08
Alright, I think I managed to solve it.Here is my attempt: I shall use the notations described in my post. Let $\mu_k$ denoted the mean of a random variable $k$.
$(u_i-\mu_x)=(x_i-\mu_x)\cos\theta+(y_i-\mu_y)\sin\theta$ and $v_i-\mu_v=(y_i-\mu_y)\cos\theta-(x_i-\mu_x)\sin\theta$.Note that $$Cov(u,v)=\frac{1}{n}\sum_{i=1}^n(u_i-\mu_u)(v_i-\mu_v)=0$$.Plugging in the values of $(u_i-\mu_u)$ and $v_i-\mu_v)$ and and expanding, we get $$\sum_{i=1}^n[(x_i-\mu_x)(y_i-\mu_y)\cos^2\theta-(x_i-\mu_x)^2\sin\theta\cos\theta+(y_i-\mu_y)^2\cos\theta\sin\theta-(x_i-\mu_x)(y_i-\mu_y)\sin^2\theta]$$.The result follows.