Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
4218 views

In this worksheet you will practice evaluating trigonometric functions, converting between degrees and radcians, and solving basic trig equations. We will also begin graphing trigonometric functions. The command "show" is used to make the output in SAGE look nice.

#1. Enter pi and have it look "nice" pi

The command "show", makes the output look "nice" #1. Enter pi and have it look "nice" pi

show(pi)
π\displaystyle \pi

Now we turn our attention to the 12 different trig functions: the 6 basic and their inverses. The function calls for the first six are sin, cos, tan, sec, csc, cot. The function calls for the inverses are asin, acos, atan, asec, acsc, acot. If the angle or arc length is in radian measure, just enter the expression. If it's in degrees, you will have to convert to radians first. An example follows.

#2 Evaluate sin(pi/4) sin(pi/4)
1/2*sqrt(2)
show(sin(pi/4))
122\displaystyle \frac{1}{2} \, \sqrt{2}
#3. Find cos(60 degrees) A=60*pi/180 cos(A)
1/2
#4.You can evalute a whole list at once using brackets (represents a sequence). Use "show" if you want it to look nice! show([csc(pi/6),cot(-3),cot(pi/2),asin(1/2),atan(1)])
[2\displaystyle 2, cot(3)\displaystyle \cot\left(-3\right), 0\displaystyle 0, 16π\displaystyle \frac{1}{6} \, \pi, 14π\displaystyle \frac{1}{4} \, \pi]
#Watch what happens when you ask Sage to find a trig value where the function is undefined!!!!!!!!!!!!! tan(pi/2)
Infinity
#4. Find sine of theta if tan(theta)=-3/5. sin(atan(3/4))
3/5
#What about tan(asin(-3/5))? tan(asin(-3/5))
tan(-arcsin(3/5))
#not very helpful! Let's have SAGE give us a decimal answer tan(asin(-3/5)).n()
-0.750000000000000
(sin(y))^2+(cos(y))^2
cos(y)^2 + sin(y)^2

Doesn't Sage know this should equal 1? We use the bool function to test for equality.

bool((sin(y))^2+(cos(y))^2==1)

Can Sage be useful in solving those equations you wrote for solving right triangles? Let's see. Suppose the equation you created from a triangle situation was tan(θ)=5013\tan(\theta)=\frac{50}{13}.

theta=var('theta') ans=solve(tan(theta)==50/13,theta) ans
[theta == arctan(50/13)]

To get a useful value, we will have to grab the solution Sage yields and apply an approximation command.

arctan(50/13).n()
1.31642826824163
#6 One more: Solve cos(theta)=-1/2 theta=var('theta') solve(cos(theta)==-1/2,theta) show(solve(cos(theta)==-1/2,theta))
[theta == 2/3*pi]
[θ=23π\displaystyle \theta = \frac{2}{3} \, \pi]

Your turn. . .

#1.All 6 trig functions on 5π/6 show([sin(5*pi/6),cos(5*pi/6),tan(5*pi/6),csc(5*pi/6),sec(5*pi/6),cot(5*pi/6)])
[12\displaystyle \frac{1}{2}, 123\displaystyle -\frac{1}{2} \, \sqrt{3}, 133\displaystyle -\frac{1}{3} \, \sqrt{3}, 2\displaystyle 2, 233\displaystyle -\frac{2}{3} \, \sqrt{3}, 3\displaystyle -\sqrt{3}]
#2.All 6 trig function on 9π/2 show([sin(9*pi/2),cos(9*pi/2),tan(9*pi/2),csc(9*pi/2),sec(9*pi/2),cot(9*pi/2)])
[1\displaystyle 1, 0\displaystyle 0, \displaystyle \infty, 1\displaystyle 1, \displaystyle \infty, 0\displaystyle 0]
#3.sin-1(-.5) show(asin(-.5)) #4.Solve sin(θ)=-.75 for θ theta=var('theta') solve(sin(theta)==-.75,theta) show(solve(sin(theta)==-.75,theta))
[theta == -arcsin(3/4)]
[θ=arcsin(34)\displaystyle \theta = -\arcsin\left(\frac{3}{4}\right)]
#5.Solve tan(φ)=100 for φ phi=var('phi') solve(tan(phi)==100,phi) show(solve(tan(phi)==100,phi))
[phi == arctan(100)]
[ϕ=arctan(100)\displaystyle \phi = \arctan\left(100\right)]