Answer
$$\cos x=\frac{\sqrt5}{5}$$
$$\sin x=\frac{2\sqrt5}{5}$$
Work Step by Step
$$\tan x = 2, x\in\Big[0,\frac{\pi}{2}\Big]$$
1) As $x\in\Big[0,\frac{\pi}{2}\Big]$, it means angle $x$ is in the first quadrant, so $\sin x\gt0$ and $\cos x\gt0$.
2) To find $\cos x$, we employ the formula: $$\tan^2x+1=\frac{1}{\cos^2x}$$
$$\frac{1}{\cos^2x}=2^2+1=5$$
$$\cos^2x=\frac{1}{5}$$
$$|\cos x|=\frac{\sqrt5}{5}$$
Since $\cos x\gt0$, $$\cos x=\frac{\sqrt5}{5}$$
3) To find $\sin x$, we employ the formula:
$$\tan x=\frac{\sin x}{\cos x}$$
$$\sin x=\tan x\cos x=2\times\frac{\sqrt5}{5}=\frac{2\sqrt5}{5}$$