import sympy as sp
# Define symbols
s, L, C = sp.symbols('s L C', real=True, positive=True)
# Define the equation in s-domain
Z_total = L*s**2 + 1/C
# Solve for s
s_solutions = sp.solve(Z_total, s)
print("Roots of the LC circuit equation (s-domain):")
print(s_solutions)
# Resonant frequency
omega_0 = sp.sqrt(1/(L*C))
print("\nResonant Frequency ω₀ =")
sp.pprint(omega_0)
Roots of the LC circuit equation (s-domain):
[]
Resonant Frequency ω₀ =
1
─────
√C⋅√L