# Equation with logarithms, why it can't be solved?

I'm trying to find the -3 dB frequency of a filter in Mathematica. Yet, my code doesn't seem to work as it produces imaginary values for the frequency.

Tfilter=(9.36*^6 + 44226.*s + 9.477*s^2)/(2.35521*^9 + 495801.*s + 9.477*s^2)
Eqn1 = 20*Log[10, Abs[Tfilter /. s -> I*2*Pi*f]] == -3
Solve[Eqn1, f]


What am I doing wrong? Is there any additional command I shall give to Mathematica?

• FindRoot[Eqn1,{f,1}] instantly returns {f->7530.29} Please check that VERY carefully to make certain that is correct. Perhaps Plot[Log[10,Abs[Tfilter/.s->I*2*Pi*f]]+3/20,{f,0,10^4}] will give you some useful insight.
– Bill
Aug 22, 2020 at 2:20
• @Bill thank you! Yes I have plotted the graph already so I knew the frequency was around that :) Aug 22, 2020 at 2:27
• This also does the job: Solve[Eqn1 && f \[Element] Reals, f]  Aug 22, 2020 at 8:19

Clear["Global*"]

Tfilter = (9.36*^6 + 44226.*s + 9.477*s^2)/(2.35521*^9 + 495801.*s +
9.477*s^2) // Rationalize // Simplify;


Since f is real, use ComplexExpand to eliminate Abs

Eqn1 = 20*Log[10, Abs[Tfilter /. s -> I*2*Pi*f]] == -3 // ComplexExpand //
Simplify;

sol = Solve[Eqn1, f, Reals] // N

(* {{f -> -7530.29}, {f -> 7530.29}} *)
`