Analysis of two cases of capacitors