Consider following circuit:
simulate this circuit – Schematic created using CircuitLab
The question is determining output voltage. D1 is an ideal diode with zero threshold voltage.
Certainly when input goes from zero to peak voltage the diode is off but the problem is after that time. Both on and off assumptions for the diode is valid when $$T/4\le t\le T/2$$ If we assume diode is off then $$V_D = 0 - V_{out} = -V_1\lt 0$$ because $$T/4\le t\le T/2 \implies 0\le V_1\le V_{peak}$$ On the other hand assuming diode is on leads to $$ i_D = -C_1V_1' \gt 0 \implies V_1'\lt 0$$ which is true because $$V_1' = V_p\omega \cos{\omega t} \ \ \ \ and \ \ \ T/4\le t\le T/2$$ What is my mistake here? According to my book during entire positive half cycle diode is off but I don't know what's the problem with on state.