syms ZR1 ZR2 ZL

%

Ze = 1 / (1 / ZR2 + 1 / ZL)

%

Z = Ze / (ZR1 + Ze)

%

syms R1 R2 L w real

%

Z = subs(Z, ZR1, R1)
Z = subs(Z, ZR2, R2)
Z = subs(Z, ZL, i * w * L)

%

a = simplify(real(Z))

%

b = simplify(imag(Z))

%

b/a