How to Graph Secant and Cosecant Functions with Examples

This page explains how to sketch the secant and cosecant functions of the form:

$$ y = a \sec\left(k(x - d)\right) \quad \text{and} \quad y = a \csc\left(k(x - d)\right) $$

Detailed examples are provided to illustrate their graphs, transformations, and key characteristics step by step.

Graphing Parameters of $y = \sec(x)$ and $y = \csc(x)$

Range: $$ (-\infty , -1] \cup [1 , +\infty) $$

Period: $$ 2\pi $$


Vertical Asymptotes of Secant: Vertical asymptotes of $y = \sec(x) = \frac{1}{\cos(x)}$ occur at the zeros of $\cos(x)$, given by:

$$ x = \frac{\pi}{2} + k\pi, \quad k = 0, \pm1, \pm2, \dots $$

Vertical Asymptotes of Cosecant: Vertical asymptotes of $y = \csc(x) = \frac{1}{\sin(x)}$ occur at the zeros of $\sin(x)$, given by:

$$ x = k\pi, \quad k = 0, \pm1, \pm2, \dots $$


Graphing Tip: To sketch basic secant and cosecant functions, use their reciprocal identities: $y = \sec(x) = \frac{1}{\cos(x)}$ and $y = \csc(x) = \frac{1}{\sin(x)}$. Sketching the base sine or cosine wave first helps easily identify the locations of minimums, maximums, and vertical asymptotes.

Graph of $y = \sec(x)$

All zeros of $\cos(x)$ are vertical asymptotes.

Graph of y = sec(x)

Graph of $y = \csc(x)$

All zeros of $\sin(x)$ are vertical asymptotes.

Graph of y = csc(x)

Step-by-Step Graphing Examples

Example 1: Graphing a Transformed Secant Function

Sketch the graph of $y = \sec(2x - \pi/3)$ over one period.


Solution:

Graphing Parameters

Range: $(-\infty , -1] \cup [ 1, +\infty)$

Period: Calculate using $\frac{2\pi}{|k|}$:

$$ \text{Period} = \frac{2\pi}{2} = \pi $$

Vertical Asymptotes: Find the asymptotes by solving the inside of the secant function for the standard cosine zeros:

$$ 2x - \frac{\pi}{3} = \frac{\pi}{2} + k\pi $$

Solving for $x$ gives:

$$ 2x = \frac{5\pi}{6} + k\pi \implies x = \frac{5\pi}{12} + \frac{k\pi}{2}, \quad k = 0 , \pm1, \pm2, \ldots $$

Horizontal Shift: Because of the term $-\pi/3$, the graph is shifted horizontally. We first factor out the $k$ value ($2$) to rewrite the given function in the standard form $y = a\sec(k(x-d))$:

$$ y = \sec\left[2\left(x - \frac{\pi}{6}\right)\right] $$

We can now identify the horizontal shift as $\frac{\pi}{6}$ to the right.

Sketching: We sketch $y = \sec(2x - \pi/3)$ by translating the graph of $y = \sec(2x)$ by $\pi/6$ to the right (red graph below), so that the sketched period starts at $\pi/6$ and ends at $\pi/6 + \pi = 7\pi/6$, which is one full period equal to $\pi$.

Graph of y = sec(2x - pi/3)
Example 2: Graphing a Transformed Cosecant Function

Sketch the graph of $y = -3 \csc\left(\frac{x}{2} + \frac{\pi}{2}\right)$ over one period.


Solution:

Graphing Parameters

Range: Because of the vertical stretch factor $a = -3$, the range expands:

$$ (-\infty , -3] \cup [ 3, +\infty) $$

Period: Calculate using $\frac{2\pi}{|k|}$:

$$ \text{Period} = \frac{2\pi}{\frac{1}{2}} = 4\pi $$

Vertical Asymptotes: Find the asymptotes by setting the inside of the cosecant function equal to the standard sine zeros ($k\pi$):

$$ \frac{x}{2} + \frac{\pi}{2} = k\pi $$

Solving for $x$, we get:

$$ \frac{x}{2} = k\pi - \frac{\pi}{2} \implies x = (2k - 1)\pi, \quad k = 0, \pm 1, \pm 2, \ldots $$

Horizontal Shift: Because of the term $\frac{\pi}{2}$, the graph is shifted horizontally. Rewriting the function by factoring out $\frac{1}{2}$:

$$ y = -3 \csc\left(\frac{1}{2}(x + \pi)\right) $$

This shows a horizontal shift of $\pi$ units to the left.

Sketching: We sketch $y = -3 \csc\left(\frac{x}{2} + \frac{\pi}{2}\right)$ by translating the graph of $y = -3 \csc\left(\frac{x}{2}\right)$ to the left by $\pi$, so that the sketched period starts at $-\pi$ and ends at $-\pi + 4\pi = 3\pi$, which corresponds to one full period.

Graph of y = -3 csc(x/2 + π/2)

Challenge Problems

Test your mastery of transformations with these advanced problems.

Challenge 1: Finding the Equation from Asymptotes

A cosecant function of the form $y = a \csc(k(x - d))$ has a period of $6\pi$. It has a vertical asymptote at $x = \pi$, and its local minimum occurs at $y = 4$. Assuming $a > 0$ and $k > 0$, determine the equation of the function.


Solution:

1. Find $k$: The period is $6\pi$. Since $\text{Period} = \frac{2\pi}{k}$ for $k > 0$:
$$ \frac{2\pi}{k} = 6\pi \implies k = \frac{1}{3} $$

2. Find $a$: The local minimum of a standard positive cosecant graph represents the start of the upward-opening "U" shapes. For $y = a \csc(\dots)$, this minimum value is $a$. Thus, $a = 4$.

3. Find $d$: A standard cosecant function $y = \csc(x)$ has its first positive asymptote at $x=0$, followed by one at exactly half a period, and another at a full period. Since our function $y = 4\csc(\frac{1}{3}(x-d))$ has a phase shift, let's use the asymptote condition:
The inside of the cosecant must equal zero for the first principal asymptote:
$$ \frac{1}{3}(x - d) = 0 \implies x = d $$

We are told there is an asymptote at $x = \pi$. If we set this as the primary shift, then $d = \pi$.

Final Equation:
$$ y = 4 \csc\left(\frac{1}{3}(x - \pi)\right) $$

Challenge 2: Full Transformation Sketch

State the amplitude factor, period, phase shift, vertical shift, and range of the function: $$ y = -2 \sec\left(3x - \frac{\pi}{2}\right) + 1 $$ Then, find the equations of its vertical asymptotes.


Solution:

1. Standard Form: Factor out the 3 to identify the true phase shift.
$$ y = -2 \sec\left[3\left(x - \frac{\pi}{6}\right)\right] + 1 $$

2. Parameters:
* Amplitude factor ($|a|$): $2$ (Note: Secant curves do not have a true "amplitude" since they stretch to infinity, but the stretch factor is 2, inverted by the negative sign).
* Period: $\frac{2\pi}{3}$
* Phase Shift: $\frac{\pi}{6}$ to the right.
* Vertical Shift: Up 1 unit.
* Range: The local maximums are at $c - |a| = 1 - 2 = -1$. The local minimums are at $c + |a| = 1 + 2 = 3$. Therefore, the range is $(-\infty, -1] \cup [3, \infty)$.

3. Vertical Asymptotes: Set the inside of the secant equal to $\frac{\pi}{2} + n\pi$ (where $n$ is an integer):
$$ 3x - \frac{\pi}{2} = \frac{\pi}{2} + n\pi $$
$$ 3x = \pi + n\pi $$
$$ x = \frac{\pi}{3} + \frac{n\pi}{3} $$

More References and Links