Consider a voltage source connected in series to first an ideal diode, and the diode is then connected (in series) to a capacitor. Let the input [itex] v_I [/itex] be a sinusoid with a peak value [itex] V_p [/itex], and assume the diode to be ideal. As [itex] v_I [/itex] goes positive, the diode conducts and the capacitor is charged so that [itex] v_O = v_I [/itex]. (where [itex] v_O [/itex] is the voltage measured across the capacitor). This situation continues until [itex] v_I [/itex] reaches its peak value [itex] V_p [/itex]. Beyond the peak, as [itex] v_I [/itex] decreases the diode becomes reverse biased, and the output voltage remains constant at the value [itex] V_p [/itex].

I don't understand this:

**Beyond the peak, as [itex] v_I [/itex] decreases the diode becomes reverse biased**

I thought that an ideal diode has the characteristic, that when [itex] i_D >0 [/itex] then the voltage across the diode is 0. So why is it that when the sinusoid is decreasing (it's still above zero right?) the diode is reverse biased?

Thanks in advance!