I would like to compute the real and imaginary part of a complex valued rational function $Z_b=\frac{1}{\frac{1}{\frac{1}{C_1 \text{i$\omega $}}+L \text{i$\omega $}+R}+C_2 \text{i$\omega $}}$ that depends on parameters $R,C_1,C_2,L,\omega$ which are all real.
$Z_b$ is defined in the notebook code below:
Subscript[Z, a] := s*L + 1/(s*Subscript[C, 1]) + R
Zb := 1/(1/Subscript[Z, a] + s*Subscript[C, 2])
Subscript[Z, b] := Zb /. s -> I\[Omega]
$Assumptions =
L > 0 && R > 0 && Subscript[C, 1] > 0 &&
Subscript[C, 2] > 0 && \[Omega] > 0
ComplexExpand[Subscript[Z, b]]
Now I am not completely sure which functions I could use for this. I tried using ComplexExpand
but that did not seem to give me the desired result and instead simply gave me back the definition of $Z_b$.
C[1]
etc are reserved symbols. In general, it is better not to begin the names of user variables with capital letters. $\endgroup$ComplexExpand
does not take the optionAssumptions
so you need to includeFullSimplify
, i.e.,ComplexExpand[ReIm[Subscript[Z, b]]] // FullSimplify
$\endgroup$