In the attached circuit , I I am confused about the corresponding KVL equations which will be used to draw the waveform ..this is what I am doing ..please see if I am going right or not..?? when Vi >0 , the diode will be reverse biased so , the diode will be open , so the equation should be -Vi+Vc+Vo =0 , Vo=Vi-Vc & since the capacitor will be fully charged so Vc=Vm..!! then Vo =Vi-Vm.>!! And when Vi<0 , it is forward biased and diode is short-circuited.. in that case would'nt the V0 zero..???