It is fairly complicated, and it does involve differential equations. The solution (the voltage across the capacitor as a function of time) has two parts, a transient response (due to the turn-on of the un-energized circuit) and a steady-state response (the sinusiodal output after the transient has died off). Here is a good step-by-step derivation of the solution using Laplace transforms to solve the differential equation: