Precalculus

Trigonometry

Trigonometry Logo

Graphs of Tangent and Cotangent Functions

Solved Problems

Click or tap a problem to see the solution.

Example 1

Find the domain of the function \[y = \tan \left( {\frac{x}{2} - \frac{\pi }{6}} \right).\]

Example 2

Find the domain of the function \[y = \sqrt {\cot x}.\]

Example 3

Find the points of discontinuity of the function \[y = \tan x + \cot 2x.\]

Example 4

Sketch a graph of the function \[y = \tan 2x \cot 2x.\]

Example 5

Sketch a graph of the function \[y = 2\tan 3x.\]

Example 6

Sketch a graph of the function \[y = \left| {\cot x} \right|.\]

Example 1.

Find the domain of the function \[y = \tan \left( {\frac{x}{2} - \frac{\pi }{6}} \right).\]

Solution.

We know that the domain of the tangent function \(y = \tan t\) is all real numbers except the points \(t = \frac{\pi }{2} + \pi n,\) \(n \in \mathbb{Z}\) in which the tangent function has a discontinuity. To determine these points we denote \(t = \frac{x}{2} - \frac{\pi }{6}\) and solve the equation for \(x:\)

\[\frac{x}{2} - \frac{\pi }{6} = \frac{\pi }{2} + \pi n, \Rightarrow \frac{x}{2} = \frac{\pi }{2} + \frac{\pi }{6} + \pi n, \Rightarrow \frac{x}{2} = \frac{{2\pi }}{3} + \pi n, \Rightarrow x = \frac{{4\pi }}{3} + 2\pi n,\,n \in \mathbb{Z}.\]

These points should be excluded from the domain of the function. Hence,

\[\text{dom}\left( y \right) = \left\{ {x \in \mathbb{R} \left|\, x \ne \frac{{4\pi }}{3} + 2\pi n\right., \,n \in \mathbb{Z}} \right\}.\]

Example 2.

Find the domain of the function \[y = \sqrt {\cot x}.\]

Solution.

The domain of the given function is determined by the inequalities

\[\left\{ {\begin{array}{*{20}{l}} {\cot x \ge 0}\\ {x \ne \pi n,n \in \mathbb{Z}} \end{array}} \right..\]

Consider one period from \(0\) to \(\pi.\) Cotangent is decreasing over this interval and changes its sign at \(x = \frac{\pi }{2}.\) It is non-negative in the interval \(x \in \left( {0,\frac{\pi }{2}} \right].\) Given that the period of the cotangent function is \(\pi\) and using interval notation, we can write the domain of \(y = \sqrt {\cot x}\) in the form

\[x \in \left( {\pi n,\frac{\pi }{2} + \pi n} \right],\,n \in \mathbb{Z}.\]

Example 3.

Find the points of discontinuity of the function \[y = \tan x + \cot 2x.\]

Solution.

The tangent function \(\tan x\) is discontinuous at \(x = \frac{\pi }{2} + \pi n,\,n \in \mathbb{Z}.\) There are two such points in the interval \(\left[ {0,2\pi } \right):\) \(x = \frac{\pi }{2}\) and \(x = \frac{{3\pi }}{2}.\) These points are depicted on the unit circle by blue circles.

Discontinuity points of the function y = tan(x)+cot(2x)
Figure 3.

The cotangent function \(\cot t\) is discontinuous at \(t = \pi n,\,n \in \mathbb{Z}.\) By denoting \(t = 2x,\) solve the equation for \(x:\)

\[2x = \pi n, \Rightarrow x = \frac{{\pi n}}{2},\,n \in \mathbb{Z}.\]

Hence, there are \(4\) points on the unit circle in which the function \(\cot 2x\) has a discontinuity: \(x = 0,\) \(x = \frac{\pi }{2},\) \(x = \pi ,\) and \(x = \frac{{3\pi }}{2}.\) These points are shown in the figure by green squares.

Both sets of points can be represented by one formula:

\[x = \frac{{\pi n}}{2},\,n \in \mathbb{Z}.\]

Example 4.

Sketch a graph of the function \[y = \tan 2x \cot 2x.\]

Solution.

First we determine the domain of the function. The function \(y = \tan 2x\) is not defined at the points

\[2x = \frac{\pi }{2} + \pi n, \Rightarrow x = \frac{\pi }{4} + \frac{{\pi n}}{2},\,n \in \mathbb{Z}.\]

We mark these points with blue circles.

Discontinuity points of the function y = tan(2x)cot(2x)
Figure 4.

Similarly, the function \(y = \cot 2x\) is undefined at

\[2x = \pi n, \Rightarrow x = \frac{{\pi n}}{2},\,n \in \mathbb{Z}.\]

These points are shown on the unit circle by green squares. Both families of points are described by the formula \(x = \frac{{\pi n}}{4},\,n \in \mathbb{Z}.\) Hence, the domain of the given function is

\[\text{dom}\left( y \right) = \left\{ {x \in \mathbb{R} \left| \,x \ne \frac{{\pi n}}{4},\right. n \in \mathbb{Z}} \right\}.\]

Using the definition of tangent and cotangent, we can simplify the function:

\[y = \tan 2x\cot 2x = \frac{{\sin 2x}}{{\cos 2x}} \cdot \frac{{\cos 2x}}{{\sin 2x}} = \frac{{\cancel{{\sin 2x}}\cancel{{\cos 2x}}}}{{\cancel{{\cos 2x}}\cancel{{\sin 2x}}}} = 1.\]

The graph of the function is the horizontal line \(y = 1\) with the punctured points at \(x = \frac{{\pi n}}{4},\,n \in \mathbb{Z}.\)

Graph of the function y = tan(2x)cot(2x)
Figure 5.

Example 5.

Sketch a graph of the function \[y = 2\tan 3x.\]

Solution.

We take the basic tangent function \({y_1} = \tan x\) and shrink its graph by a factor of \(3\) along the \(x-\)axis. This gives us the function \({y_2} = \tan 3x,\) which has the vertical asymptotes at the points

\[3x = \frac{\pi }{2} + \pi n, \Rightarrow x = \frac{\pi }{6} + \frac{{\pi n}}{3},\,n \in \mathbb{Z}.\]

To get the final function \({y_3} = 2\tan 3x,\) we stretch the graph of \({y_2}\) vertically by a factor of \(2.\)

These transformations are shown in Figure \(6.\)

Graph of the function y=2tan(3x)
Figure 6.

Example 6.

Sketch a graph of the function \[y = \left| {\cot x} \right|.\]

Solution.

Absolute values are never negative. Therefore, to graph the absolute value of cotangent, we need to take the portion of the graph with negative \(y-\)values and reflect it about the \(x-\)axis to the upper half-plane. The resulting graph has vertices at the points \(x = \frac{\pi }{2} + \pi n,\) \(n \in \mathbb{Z}.\)

Graph of the absolute value of cotangent
Figure 7.
Page 1 Page 2