macapa=900*10**-12##farad
micapa=90*10**-12##farad
r=100*10**3##ohm
#(a) frequency range
fremin=1/(2*3.14*r*macapa)
print "min frequency = %0.2f"%((fremin))+"hertz"
fremax=1/(2*3.14*r*micapa)
print "max frequency = %0.2f"%((fremax))+"hertz"
#(b) r3
r=10*10**3##ohm
r3=2*r
print "resistance r3 = %0.2f"%((r3))+"ohm"
from math import sqrt
c1=0.004*10**-6##farad
c2=0.03*10**-6##farad
induct=4*10**-3##henry
#min voltage
mivolt=c2/c1
print "min voltage >= %0.2f"%((mivolt))+"volt"
#frequency
freque=(((1/(2*3.14)))*sqrt((c1+c2)/(induct*c1*c2)))
print "frequency = %0.2f"%((freque))+"hertz"
from math import sqrt
induct=500*10**-6##henry
induc1=5000*10**-6##henry
mutuin=300*10**-6##henry
c1=150*10**-12##farad
#(a) frequency
indcto=induct+induc1+2*mutuin
freque=1/((2)*3.14*sqrt(indcto*c1))
#(b) condition
r=10*10**3##ohm
conduc=8*10**-3##ampere per volt
r1=50*10**3##ohm
r_=r*r1/(r+r1)
volgai=conduc*r_
print "frequency = %0.2f"%((freque))+"hertz"
ratio1=(induc1+mutuin)/(induct+mutuin)
ratio1=ratio1*volgai
print "ratio1 greater than 1 so oscillations possible"
from math import sqrt
cgs=5*10**-12##farad
cds=1*10**-12##farad
conduct=10*10**-3##ampere per volt
rd=50*10**3##ohm
r=10*10**6##ohm
induct=0.5##henry
c1=0.05*10**-12##farad
rse=1*10**3##ohm
c=1*10**-12##farad
#(1) c11
c11=((((cds*cgs)/(cds+cgs))+1)*c1)/(((cds*cgs)/(cds+cgs))+1+c1)
print "resonanting capacitance = %0.2e"%((c11))+"farad"
#(2) frequency
freque=((sqrt(2))/(2*3.14*sqrt(induct*c11)))
print "resonant frequency = %0.2e"%((freque))+"hertz"
#(3) frequency parallel
freque=1/(2*3.14*sqrt(((induct*c*c1))/(c+c1)))
print "parallel resonant frequency = %0.2e"%((freque))+"hertz"
#frequency series
freque=1/((2*3.14*sqrt(induct*c1)))
print "series resonant frequency = %0.2e"%((freque))+"hertz"
qualit=((induct/c1)**(0.5))/rse
print "quality factor = %0.2f"%((qualit))
#correction required in book
#(4) loop gain
abeta1=conduct*rd*cds/cgs
print "loop gain = %0.2f"%((abeta1))
#(5)
w=r*(cds+cgs)
print "bias = %0.2e"%((w))+"second"
from math import sqrt
c=200*10**-12##farad
c1=1000*10**-12##farad
induct=100*10**-6##henry
#(1) frequency
ceq=(c*c1)/(c+c1)
freque=1/(2*3.14*(sqrt(induct*ceq)))
print "frequency = %0.2e"%((freque))+"hertz"##correction in the book
gaimin=c1/c
print "gain = %0.2f"%((gaimin))
induc1=0.4*10**-3##henry
c=0.004*10**-6##farad
freque=120*10**3##hertz
induct=((1/(4*3.14**2*freque**2*c)))-induc1
print "inductance = %0.2e"%((induct))+"henry"
from math import sqrt
induct=0.33##henry
c=0.065*10**-12##farad
c1=1*10**-12##farad
r=5.5*10**3##ohm
#(1) series resonant frequency
freque=(1/(2*(3.14)))*sqrt(1/((induct)*c))
print "frequency = %0.2f"%((freque))+"hertz"
#(2)exceed of frequency
ratio1=sqrt((1+(c/c1)))
print "ratio parallel series = %0.2f"%((ratio1))
#correction required in the book
#(3) quality factor
qualit=(1/r)*sqrt(induct/c)
print "quality factor = %0.2f"%((qualit))