How to derive the PDF of A Cos(x) using the Wolfram Language?

Let Y = cos(X), where X is uniformly distributed in the interval (0, 2 pi]. Find the pdf of Y.

I know the answer, but want to verify using Mathematica. what will be the code?
Let Y = - cos(X), then what will be the pdf?

Untitled.gif

Hi,

what about this?

PDF[TransformedDistribution[Cos[x], x \[Distributed] UniformDistribution[{0, 2 Pi}]], y]

Cheers,

Marco

thank you