Case I: When Vin>0 The diode will conduct, thus the equivalent circuit can be given as, ∴Vout−Vin
Case II: when the input voltage Vin<0. The diode will not conduct, thus the equivalent circut can be given as
∴Vout=VinRR+R=Vin2=0.5Vin