# Understanding equation for the quality factor of an RLC circuit?

In my textbook for a course on Circuit Analysis I came across an equation for the quality-factor of an RLC circuit. However, I don't quite understand their reasoning. The explanation that follows is a summary of what they provide me with:

The quality factor can be defined using the impedance of either the inductor or the capacitor:

$$Q = \frac{X_{C}}{R} = \frac{X_{L}}{R}$$

Multiplying by $$\I\$$ on the top and bottom of the equation gives the corresponding voltage across the associated component. Therefore, $$\Q\$$ may also be defined as:

$$Q = \frac{V_{C}}{V_{R}} = \frac{V_{L}}{V_{R}}$$

Since at response $$\V_{R}\$$ is equal to the supply voltage, it follows that:

$$Q = \frac{V_{L}}{V} = \frac{V_{C}}{V}$$

Finally, combining this last equation with that of the angular velocity at resonance:

$$\omega_{0} = \frac{1}{\sqrt{LC}}$$

gives the following expression for a series RLC circuit:

$$Q = \frac{1}{R} \cdot \sqrt{\frac{L}{C}}$$

My attempt to derive their equation was to substitute the definition of the angular velocity at resonance (because they said they used it to derive the last equation) with the first equation as follows:

$$Q = \frac{X_{C}}{R} = \frac{1}{R} \cdot \frac{X_{C}}{1} = \frac{1}{R} \cdot \frac{(\frac{1}{j\omega C})}{1} = \frac{1}{R} \cdot \frac{1}{j\omega C} = \frac{1}{R} \cdot \frac{1}{jC(\frac{1}{\sqrt{LC}})} = \frac{1}{R} \cdot \frac{\sqrt{LC}}{jC}$$

However I haven't been able to get rid of the imaginary component, and I don't see how they made the steps to the final equation they derived. Could anyone perhaps explain how this was derived?

You have confused things by equating $$\X_C\$$ with $$\\dfrac{1}{j\omega C}\$$.
When talking about Q factors, $$\X_C\$$ is a magnitude with no sign hence it shouldn't be matched up with the reactive impedance of a capacitor because of "j". So, dump the "j" part and you get the right answer.