Solving RC Charging and Discharging With Separation of Variables