Need to find the transfer function of this band rejection filter via its differential equation but cannot figure it out since it was some time ago I studied electrical circuits.
I know that I should use Kirchoff´s laws as well as the differential equations for the different components:
Inductor: $$ V=L \frac{di}{dt}$$ Capacitor: $$ V = \frac{1}{C}\int i dt$$ But I´m not sure in how to move on. Any help on this matter is would be much appreciated.
Another way to get hold of the transfer function would be by going via the circuits impedance, which I thought I knew how to do but after simulating my TF´s Bodeplot in MATLAB with the same in LTSpice I must be doing something wrong. First of all, the parallel combination should result in: $$ Z_{tot}=\frac{Z_C Z_L}{Z_C+Z_L}=\frac{\frac{L}{C}}{\frac{1}{jwC}+jwL}=\frac{jwL}{1+j^2w^2 CL}=\frac{sL}{1+s^2CL} $$
As usual: $$Z_C=\frac{1}{jwC}, Z_L=jwL, Z_R=R$$
And the voltage divider should give: $$ H=\frac{V_O}{V_I}=\frac{Z_2}{Z_1+Z_2}=\frac{Z_2}{Z_{tot}+Z_2} = \frac{Z_R}{\frac{sL}{1+s^2CL}+Z_R} \frac{R}{\frac{sL}{1+s^2CL}+R} = \frac{R(1+s^2CL)}{sL+R(1+s^2CL)} $$
And breaking out RCL I get: $$ \frac{RCL(s^2+\frac{1}{CL})}{RCL(s^2+\frac{s}{RC}+\frac{1}{CL})} = \frac{s^2+\frac{1}{CL}}{s^2+\frac{s}{RC}+\frac{1}{CL}}$$
But after making a Bode of this in MATLAB with the values C=20nF, L=50mH and R=5k I do not get the same cut-off frequency in both softwares. What is it I´m doing wrong?