Ch 4 Intro to Trig

472 days ago by mpaul

A problem with degree measurement of angles is that degrees are arbitrary. 

A circle does not naturally contain 360^{\circ}.  Humans just made that up.

A natural way to measure angles is to divide arc length by radius.

In other words, we use the radius as a ruler to measure the arc.  This is called radian measure.

@interact def radian_measure(s = 1, r = 1): theta = s/r print 'radian measure = arc/radius =',theta,'=',round(theta, 4) print 'degree measure =',theta*180/pi,'=',round(theta*180/pi,4) x,y = r*cos(theta),r*sin(theta) print '\nP =',(x,y),'=',(round(x,4),round(y,4)) C = circle((0,0), r) P = (r*cos(theta), r*sin(theta)) radius = line([(0,0),P], color = 'blue', thickness = 3) a = line([P,(r*cos(theta),0)], color = 'black', linestyle = '--') b = line([P,(0,r*sin(theta))], color = 'black', linestyle = '--') P = point(P, size = 50, color = 'red') arc_length = arc((0,0),r,sector=(0,theta),color='blue', thickness = 3) show(C+P+radius+arc_length+a+b, aspect_ratio = 1) 
       

Click to the left again to hide and once more to show the dynamic interactive window

If s = arc length, r = radius length, and \theta = a central angle, then in radian measure \theta = \frac{s}{r}.

This lets us easily define arc length as s = \theta \cdot r.

def arc_length(theta, radius): return theta*radius 
       

The ratio of arc length to circumference is equal to the ratio of degree measure to 360^{\circ}:

\frac{s}{2\pi r} = \frac{D}{360}

\frac{\theta r}{2\pi r} = \frac{D}{360}

\frac{\theta}{2\pi} = \frac{D}{360}

\frac{\theta}{\pi} = \frac{D}{180}

\theta = \frac{\pi}{180} D

D = \frac{180}{\pi} \theta

def degrees(radians): return radians*180/pi def radians(degrees): return degrees*pi/180 
       
degrees(pi/6) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}30
\newcommand{\Bold}[1]{\mathbf{#1}}30
radians(30) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{6} \, \pi
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{1}{6} \, \pi

Of course, Python already contains this stuff in its math library:

from math import degrees, radians 
       
degrees(pi/6) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}30.0
\newcommand{\Bold}[1]{\mathbf{#1}}30.0
radians(30) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}0.523598775598
\newcommand{\Bold}[1]{\mathbf{#1}}0.523598775598

Interesting point - the Python functions return real numbers, but the Sage functions we wrote return the exact values.

 
       

A degree contains 60 minutes (no reference to a news show intended), and a minute contains 60 seconds.

def decimal(D, M, S): return D + M/60 + S/3600 
       
decimal(15, 17, 23) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{55043}{3600}
\newcommand{\Bold}[1]{\mathbf{#1}}\frac{55043}{3600}
n(_) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}15.2897222222222
\newcommand{\Bold}[1]{\mathbf{#1}}15.2897222222222
def DMS(decimal): S = int(round(3600*decimal)) M, S = divmod(S, 60) D, M = divmod(M, 60) return D,M,S 
       
DMS(15.289722222) 
       
\newcommand{\Bold}[1]{\mathbf{#1}}\left[15, 17, 23\right]
\newcommand{\Bold}[1]{\mathbf{#1}}\left[15, 17, 23\right]
decimal(31, 5, 42) 
       

Given a point (x, y) on the terminal side of angle \theta, evaluate the six trig functions for \theta.

If the function at that point is undefined, return \infty.

def big_six(x, y): r = sqrt(x^2+y^2) sin = y/r cos = x/r if x == 0: tan = oo sec = oo else: tan = y/x sec = r/x if y == 0: cot = oo csc = oo else: cot = x/y csc = r/y 
       
big_six(3,4) 
       
 
       

Given a point (x, y) on the terminal side of angle \theta, find \theta in radian measure.

def find_theta(x, y): 
       
find_theta(3, 4).n() 
       

Given a point (x, y) on the terminal side of angle \theta, find the arc length s.

def find_s(x, y): 
       
find_s(3, 4)