State Space Approach to Solving RLC circuits