In AC-circuits, we have different kinds of power: active power $P$, reactive power $Q$ and apparent power $|S|$.
Let's say we have a circuit with a resistor $R$ and an inductor $L$. My understanding is that we then have $$P = \frac{U_\text{rms}^2}{R}, \,\,\,\,Q = \frac{U_\text{rms}^2}{\omega L}$$ independent of whether the elements are in series or parallel. Is this correct? If not, how do these powers look like when having the elements in series vs. when having them parallel?
If my current understanding is correct, I get the following problem. I think we have $$S = P + iQ = \frac{U_{\text{rms}}^2}{R} + i\frac{U_\text{rms}^2}{wL} = \frac{U_\text{rms}^2}{R} - \frac{U_\text{rms}^2}{iwL} = U_\text{rms}^2 \left(\frac{iwL+R}{iwLR}\right)$$ and $$S = \frac{U_\text{rms}^2}{Z}$$
So it seems that the impedance $Z$ would be also independent of whether we put the elements in series or parallel which is clearly false.
Where is my mistake?