Analysis of rc circuit