from sympy import *
s, Vpk, C1, C2, C3, R1, R2 = symbols('s Vpk C1 C2 C3 R1 R2')
init_printing(use_unicode=True)
zC1 = 1 / (s*C1)
zC2 = 1 / (s*C2)
zC3 = 1 / (s*C3)
z22 = R2 + zC2
z223 = zC3*z22/(zC3+z22)
z2231 = zC1+z223
V1 = Vpk / s
# V1 = symbols('V1')
VM1 = V1 * z2231/(R1+z2231)
for e in [zC1, zC2, zC3, z22, z223, z2231, VM1]:
pprint(e)
print('***')
1 ──── C₁⋅s *** 1 ──── C₂⋅s *** 1 ──── C₃⋅s *** 1 R₂ + ──── C₂⋅s *** 1 R₂ + ──── C₂⋅s ─────────────────────── ⎛ 1 1 ⎞ C₃⋅s⋅⎜R₂ + ──── + ────⎟ ⎝ C₃⋅s C₂⋅s⎠ *** 1 R₂ + ──── C₂⋅s 1 ─────────────────────── + ──── ⎛ 1 1 ⎞ C₁⋅s C₃⋅s⋅⎜R₂ + ──── + ────⎟ ⎝ C₃⋅s C₂⋅s⎠ *** ⎛ 1 ⎞ ⎜ R₂ + ──── ⎟ ⎜ C₂⋅s 1 ⎟ Vpk⋅⎜─────────────────────── + ────⎟ ⎜ ⎛ 1 1 ⎞ C₁⋅s⎟ ⎜C₃⋅s⋅⎜R₂ + ──── + ────⎟ ⎟ ⎝ ⎝ C₃⋅s C₂⋅s⎠ ⎠ ─────────────────────────────────────── ⎛ 1 ⎞ ⎜ R₂ + ──── ⎟ ⎜ C₂⋅s 1 ⎟ s⋅⎜R₁ + ─────────────────────── + ────⎟ ⎜ ⎛ 1 1 ⎞ C₁⋅s⎟ ⎜ C₃⋅s⋅⎜R₂ + ──── + ────⎟ ⎟ ⎝ ⎝ C₃⋅s C₂⋅s⎠ ⎠ ***
C = Symbol('C', real=True)
R = Symbol('R', real=True)
VM1 = VM1.subs([(c, C) for c in [C1, C2, C3]])
VM1 = VM1.subs([(r, R) for r in [R1, R2]])
VM1 = VM1.simplify()
VM1
t = symbols('t')
VM1t = inverse_laplace_transform(VM1, s, t, noconds=True)
simplify(VM1t)