import numpy as np
import matplotlib.pyplot as plt
from IPython.display import display,Math
x = np.linspace(0,6*np.pi,100)
plt.plot(x,np.sin(x),'r',label='$\\sin(\\theta)$')
plt.plot(x,np.cos(x),'b',label='$\\cos(\\theta)$')
plt.legend()
plt.xlabel('rad.')
plt.ylabel('function value')
plt.show()
th = np.linspace(0,4*np.pi,100)
plt.plot(th,np.tan(th),'k')
plt.ylim([-5,5])
plt.show()
ang = np.random.rand()*2*np.pi
print(ang)
tan = np.tan(ang)
print(tan)
sc = np.sin(ang) / np.cos(ang)
print(sc)
print(tan - sc)
#c**2 + s**2 = 1
thetas = np.linspace(0,2*np.pi,5)
print(thetas)
print(np.cos(thetas)**2 + np.sin(thetas)**2)