# Generating Random Number From Discontinuous Distribution Function

I have the following density function :

I want to generate random variate from this density function according to acceptance-rejection algorithm , Inverse transform algorithm and composition method . How can I solve this problem ?