I need to choose the probability distribution $f_Y(y)$ of a random variable $Y$ such that the variable $Z=Y\cos(X)$ is normally distributed with zero mean, i.e. $$f_Z(z)=\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{z^2}{2\sigma^2}}$$ for the independent and uniform distributed variable $X$, i.e. $$f_X(x)=\frac{1}{2\pi}$$ for $x\in[0,2\pi]$.
I started looking for the probability distribution of $K=\cos(X)$ and found $f_K(k)=\frac{1}{\pi\sqrt{1-k^2}}$ for $k\in[-1,1]$. Next, I wrote down the product distribution for $Y$ and $K$ (http://en.wikipedia.org/wiki/Product_distribution)
$$f_Z(z)=\int_{-\infty}^\infty{f_Y(x)f_K\left(\frac{z}{x}\right)\frac{1}{|x|}dx}$$
and put in what I have:
$$\int_{|z|<|x|}{f_Y(x)\frac{1}{\pi\sqrt{1-z^2/x^2}}\frac{1}{|x|}dx}\stackrel{!}{=}\frac{1}{\sqrt{2\pi}\sigma}e^{-\frac{z^2}{2\sigma^2}}$$
But now I´m stuck. How to find the $f_Y$ that fulfills this equation?
Response to answers
Great, $Y=\sqrt{-2 \ln(U)}$ with $U\sim\mathcal{U}[0,1]$ does the job for $Z\sim\mathcal{N}_{0,1}$ and thus $Y=\sqrt{-2\sigma ^2 \ln(U)}$ leads to $Z\sim\mathcal{N}_{0,\sigma}$, so:
$$f_Y(y)=\frac{y}{\sigma ^2}e^{-\frac{y^2}{2\sigma ^2}}$$
Extension to nonzero mean
Now how would one go about extending this to allow for nonzero means, i.e. $Z´=Y´\cos(X)\sim\mathcal{N}_{\mu,\sigma}$?
We can write $Z´=Z+\mu$ and thus $Y´=Y+\mu/\cos(X)$ and find for $Q=\mu/\cos(X)$ $f_Q(q)=\frac{|\mu|}{q^2\sqrt{1-\mu^2/q^2}}$ for $|q|>|\mu|$. Then, because Y and Q are independent, the probability distribution for $Y´$ should be the convolution $$f_{Y´}(y´)=\int_{-\infty}^\infty{f_Y(y´-\tau)f_Q(\tau)d\tau}$$ correct? And now i´m stuck on this :-)
$f_{Y´}(y´)$ should look like the blue curve here:

Suppose $Y$ is exponentially distributed with expected value $\sigma$ so that $\Pr(Y>y)=e^{-y/\sigma}$, and let \begin{align} Z_1 & = \sqrt{-2\log_e Y}\,\cos X, \\ Z_2 & =\sqrt{-2\log_e Y}\,\sin X. \end{align} Then each of $Z_1,Z_2$ is normally distributed with expected value $0$ and variance $\sigma^2$ and $Z_1,Z_2$ are indepedent.
See this Wikipedia article about the Box–Muller transform.
Postscript in response to comments: If $Z_1,Z_2\sim\text{i.i.d. }N(0,1)$ then their joint density is $$ f_{(Z_1,Z_2)} (z_1,z_2) = \text{constant}\cdot e^{-z_1^2/2} e^{-z_2^2/2} = \text{constant} \cdot e^{-(z_2^2+z_2^2)/2}. $$ Since this density is constant on circles defined by $z_a^2+z_2^2=\text{radius}^2$, the angle that the random point makes with the positive $z_1$-axis is uniformly distributed between $0$ and $2\pi$. Hence its coordinates are the cosine and sine of a uniformly distributed random angle. Then the remaining question is that of the distribution of the distance of the random point from the origin.