##Ex13_1
import math
A = 100.##amplification gain
A_Beta = 1.##for sustain oscillation
Beta = A_Beta/A##feeback ratio
print'%s %.2f %s'%("A = ",(A),"")
print'%s %.2f %s'%("A_Beta = ",(A_Beta),"")
print'%s %.2f %s'%("Beta = ",(Beta),"")
##Ex13_2
import math
Rf = 0.5*10**6##feeback resistance
Cf = 100.*10**-12##capacitance across feedback
Rc = 0.5*10**6##critical resistance
f0 = 1./(2.*math.pi*Rf*Cf*(6.+4.*(Rc/Rf))**(1/2.))##frequency of oscillation
print'%s %.2f %s'%("Rf = ",(Rf),"ohm")
print'%s %.2e %s'%("Cf = ",(Cf),"F")
print'%s %.2f %s'%("Rc = ",(Rc),"ohm")
print'%s %.2f %s'%("f0 = 1/[2*pi*Rf*Cf*(6+4*(Rc/Rf))^(1/2)] = ",(f0),"Hz")
##Ex13_3
import math
Rf = 1.5*10**6##feeback resistance
Cf = 1.*10**-9##capacitance across feedback
f0 = 1./(2.*math.pi*Rf*Cf)##frequency of oscillation
print'%s %.2f %s'%("Rf = ",(Rf),"ohm")
print'%s %.2e %s'%("Cf = ",(Cf),"F")
print'%s %.2f %s'%("f0 = 1/(2*pi*Rf*Cf) = ",(f0),"Hz")
##Ex13_4
import math
C1 = 1.*10**-9##capacitance of capacitor 1
C2 = 10.*10**-9##capacitance of capacitor 2
L = 110.*10**-6##inductance of inductor
beta = C1/C2##feedback factor
f0 = ((C1+C2)/(C1*C2*L))**.5/(2.*math.pi)##operating frequency
print'%s %.2e %s'%("C1 = ",(C1),"F")
print'%s %.2e %s'%("C2 = ",(C2),"F")
print'%s %.2e %s'%("L = ",(L),"H")
print'%s %.2e %s'%("beta = ",(beta),"")
print'%s %.2f %s'%("f0 = ((C1+C2)/(C1*C2*L))^.5/(2*pi) = ",(f0),"Hz")
##note : unit given for inductance "L" is wrong in the textook for the above question.