topic badge

9.05 Graphing secant, cosecant, and cotangent functions

Lesson

Transformations

We have seen before that different manipulations of a trigonometric function correspond to transformations of its graph. This is also true for the graphs of $y=\sec x$y=secx, $y=\csc x$y=cscx and $y=\cot x$y=cotx.

In general, we can think about some function $y=f\left(x\right)$y=f(x). Remember that we can obtain the graph of $y=af\left(b\left(x-c\right)\right)+d$y=af(b(xc))+d, where $a,b,c,d$a,b,c,d are constants, by applying a series of transformations to the graph of $y=f\left(x\right)$y=f(x). These transformations are summarized below.

 

Summary

To obtain the graph of $y=af\left(b\left(x-c\right)\right)+d$y=af(b(xc))+d from the graph of $y=f\left(x\right)$y=f(x):

  • $a$a vertically dilates the graph of $y=f\left(x\right)$y=f(x) by a factor of $\left|a\right|$|a|
  • $b$b horizontally dilates the graph of $y=f\left(x\right)$y=f(x) by a factor of $\left|\frac{1}{b}\right|$|1b|.
  • $c$c horizontally translates the graph of $y=f\left(x\right)$y=f(x) by $c$c units to the right.
  • $d$d vertically translates the graph of $y=f\left(x\right)$y=f(x) by $d$d units upwards.

In the case that $a$a or $b$b is negative, there is also a reflection the graph of $y=f\left(x\right)$y=f(x) about the $x$x-axis or $y$y-axis, respectively.

In the case that $c$c or $d$d is negative, the direction of the translation is reversed.

 

When applying these facts to a cosecant, secant and cotangent, we need to consider how each type of transformation affects the key features of their graphs. In particular, it is helpful to consider features like vertical asymptotes, points of inflection, local minima and maxima, the median value of the function and the function's period. 

 

If $f\left(x\right)$f(x) is $\operatorname{cosec}x$cosecx, $\sec x$secx or $\cot x$cotx

  • a horizontal dilation will change the period
  • a horizontal translation corresponds to a phase shift
  • a vertical translation will mean that all points on the graph are moved up or down by the same amount
  • a vertical dilation will move all of the points on the graph away or towards the midline value

 

Worked example

Question 1

Plot the graph of $y=-2\sec x-1$y=2secx1.

Think: We can think of the graph of this equation as a transformation of the graph of $y=\sec x$y=secx. We can then perform the necessary transformations on the graph of $y=\sec x$y=secx to arrive at the graph of $y=-2\sec x-1$y=2secx1

Do: First, reflect the graph of $y=\sec x$y=secx about the $x$x-axis. This is represented by applying a negative sign to the function (multiplying the function by $-1$1).

 

The graph of $y=\sec x$y=secx in blue and the graph of $y=-\sec x$y=secx in green.

Then we can dilate the function away from the $x$x-axis to match. This is represented by multiplying the $y$y-value of every point on $y=-\sec x$y=secx by $3$3.

 

The graph of $y=-\sec x$y=secx in blue and the graph of $y=-2\sec x$y=2secx in green.

 

Lastly, we translate the graph of $y=-2\sec x$y=2secx downwards by $1$1 unit, to obtain the final graph of $y=-2\sec x-1$y=2secx1.

 

The graph of $y=-2\sec x$y=2secx in blue and the graph of $y=-2\sec x-1$y=2secx1 in green.

 

Question 2

Write the equation of the graph of $y=\cot x$y=cotx after it has been horizontally dilated by a factor of $\frac{1}{3}$13 and then horizontally translated by $\frac{\pi}{4}$π4 units to the right.

Think: Below is a graph of the two transformations of the graphs. We want to manipulate $y=\cot x$y=cotx in the correct order to match up with the transformations.

 

 

The graph of $y=\cot x$y=cotx in blue and the graph of $y=\cot2x$y=cot2x in green.

 

 

The graph of $y=\cot2x$y=cot2x in blue and the graph of $y=\cot2\left(x-\frac{\pi}{4}\right)$y=cot2(xπ4) in green.

 

Do: To horizontally dilate a function by a factor of $a$a we replace $x$x by $\frac{x}{a}$xa. So the function will become $y=\cot3x$y=cot3x.

To horizontally translate a function replace $x$x with $\left(x-b\right)$(xb). So the function will then be in the form $y=\cot3\left(x-\frac{\pi}{4}\right)$y=cot3(xπ4).

Careful!

The function $y=\cot\left(3x-\frac{\pi}{4}\right)$y=cot(3xπ4) represents a horizontal shift by $\frac{\pi}{4}$π4 units and then a horizontal dilation by a factor of $\frac{1}{3}$13. The order matters as this would result in a different graph.

Practice Questions

Question 3

The graph $y=\sec x$y=secx shown below is reflected over the $y$y-axis and then translated vertically $4$4 units up.

Loading Graph...

  1. Write the equation of the new graph.

  2. Plot the graph after the transformation has been applied.

    Loading Graph...

Question 4

Consider the function $y=\cot\left(3\left(x-\frac{\pi}{6}\right)\right)$y=cot(3(xπ6)).

  1. To get the graph of $y=\cot\left(3\left(x-\frac{\pi}{6}\right)\right)$y=cot(3(xπ6)) from $y=\cot x$y=cotx, we apply two transformations. Which transformation occurs first?

    Horizontal translation of $\frac{\pi}{6}$π6 units to the right.

    A

    Horizontal dilation by a scale factor of $\frac{1}{3}$13.

    B
  2. The graph of $y=\cot x$y=cotx is given below. Adjust the points given to plot the graph of $y=\cot3x$y=cot3x.

    Loading Graph...

  3. Your answer to part (b) is shown below. Adjust the points given to plot the graph of $y=\cot\left(3\left(x-\frac{\pi}{6}\right)\right)$y=cot(3(xπ6)).

    Loading Graph...

Question 5

Consider the graph of the function $y=\operatorname{cosec}x$y=cosecx.

  1. The graph of $y=\operatorname{cosec}x$y=cosecx has been provided.

    Use this to graph the function $y=\operatorname{cosec}\left(x+90^\circ\right)$y=cosec(x+90°).

    Loading Graph...

  2. The graph of $y=\operatorname{cosec}\left(x+90^\circ\right)$y=cosec(x+90°) from part (a) has been drawn on a new set of axes.

    Use this to graph the function $y=-2\operatorname{cosec}\left(x+90^\circ\right)$y=2cosec(x+90°).

    Loading Graph...

 

Domain and range

When finding the domain and range of the reciprocal trigonometric ratios cosecant ($\csc$csc), secant ($\sec$sec) and cotangent ($\cot$cot), it is important to notice the pattern of where these ratios are undefined.

These functions are defined on most of the real numbers, but there are infinitely many missing numbers where the functions are undefined. To see why this is so, we turn to the definitions of these three functions as reciprocals of the functions sine, cosine and tangent respectively.

It will be helpful to refer to the graphs of cosecant, secant and cotangent.

 

Cosecant

The cosecant function is defined by $\csc x=\frac{1}{\sin x}$cscx=1sinx. Hence, $\csc x$cscx is undefined when $\sin x=0$sinx=0. That is, when $x=n\pi$x=nπ for all integers $n$n.

The domain of the cosecant function will therefore be the set of real numbers excluding $n\pi$nπ. In the graph of $\csc x$cscx, there are asymptotes at these locations. In between each of the asymptotes are the intervals on which $\csc x$cscx is defined.

So, to represent the entire domain in interval notation, we can use an infinite union of intervals like this:

$\dots\cup\left(-\pi,0\right)\cup\left(0,\pi\right)\cup\left(\pi,2\pi\right)\cup\dots$(π,0)(0,π)(π,2π)

or we can use the notation $x\ne n\pi$xnπ, where $n$n is an integer

For the range of the cosecant function, we observe that the sine function only takes values that are between $-1$1 and $+1$+1. It follows from the definition that $\csc x$cscx can only take values that are greater than $1$1 or less than $-1$1. We can use the interval notation: $\left(-\infty,-1\right)\cup\left(1,\infty\right)$(,1)(1,)

 

Secant

The secant function is defined by $\sec x=\frac{1}{\cos x}$secx=1cosx. Hence, $\sec x$secx is undefined when $\cos x=0$cosx=0. That is, when $x=n\pi+\frac{\pi}{2}$x=nπ+π2 for all integers $n$n.

The domain of the secant function will therefore be the set of real numbers excluding $n\pi+\frac{\pi}{2}$nπ+π2. In the graph of $\sec x$secx, there are asymptotes at these locations. In between each of the asymptotes are the intervals on which $\sec x$secx is defined.

So, to represent the entire domain in interval notation, we can use an infinite union of intervals like this:

$\dots\cup\left(-\frac{3\pi}{2},-\frac{\pi}{2}\right)\cup\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\cup\left(\frac{\pi}{2},\frac{3\pi}{2}\right)\cup\dots$(3π2,π2)(π2,π2)(π2,3π2)

or we can use the notation $x\ne n\pi+\frac{\pi}{2}$xnπ+π2, for all integers $n$n.

The secant function has the same range as the cosecant function. That is, the function can take all real values except those that are strictly between $-1$1 and $+1$+1. This is a consequence of the fact that the cosine function only takes values that are between $-1$1 and $+1$+1. We can use the interval notation: $\left(-\infty,-1\right)\cup\left(1,\infty\right)$(,1)(1,)

 

Cotangent

By definition, $\cot x=\frac{1}{\tan x}$cotx=1tanx. The function must be left undefined wherever $\tan x=0$tanx=0. That is, when $x=n\pi$x=nπ for each integer $n$n.

The domain of the cotangent function, therefore, is the set of real numbers excluding $n\pi$nπ for all integers $n$n. The excluded numbers are the locations of the vertical asymptotes that can be seen in the graph.

Like the cosecant function, we can write the entire domain as the following union of intervals.

$\dots\cup\left(-\pi,0\right)\cup\left(0,\pi\right)\cup\left(\pi,2\pi\right)\cup\dots$(π,0)(0,π)(π,2π)

or we can use the notation $x\ne\frac{\pi}{2}+n\pi$xπ2+nπ, where $n$n is an integer

The range, on the other hand, is the full set of real numbers. In other words, every real number is the image of some number under the operation of the cotangent function.

In the graph of the cotangent function, it is clear that the values extend from $-\infty$ to $+\infty$+ with no gaps.

 

Practice Questions

Question 6

Consider the graph of the function $f\left(x\right)=\sec x$f(x)=secx shown below.

Loading Graph...

  1. For what values of $x$x are there vertical asymptotes on the graph of $y=f\left(x\right)$y=f(x)?

    $x=\frac{\pi}{2}n$x=π2n where $n$n is an integer.

    A

    $x=2\pi n$x=2πn where $n$n is an integer.

    B

    $x=\pi n$x=πn where $n$n is an integer.

    C

    $x=\pi n+\frac{\pi}{2}$x=πn+π2 where $n$n is an integer.

    D
  2. Hence, what is the domain of $f\left(x\right)$f(x)?

    $\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$(π2,π2)

    A

    All real numbers

    B

    $\dots\cup\left(-\frac{3\pi}{2},-\frac{\pi}{2}\right)\cup\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\cup\left(\frac{\pi}{2},\frac{3\pi}{2}\right)\cup\dots$(3π2,π2)(π2,π2)(π2,3π2)

    C

    $\dots\cup\left(-2\pi,-\pi\right)\cup\left(-\pi,0\right)\cup\left(0,\pi\right)\cup\left(\pi,2\pi\right)\cup\dots$(2π,π)(π,0)(0,π)(π,2π)

    D
  3. Using the graph, state the range of $f\left(x\right)$f(x) in interval notation.

Question 7

Consider the function $f\left(x\right)=\csc\left(x+\frac{3\pi}{4}\right)$f(x)=csc(x+3π4).

  1. Which of the following transformations of $g\left(x\right)=\csc x$g(x)=cscx will produce $f\left(x\right)$f(x)?

    Vertical translation

    A

    Vertical dilation

    B

    Horizontal dilation

    C

    Horizontal translation

    D
  2. Given the type of transformation identified in part (a), which of the following properties will change when transforming $g\left(x\right)$g(x) to get $f\left(x\right)$f(x)?

    Range

    A

    Domain

    B

    Vertical asymptotes

    C

    Period

    D
  3. Hence, what is the domain of $f\left(x\right)$f(x)?

    $\dots\cup\left(-\frac{7\pi}{4},-\frac{3\pi}{4}\right)\cup\left(-\frac{3\pi}{4},\frac{\pi}{4}\right)\cup\left(\frac{\pi}{4},\frac{5\pi}{4}\right)\cup\dots$(7π4,3π4)(3π4,π4)(π4,5π4)

    A

    $\left(\frac{3\pi}{4},\frac{7\pi}{4}\right)\cup\left(\frac{7\pi}{4},\frac{11\pi}{4}\right)$(3π4,7π4)(7π4,11π4)

    B

    $\dots\cup\left(-\pi,0\right)\cup\left(0,\pi\right)\cup\left(\pi,2\pi\right)\cup\dots$(π,0)(0,π)(π,2π)

    C

    $\dots\cup\left(-\frac{\pi}{4},\frac{3\pi}{4}\right)\cup\left(\frac{3\pi}{4},\frac{7\pi}{4}\right)\cup\left(\frac{7\pi}{4},\frac{11\pi}{4}\right)\cup\dots$(π4,3π4)(3π4,7π4)(7π4,11π4)

    D
  4. State the range of $f\left(x\right)$f(x) in interval notation.

Question 8

The graph of $f\left(x\right)=\cot x+1$f(x)=cotx+1 is shown.

Loading Graph...

  1. Select the correct domain of $f\left(x\right)$f(x).

    All real $x$x except when $x=\frac{\pi k}{2}$x=πk2 for all integers $k$k.

    A

    All real $x$x.

    B

    All real $x$x except when $x=\frac{\pi k}{2}+\frac{\pi}{2}+1$x=πk2+π2+1 for all integers $k$k.

    C

    All real $x$x except when $x=\pi k$x=πk for all integers $k$k.

    D
  2. State the range of $f\left(x\right)$f(x) using interval notation.

  3. If we restrict the domain of $f\left(x\right)$f(x) to $\left(0,\frac{\pi}{2}\right]$(0,π2], what will the new range be?

    Give your answer in interval notation.

 

Finding the equation of a reciprocal trigonometric curve

We have previously looked at how to sketch the graphs of secant, cosecant and cotangent curves given their equations. We are now going to look at the reverse of this - how to recover the equation of a secant, cosecant or cotangent curve given its graph.

To do so, we first want to identify which of the three functions is most appropriate for the given curve.

 

 

A graph of $y=\sec x$y=secx

 

A graph of $y=\csc x$y=cscx

Notice that the graphs of $y=\sec x$y=secx and $y=\csc x$y=cscx both have local minima and maxima, but no points of inflection. They differ by a phase shift (a horizontal translation): $y=\sec x$y=secx has a local minimum on the $y$y-axis, while $y=\csc x$y=cscx has an asymptote along the $y$y-axis.

 

A graph of $y=\cot x$y=cotx

On the other hand, the graph of $y=\cot x$y=cotx has points of inflection, but no local minima or maxima.

 

Once we have identified the most appropriate base function, we look at the features of the graph in order to determine the particular coefficients of the equation. These features include the location of the asymptotes, the points of inflection or local minima and maxima and the median value of the function. 

Worked example

Question 9

Identify the equation matching the graph below:

The graph of an unknown function.

Think: We can immediately see that this curve has the shape of a secant or cosecant function. In particular it has an asymptote along the $y$y-axis, which matches the graph of $y=\csc x$y=cscx. So we can write this function in the form $y=a\csc\left(b\left(x-c\right)\right)+d$y=acsc(b(xc))+d.

To determine the values of the coefficients, recall that:

  • the value of $a$a represents a vertical dilation,
  • the value of $b$b represents a horizontal dilation, and is related to the period of the function,
  • the value of $c$c represents a phase shift (a horizontal translation), and
  • the value of $d$d represents a vertical translation.

Do: Now, we chose to use $y=\csc x$y=cscx as our base function because the feature on the $y$y-axis matches up (an asymptote in this case). This means that there is no phase shift, and so we have that $c=0$c=0.

Also, we can see that the midline value of this function is $y=0$y=0 (halfway between the local minima and maxima), which also matches the median value of $y=\csc x$y=cscx. This means that there is no vertical translation, and so we have that $d=0$d=0.

Looking at the graph of $y=\csc x$y=cscx, we can see that the local minima and maxima are $1$1 unit above or below the median value respectively. On our graph, however, these points are $3$3 units above or below the median value instead. So there is a vertical dilation by a factor of $\frac{3}{1}=3$31=3, and so we have that $a=3$a=3.

The graph has a median value of $y=0$y=0 and a vertical dilation factor of $3$3.

Finally, the period of our function is $\pi$π, while the graph of $y=\csc x$y=cscx has a period of $2\pi$2π. From this we get the relation $\frac{2\pi}{b}=\text{Period}=\pi$2πb=Period=π, and so we have that $b=2$b=2.

Putting this together, the equation of our graph is

$y=3\csc\left(2x\right)$y=3csc(2x)

 

Note that we could have also expressed this function in the form $y=3\sec\left(2\left(x-\frac{\pi}{4}\right)\right)=3\sec\left(2x-\frac{\pi}{2}\right)$y=3sec(2(xπ4))=3sec(2xπ2), using $y=\sec x$y=secx as the base function. Observe that this form of the equation has a phase shift, since the graph did not line up with that of $y=\sec x$y=secx on the $y$y-axis.

 

Summary

To determine the equation of a function from its graph, first determine the most appropriate base type of function (that most closely resembles the graph).

Then, look at the features of the graph and compare them to the base function to determine any:

  • Vertical dilation
  • Horizontal dilation (which is related to the period for trigonometric functions)
  • Vertical translation
  • Horizontal translation (called a phase shift for trigonometric functions)

Finally, write down the equation in the form $y=af\left(b\left(x-c\right)\right)+d$y=af(b(xc))+d, where $f\left(x\right)$f(x) is the base function.

Careful!

Since trigonometric functions are periodic, we can express them in infinitely many equivalent ways by changing the phase shift by a multiple of the period.

For example, we determined the equation of the graph above to be $y=3\csc\left(2x\right)$y=3csc(2x). We could also represent this same graph by the equation $y=3\csc\left(2\left(x-\pi\right)\right)$y=3csc(2(xπ)) or $y=3\csc\left(2\left(x+7\pi\right)\right)$y=3csc(2(x+7π)) or with a phase shift of any other multiple of the period, $\pi$π.

It is typical to write the equation with a phase shift as close to zero as possible.

 

Practice Questions

Question 10

Consider the graph below.

Loading Graph...

  1. What is the equation of the asymptote shown?

  2. Which key feature occurs at the point where $x=0$x=0?

    A local minimum.

    A

    A local maximum.

    B

    An asymptote.

    C

    A point of inflection.

    D
  3. What is the period of this function?

  4. Write down the equation of this function in the form $y=a\sec\left(bx\right)$y=asec(bx), $y=a\csc\left(bx\right)$y=acsc(bx) or $y=a\cot\left(bx\right)$y=acot(bx).

Question 11

Consider the graph below.

Loading Graph...

  1. What is the equation of the asymptote shown?

  2. Which key feature occurs at the point where $x=\frac{\pi}{6}$x=π6?

    A point of inflection.

    A

    A local maximum.

    B

    An asymptote.

    C

    A local minimum.

    D
  3. What is the period of this function?

  4. Write down the equation of this function in the form $y=a\sec\left(bx\right)$y=asec(bx), $y=a\csc\left(bx\right)$y=acsc(bx) or $y=a\cot\left(bx\right)$y=acot(bx).

Question 12

Consider the graph below.

Loading Graph...

  1. What is the equation of the asymptote shown?

  2. What is the median value of this function?

  3. What is the period of this function?

  4. Write down the equation of this function in the form $y=a\sec\left(b\left(x-c\right)\right)+d$y=asec(b(xc))+d, where $-\pi\le c\le\pi$πcπ.

Outcomes

F-TF.5

Choose trigonometric functions to model periodic phenomena with specified amplitude, frequency, and midline.

What is Mathspace

About Mathspace