http://www.docircuits.com/my-circuit/21 ... ave-actual

How to I go about finding (an expression for) the voltage across the capacitor in this circuit. I'm looking for a method of analysis that will produce an output like that provided in the results tab of the link above. The output appears to be in the form of a solution to a simple RC circuit (V(1-e^x)), plus a modulation term for the ripple.

I run in to trouble attempting to apply KCL to the capacitor node because of the sign in the capacitor leg. KVL works for the left half of the circuit without the diode and a supply of 170abs(sin(x)) (just to investigate full wave rectification), but then current flows back in to the supply when its voltage is below the capacitor.

Are iterative/numerical methods the only way to go about this?