# 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:\)

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

### Example 2.

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

Solution.

The domain of the given function is determined by the inequalities

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

### 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.

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

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:

### 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

We mark these points with blue circles.

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

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

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

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}.\)

### 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

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.\)

### 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}.\)