Finding Values of cosx, sinx, cos2x and sin2x Given Value of tanx

Suppose we have that an angle  
\[\theta\]
  is acute, and that  
\[tan \theta=x\]
.
In terms of  
\[x\]
  find  
\[sin \theta, \: cos \theta, cos 2 \theta , sin 2 \theta \]
.
\[ tan \theta = \frac{sin \theta}{cos \theta}\]

\[x = \frac{\sqrt{1-cos^2 \theta}}{cos \theta}\]

\[x^2 = \frac{1-cos^2 \theta}{cos^2 \theta}\]

\[x^2cos^2 \theta = 1- cos^2 \theta\]

\[cos^2 \theta (x^2+1) = 1\]

\[cos \theta = \frac{1}{\sqrt{1+x^2}} \]

\[sin \theta = \sqrt{1-cos^2 \theta}=\sqrt{1 -(\frac{1}{\sqrt{1+x^2})^2}} = \sqrt{\frac{1+x^2-1}{1+x^2}}=\frac{x}{\sqrt{1+x^2}} \]

\[cos 2 \theta = 2cos^2 \theta -1=2 \frac{1}{1+x^2}-1=\frac{2-(1+x^2)}{1+x^2}=\frac{1-x^2}{1+x^2}\]

\[sin 2 \theta = 2 sin \theta cos \theta = 2 \frac{x}{\sqrt{1+x^2}} \frac{1}{\sqrt{1+x^2}} =\frac{2x}{1+x^2}\]