import math
#Variables
R1 = 1.0 * 10**3 #Resistance (in ohm)
R2 = 100.0 * 10**3 #Resistance (in ohm)
f1 = 159.0 #Frequency (in Hertz)
#Calculation
C = 1.0/(2*math.pi*R2*f1) #Capacitance (in Farad)
#Result
print "Capacitance required in the circuit is ",round(C * 10**6,2)," micro-Farad."
import math
#Variables
R1 = 1.0 * 10**3 #Resistance (in ohm)
Rf = 51.0 * 10**3 #Resistance (in ohm)
Cf = 0.01 * 10**-6 #Capacitance (in Farad)
#Calculation
f = 1.0/(2*math.pi*Rf*Cf) #Frequency (in Hertz)
fmin = 10* f #Minimum frequency required (in Hertz)
#Result
print "The cut-off frequency of an integrator circuit is ",round(f)," Hz."
print "Minimum non-linear operating frequency is ",round(fmin)," Hz."
#Printing mistake about the value of Cf. It should be 0.01 micro-Farad.
import math
#Variables
R1 = 10.0 * 10**3 #Resistance (in ohm)
C1 = 0.01 * 10**-6 #Capacitor (in Farad)
#Calculation
f2 = 1.0/(2*math.pi*R1*C1) #Frequency (in Hertz)
fmax = f2 / 10.0 #Maximum linear operating freqeuncy (in Hertz)
#Result
print "Cut-off frequency is ",round(f2,1)," Hz."
print "Maximum linear operating frequency is ",round(fmax)," Hz."
#Printing mistake in book about the value of f2.
import math
#Variables
R1 = R2 = 51.0 * 10**3 #Resistance (in ohm)
C1 = C2 = C = 0.001 * 10**-6 #Capacitance (in Farad)
#Calculation
fo = 1.0/(2*math.pi*R1*C1) #Resonant frequency (in Hertz)
#Result
print "The frequency of oscillations is ",round(fo,1)," Hz."