## What is Cosine Function?

The cosine function is a **periodic function** which is very important in trigonometry.

The simplest way to understand the cosine function is to use the unit circle. In trigonometry, a **unit circle** is the circle of radius **one** centered at the origin \(\left( {0,0} \right)\) in the Cartesian coordinate system.

Now that we have seen how to define trigonometric ratios for arbitrary angles, we are ready to study trigonometric ratios from the perspective of functions.

**✍****Note:** Sine Function can be applied to every real number because as we have discussed in conversion relations of trigonometric ratios, we can calculate the **sine** of any real number.

## Graph of Cosine Function:

**Think:** What will the graph of the cosine function look like? To understand that, let us analyze in more detail the variation in the value of the output of the cosine function, as the input (the angle) varies.

Consider the following function definition:

\[f\left( x \right) = \cos x\]

The following figure shows a **unit circle** with center \(O\), and a point \(P\) moving along the circumference of this circle. The angle which \(OP\) makes with the positive direction of the \(x\)-axis is \(x\) (radians):

Let’s study how the base length varies as \(x\) completes one complete cycle from \(0\) to \(2\pi \) radians.

### From 0 to \(\frac{\pi }{2}\) radians:

The base length decreases from 1 to 0, as the following figure shows:

Thus, \(\cos x\) decreases from 1 to 0. This variation is plotted below:

### From \(\frac{\pi }{2}\) to \(\pi \):

The base decreases further from 0 to \( - 1\) (although the magnitude increases):

Accordingly, we extend our graph:

### From \(\pi \) to \(\frac{{3\pi }}{2}\):

The base increases from \( - 1\) to 0 (although the magnitude decreases):

We thus have the following extension to our graph:

### From \(\frac{{3\pi }}{2}\) to \(2\pi \):

The base increases from 0 to 1:

Our cycle completes as follows:

In other subsequent and preceding intervals spanning a length of \(2\pi \) radians, the variation in \(\cos x\) will be exactly the same. Thus, the graph of \(f\left( x \right) = \cos x\) over all real numbers will be as follows:

**✍****Note: **We see that the domain of the cosine function is \(\mathbb{R}\), while its range is \(\left[ { - 1,1} \right]\). Also, we note the curve for the cosine function is identical to that of the sine function, apart from a difference in horizontal positioning of \(\frac{\pi }{2}\). Thus, if you left-shift the graph of \(f\left( x \right) = \sin x\) by \(\frac{\pi }{2}\), you will get the graph of \(g\left( x \right) = \cos x\). This means that:

\[\begin{align}&f\left( {x + \frac{\pi }{2}} \right)\,\,{\rm{should}}\,{\rm{equal}}\,g\left( x \right)\\ \Rightarrow \,\,\,&\sin \left( {x + \frac{\pi }{2}} \right)\,\,{\rm{should}}\,{\rm{equal}}\,\cos x\end{align}\]

We already know that this is true from conversion relations of trigonometric ratios.

## Solved Example:

**Example 1:** Find the domain of \[f\left( x \right) = \frac{x}{{\frac{1}{2} - \cos x}}\].

**Solution:** From the real set, we need to exclude all those \(x\)-values where \(\cos x = \frac{1}{2}\), otherwise the denominator will become 0. Let us find out all those *x*-values where \(\cos x = \frac{1}{2}\). The following figure shows the intersection of the line \(y = \frac{1}{2}\) with the graph of \(y = \cos x\):

In the interval \(\left[ {0,2\pi } \right]\), the two relevant values of *x* are

\[x = \frac{\pi }{3},\,\,\,x = 2\pi - \frac{\pi }{3} = \frac{{5\pi }}{3}\]

Thus, we can write the general set (for which \(\cos x = \frac{1}{2}\)) as:

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

We now exclude this set from the set of all real numbers to obtain our domain:

\[\boxed{D = \mathbb{R}\ - \left\{ {2n\pi + \frac{\pi }{3},2n\pi + \frac{{5\pi }}{3}} \right\},\,\,\,n \in \mathbb{Z}} \]

**Challenge:** Find the domain of the function:

\[f(x) = \frac{{\cos x}}{{1 - \sin x}}\]

**⚡Tip:** From the real set, we need to exclude all those \(x\)-values where \(\sin x = 1\).