Graphing Trig Functions

A graph is a visual representation of a function. It is very easy and quick to understand the overall behavior of a function just by viewing its graph. The trigonometric functions have very important applications in real life and hence a study of graphs of trigonometric functions is very useful.

Graphing Sine and Cosine Functions

The basic functions in trigonometry are sine and cosine functions. Let us discuss their graphs one by one.
The simplest form of a sine function is, y = sin x.
We know that a sine function varies only between -1 and 1. In other words, its range is [-1, 1].The domain of the function is all real values but let us consider a selected domain for one complete cycle of [0, 2∏].

The graph of the function y = sin x, is nothing but the vertical height of a point that moves along a unit direction in counter clock direction. Hence, the graph of the function y = sin x can be traced as shown below.

In the above diagram, the left side shows a unit circle. The positions of a moving point on the circle at multiple angles of ∏/4 are shown. On the right a Cartesian plane is shown with the angles are marked along x- axis. The points of intersections of the horizontal lines from the unit circle and the vertical lines from the x-axis for different angles are plotted as shown. Now a smooth curve is drawn joining these points and it is nothing but the graph of the function y = sin x. The graph exhibits typically a wave motion for a circular motion of a point on the unit circle and it shows the value of the vertical displacement of the point at different angles from the reference point.
Let us study the pattern of the curve that represents a sine function. With the increase in angle from 0 to ∏/2, the value of the function increases from 0 to 1. That is, for the angles in first quadrant of the unit circle, the values of the function are increasing and positive. For angles from ∏/2 to ∏, that is when the angles lie in the second quadrant of the unit circle, the values are decreasing from 1 to 0 but they are all positive. In the third quadrant of the unit circle, the angle increases from ∏ to 3∏/2, and the value of the function decreases from 0 to -1, thus assuming negative values. Finally, in the fourth quadrant, the angle is increasing from 3∏/2 to 2∏ and the value of the function starts increasing from the minimum value of -1 to 0, coming back to the same value as that was in the start. In other words, the function has covered a complete cycle and the angle covered in one cycle is 2∏ radians. This is called as the ‘period’ of the sine function. It means the values of a sine function repeat after 2∏ radians and hence the shape of the graph continues on the same pattern. 
Sometimes, the x-axis is marked with the time ‘t’, considering the angular velocity ω of the point along the unit circle. This is because, the angular position θ of the point is defined as, θ = ωt. The absolute values of the extremes of the function, that is, l1l = l-1l = 1, is defined as the ‘amplitude’ of the function y = sin x.

Cosine Graph Equation

A cosine function, in its simplest form is represented as y = cos x. As in case of sine function, the domain of this function is also all real numbers. In this case also, the period is 2∏ radians. However, since the cosine function describes the variation of horizontal displacement of points for various angles from a reference point, the graph has a different pattern compared to a sine function. The graph of a cosine function y = cos x is shown below.
 
Let us study the pattern of the curve that represents a cosine function. With the increase in angle from 0 to ∏/2, the value of the function decreases from 0 to 1. That is, for the angles in first quadrant of the unit circle, the values of the function are decreasing and positive. For angles from ∏/2 to ∏, that is when the angles lie in the second quadrant of the unit circle, the values are decreasing from 0 to -1 and they are all negative. In the third quadrant of the unit circle, the angle increases from ∏ to 3∏/2, and the value of the function increases from the minimum value of -1 to 0, still assuming negative values. Finally, in the fourth quadrant, the angle is increasing from 3∏/2 to 2∏ and the value of the function is still increasing from the value of 0 to 1, coming back to the same value as that was in the start. In other words, this function has covered a complete cycle and the angle covered in one cycle is 2∏ radians. It means the values of a cosine function repeat after 2∏ radians and hence the shape of the graph continues on the same pattern. Thus in this case also the period is 2∏ radians.
In case of cosine functions, the general cosine graph equation undergoes exactly the same type of transformations and hence a general cosine graph equation (with symbols mean the same) is,
y = A*sin[(n)x – Φ] + B

Graphing Tangent Functions

The tangent function is a rational function and defined as the ratio of sine function and cosine function. That is, y = tan x =  (sin x)/(cos x). From the pattern of variations of the denominator and the denominator functions, we can analyze the pattern of the value of a tangent function.
With the increase in angle from 0 to ∏/2, the value of the function increases from 0. But as the value of cos x becomes 0 at x = ∏/2, the value of the tangent finction tends to infinity at x = ∏/2. In otherwords, the function has a vertical asymptote at x = ∏/2. Hence, for the angles in first quadrant of the unit circle, the values of the function are increasing and positive and tends to infinity at x= ∏/2. For angles from ∏/2 to ∏, that is when the angles lie in the second quadrant of the unit circle, the values are increasing from very low negative values to 0 and they are all negative. This is because of the fact that the denominator function cos x is 0 and negative on the right side of ∏/2. In other words, the value of the tangent function tends to start from negative infinity and increases to 0 in the second quadrant. Thus, the tangent function has an infinite discontinuity at x = ∏/2. In the third quadrant of the unit circle, the angle increases from ∏ to 3∏/2, and the value of the function increases from the value of 0. However, since cos x is in the denominator and due to the fact that cos 3∏/2 is 0, the tangent function again tends to infinity as the angle approaches 3∏/2. But on the immediate right to 3∏/2, the value of numerator function sin x is negative and hence the function tends to increase from negative infinity. Thus again there is an infinite discontinuity at x = 3∏/2 and an asymptote there for the tangent function.  Finally, in the fourth quadrant, the angle is increasing from 3∏/2 to 2∏ and the value of the function is still increasing from minus infinity to 0. The graph of the function looks as shown below.
 

It may be noted that from the graph of the tangent function, the values repeat after an interval of ∏ radians and hence it is the period of the tangent function.

Graphing Reciprocal Functions

The reciprocal functions are Cosecant, Secant and Cotangent functions which are reciprocal to Sine, Cosine and Tangent functions respectively. The graphing of the reciprocal functions can be done taking the guidelines from the respective parent functions. Let us discuss each case of the reciprocal functions.

A sine function has the following characteristics.
1)    Increases from 0 to 1 for angles 0 to ∏/2
2)    Decreases from 1 to 0 for angles ∏/2 to ∏
3)    Decreases from 0 to -1 for angles ∏ to 3∏/2
4)    Increases from -1 to 0 for angles 3∏/2 to 2∏.
Therefore applying the reciprocal concepts, a cosecant function should have the following characteristics.

1)    Decreases from infinity to 1 for angles 0 to ∏/2
2)    Increases from 1 to infinity for angles ∏/2 to ∏
3)    Increases from -infinity to -1 for angles ∏ to 3∏/2
4)    Decreases from -1 to -infinity for angles 3∏/2 to 2∏.
5)    The cycle repeats after 2∏ radians and thus the period is 2∏ radians.
6)    The vertical asymptotes are  at x = n∏, where ‘n’ is any integer.
7)    The function has infinite discontinuities at an interval of ∏ radians.
Thus a cosecant function is graphed as shown below



A cosine function has the following characteristics.
1)    Decreases from 1 to 0 for angles 0 to ∏/2
2)    Decreases from 0 to -1 for angles ∏/2 to ∏
3)    Increases from -1 to 0 for angles ∏ to 3∏/2
4)    Increases from 0 to 1 for angles 3∏/2 to 2∏.
Therefore applying the reciprocal concepts, a secant function should have the following characteristics.

1)    Increases from 1 to infinity for angles 0 to ∏/2
2)    Increases from – infinity to -1 for angles ∏/2 to ∏
3)    Decreases from -1 to -infinity for angles ∏ to 3∏/2
4)    Decreases from infinity to 1 for angles 3∏/2 to 2∏.
5)    The cycle repeats after 2∏ radians and thus the period is 2∏ radians.
6)    The vertical asymptotes are at x = (2n – 1)∏/2, where ‘n’ is any integer.
7)    The function has infinite discontinuities at x = (2n – 1)∏/2
Thus a secant function is graphed as shown below.





Cotangent Function

A tangent function has the following characteristics.
1)    Increases from 0 to infinity for angles 0 to ∏/2
2)    Increases from -infinity to 0 for angles ∏/2 to ∏
3)    Increases from 0 to infinity for angles ∏ to 3∏/2
4)    Increases from -infinity to 0 for angles 3∏/2 to 2∏
5)    The vertical asymptotes are at x = (2n – 1)∏/2, where ‘n’ is any integer.
6)    The function has infinite discontinuities at x = (2n – 1)∏/2
Therefore applying the reciprocal concepts, a cotangent function should have the following characteristics.
1)    Decreases from infinity to 0 for angles 0 to ∏/2
2)    Decreases from 0 to – infinity for angles ∏/2 to ∏
3)    Decreases from infinity to 0 for angles ∏ to 3∏/2
4)    Decreases from 0 to - infinity for angles 3∏/2 to 2∏.
5)    The cycle repeats after ∏ radians and thus the period is ∏ radians.
6)    The vertical asymptotes are at x = n∏, where ‘n’ is any integer.
7)    The function has infinite discontinuities at x = n∏
Thus a cotangent function is graphed as shown below.

Sine Graph Equation

We have discussed graphing of a sine function considering the function at its simplest form of the equation, y = sin x.
In this form, the function,
1)    Has an amplitude of 1
2)    The value of the function is 0 when the angle is 0
3)    The function has a period of 2∏ radians and does not have any phase shift.
But in many situations these assumptions cannot be true. However, the sine graph equation can be modified to a general form by suitable transformation.
If A is the amplitude, then the graph undergoes a vertical expansion by A. If the value of the function is B, when the angle is 0, then the function has a vertical shift of B. If the function has ‘n’ periods in an angle of 2∏ radians, then the horizontal compression is ‘n’ and if the phase shift of Φ radians, then the horizontal shift towards right is Φ. Therefore, the modified equation is,
y = A*sin[(n)x – Φ] + B