Assuming the ideal diode, draw the output waveform for the circuit given in fig. (a), explain the waveform.