# Tangent function

Jump to: navigation, search
This article is about a particular function from a subset of the real numbers to the real numbers. Information about the function, including its domain, range, and key data relating to graphing, differentiation, and integration, is presented in the article.
View a complete list of particular functions on this wiki
For functions involving angles (trigonometric functions, inverse trigonometric functions, etc.) we follow the convention that all angles are measured in radians. Thus, for instance, the angle of $90\,^\circ$ is measured as $\pi/2$.

## Definition

### Definition in terms of sine and cosine

The tangent function, denoted $\tan$, is defined as the quotient of the sine function by the cosine function, and it is defined wherever the cosine function takes a nonzero value. In symbols:

$\! \tan x := \frac{\sin x}{\cos x}$

### Unit circle definition

The tangent function, denoted $\tan$, is defined as follows.

Consider the unit circle centered at the origin, described as the following subset of the coordinate:

$\{ (x,y) \mid x^2 + y^2 = 1\}$

For a real number $t$, we define $\tan t$ as follows:

• Start at the point $(1,0)$, which lies on the unit circle centered at the origin.
• Move a distance of $t$ along the unit circle in the counter-clockwise direction (i.e., the motion begins in the first quadrant, with both coordinates positive).
• At the end, the quotient of the $y$-coordinate by the $x$-coordinate of the point thus obtained is defined as $\tan t$.

### Definition for acute angles in terms of triangles

Suppose $t$ is an acute angle, i.e., $t \in (0,\pi/2)$. Construct a right triangle where $t$ is one of the acute angles. $\tan t$ is defined as the quotient of the leg opposite $t$ to the leg adjacent to $t$.

## Key data

Item Value
default domain all real numbers except odd integer multiples of $\pi/2$, i.e., $\R \setminus \{ n\pi + \pi/2 \mid n \in \mathbb{Z} \}$.
This is a union of countably many open intervals of the form $(n\pi - \pi/2,n\pi+\pi/2)$ with $n \in \mathbb{Z}$:
$\dots \cup (-3\pi/2,-\pi/2) \cup (-\pi/2,\pi/2) \cup (\pi/2,3\pi/2) \cup\dots$
range all real numbers, i.e., all of $\R$
period $\pi$, i.e., $180\,^\circ$
local maximum values and points of attainment there are no local maximum values
local minimum values and points of attainment there are no local minimum values
points of inflection (both coordinates) all points of the form $(n\pi,0)$ where $n$ varies over integers.
vertical asymptotes All lines of the form $x = n\pi + \pi/2$, $n$ varies over integers. At each such line, the left hand limit is $+\infty$ and the right hand limit is $-\infty$.
important symmetries odd function
half turn symmetry about all points of the form $(n\pi/2,0)$ where $n$ varies over integers. Note that for the even multiples of $\pi/2$, (i.e., the multiples of $\pi$, this is half turn symmetry about points of inflection. For the odd multiples of $\pi/2$, this is half turn symmetry about points not on the graph itself.
first derivative $x \mapsto \sec^2x$, i.e., the secant-squared function. Note that $\sec^2x = 1 + \tan^2x$.
second derivative $x \mapsto 2\sec^2x\tan x$.
higher derivatives every derivative can be expressed as a polynomial in terms of $\tan$. The degree of the $n^{th}$ derivative as a polynomial in $\tan$ is $n + 1$.
first antiderivative $-\ln|\cos x| + C = \ln|\sec x| + C$.
higher antiderivatives no antiderivatives higher than the first are expressible in terms of elementary functions.

## Identities

Type of identity Identity in algebraic form
complementary angle $\tan(\pi/2 - x) = 1/\tan x = \cot x$, relates to cotangent function, its composite with reciprocal function
square relationship with secant $\tan^2x + 1 = \sec^2x$
angle sum tangent formula $\tan(x + y) = \frac{\tan x + \tan y}{1 - \tan x \tan y}$
angle difference tangent formula $\tan(x - y) = \frac{\tan x - \tan y}{1 + \tan x \tan y}$
double angle tangent formula $\tan(2x) = \frac{2\tan x}{1 - \tan^2x}$
formula for double angle sine and cosine in terms of tangent $\cos(2x) = \frac{1 - \tan^2x}{1 + \tan^2x}, \sin(2x) = \frac{2\tan x}{1 + \tan^2x}$
formula for tangent of acute angle in terms of double angle cosine $\tan x = \sqrt{(1 - \cos (2x))/(1 + \cos (2x))}$
other symmetries periodicity: $\tan(\pi + x) = \tan x$
$\tan(\pi - x) = -\tan x$
odd function: $\tan(-x) = -\tan x$

## Values

### Values at some acute angles

All these can be deduced from the values at $\pi/3$ and $\pi/4$ and the identities above. The values at $\pi/3$ and $\pi/4$ in turn can be deduced from the corresponding sine or cosine values.

Angle in radians (default) Numerical approximation for angle in radians Angle in degrees Formal expression for $\tan$ Numerical approximation
0 0.0000 $0\,^\circ$ 0 0.0000
$\pi/12$ 0.2618 $15\,^\circ$ $2 - \sqrt{3}$ 0.2678
$\pi/8$ 0.3927 $22.5\,^\circ$ $\sqrt{2} - 1$ 0.4142
$\pi/6$ 0.5236 $30\,^\circ$ $1/\sqrt{3} = \sqrt{3}/3$ 0.5774
$\pi/4$ 0.7854 $45\,^\circ$ 1 1.0000
$\pi/3$ 1.0472 $60\,^\circ$ $\sqrt{3}$ 1.7321
$3\pi/8$ 1.1781 $67.5^\circ$ $\sqrt{2} + 1$ 2.4142
$5\pi/12$ 1.3090 $75\,^\circ$ $2 + \sqrt{3}$ 3.7321
$\pi/2$ 1.5708 $90\,^\circ$ undefined undefined

Note that for $x$ close to zero, $\tan x$ is just slightly bigger than $x$. As $x$ becomes bigger, the functions diverge and as $x \to \pi/2^-$, $\tan x \to +\infty$.

## Differentiation

### First derivative

WHAT WE USE: sine function#First derivative, cosine function#First derivative, quotient rule for differentiation

The first derivative is:

$\frac{d}{dx}(\tan x) = \sec^2x$

Here's how we get it. We start with:

$\tan x = \frac{\sin x}{\cos x}$

Using the quotient rule for differentiation, we get:

$\! \tan' x = \frac{(\cos x)(\sin'x) - (\sin x )(\cos'x)}{\cos^2x} = \frac{(\cos x)(\cos x) - (\sin x)(-\sin x)}{\cos^2x} = \frac{\cos^2x + \sin^2x}{\cos^2x} = \frac{1}{\cos^2x} = \sec^2x$

The penultimate step uses $\cos^2x + \sin^2x = 1$.

### Second derivative

WHAT WE USE: secant function#First derivative, chain rule for differentiation, differentiation rule for power functions

The second derivative is:

$\frac{d^2}{dx^2}(\tan x) = 2\tan x \sec^2x$

We obtain this by differentiating the first derivative:

$\frac{d^2}{dx^2}(\tan x) = \frac{d}{dx}(\sec^2x) = \frac{d}{d(\sec x)}(\sec^2x) \frac{d(\sec x)}{dx} = 2\sec x (\sec x \tan x) = 2\sec^2x\tan x$

## Points and intervals of interest

Consider the function $f(x) := \tan x$.

### Vertical asymptotes

At each of the points where $\tan$ is undefined, which are precisely the odd multiples of $\pi/2$, the left hand limit is $+\infty$ and the right hand limit is $-\infty$.

### Critical points

As computed earlier, we have:

$f'(x) = \sec^2x$

The original function $f$ is undefined at odd multiples of $\pi/2$. The expression for $f'$ is also undefined at precisely these points, but these are not considered critical points. Note that $f'$ is defined wherever $f$ is. Thus, the only kind of critical points are those where $f'(x) = 0$. However, $f'(x) \ne 0$ anywhere because $0 \le \cos^2x \le 1$ forces $\sec^2 x \ge 1$.

The upshot is that the function has no critical points on its domain of definition.

### Intervals of increase and decrease

Wherever the function is defined, the derivative $f'(x)$ is positive. Thus, $\tan$ is increasing on each of the open intervals in its domain of definition, i.e., $\tan$ is increasing on each of the intervals:

$\! \dots, (-3\pi/2,-\pi/2), (-\pi/2,\pi/2),(\pi/2,3\pi/2), \dots$

Further, on each interval, it increases from a limiting value of $-\infty$ at the left end of the interval to a limiting value of $+\infty$ at the right end of the interval.

However, it is not correct to say that $\tan$ is increasing throughout its domain. This is because between successive intervals, it jumps from <math+\infty[/itex] to $-\infty$.

### Local extreme values

There are no local extreme values for the function.

### Intervals of concave up and concave down

The second derivative is $x \mapsto 2 \tan x \sec^2x$. The sign of this is determined by the sign of $\tan$. Thus, when $\tan x < 0$, the graph is concave down, and when $\tan x > 0$, the graph is concave up. Unpacking, we get:

• The graph of $\tan$ is concave down on intervals of the form $\{ n \pi - \pi/2 \mid n \in \mathbb{Z} \}$.
• The graph of $\tan$ is concave up on intervals of the form $\{ n \pi + \pi/2 \mid n \in \mathbb{Z} \}$.

### Points of inflection

The points of inflection on the graph are points of the form $\{ (n\pi,0) \mid n \in \mathbb{Z} \}$, i.e., integer multiples of $\pi$. At these points, the graph transitions from concave down (on the left) to concave up (on the right).

## Integration

### First antiderivative

WHAT WE USE: integration of quotient of derivative of function by function

We use the following form:

$\int \frac{f'(x)\, dx}{f(x)} = \ln|f(x)| + C$

In our case, we write:

$\int \tan x \, dx = \int \frac{\sin x}{\cos x} \, dx = - \int \frac{-\sin x}{\cos x} \, dx$

Using the integration form above with $f = \cos$, we get:

$-\ln|\cos x| + C$

Alternative method: [SHOW MORE]

### Definite integrals

The definite integral of the $\tan$ function can be computed on any closed interval that lies completely within one of the open intervals on which $\tan$ is defined, i.e., both endpoints must lie between the same pair of consecutive odd multiples of $\pi/2$. Thus, for instance, $\tan$ can be integrated from $\pi/4$ to $\pi/3$ but not from $\pi/3$ to $2\pi/3$, because these lie on opposite sides of the point $\pi/2$ at which the function has a vertical asymptote.

Moreover, all improper integrals are undefined.

If $a,b$ both lie between consecutive odd multiples of $\pi/2$, we get:

$\int_a^b \tan x \, dx = \ln\left(\frac{\cos a}{\cos b}\right)$

Note that the lower limit comes on top because of the minus sign on the antiderivative. Further, we do not need to put an absolute value sign because $\cos$ has constant sign on each interval of definition, so the quotient is positive in sign.

Finally, note that $\tan$ is an odd function, and more generally, has half turn symmetry about points $(n\pi,0)$, so:

$\int_{n\pi - t}^{n\pi + t} \tan x \, dx = 0$

for $t \in (0,\pi/2)$.

### Transformed versions

We can use the integration of $\tan$ to integrate any function of the form $x \mapsto \tan(mx + \varphi)$ using the integration of linear transform of function:

$\int \tan(mx + \varphi) \, dx = \frac{-1}{m}\ln|\cos(mx + \varphi)| + C$

The points where the transformed function is undefined are odd multiples of $\pi/(2m)$ minus $\varphi/m$, i.e.,:

$\{ n\pi/m + \pi/(2m) - \varphi/m \mid n \in \mathbb{Z} \}$

### Higher antiderivatives

It is not possible to antidifferentiate the first antiderivative of $\tan$ within the universe of elementarily expressible functions.

## Differential equations

### Autonomous differential equations with this function as solution

The standard differential equation is:

$\! \frac{dy}{dx} = 1 +y^2$

The general solution to this is $y= \tan(x + \varphi)$ where $\varphi$ is a constant. The value of $\varphi$ can be determined using initial value conditions.

## Power series and Taylor series

### Computation of Taylor series

The $\tan$ function has a Taylor series at $x = 0$. The first few terms are indicated below:

$\tan x = x + \frac{x^3}{3} + \frac{2x^5}{15} + \frac{17x^7}{315} + \dots$

Note the following:

• All the terms with nonzero coefficients are odd degree terms, because $\tan$ is an odd function.
• All the coefficients on odd degree terms are positive. This follows from the fact that all the higher derivatives of $\tan$, evaluated at 0, are positive.

The coefficients can be written explicitly using the odd-degree up/down numbers, which are also called the tangent numbers or zag numbers. Explicitly, if $A_n$ denotes the $n^{th}$ tangent number, then the Taylor series for $\tan$ is:

$\sum_{k=0}^\infty \frac{A_{2k+1}x^{2k+1}}{(2k + 1)!}$

### Taylor series equals power series

The Taylor series for $\tan$ converges to $\tan$ on its interval of convergence, which is $(-\pi/2,\pi/2)$.

## Limit computations

### Order of zero

We get the following limit from the power series:

$\lim_{x \to 0} \frac{\tan x}{x} = 1$

Thus, the order of the zero of $\tan$ at 0 is 1 and the residue is 1.

The limit can be computed in many ways:

Name of method for computing the limit Details
Simple manipulation, using $\lim_{x \to 0} (\sin x)/x = 1$ $\! \lim_{x \to 0} \frac{\tan x}{x} = \lim_{x \to 0} \frac{\sin x}{x} \frac{1}{\cos x} = \lim_{x \to 0} \frac{\sin x}{x} \lim_{x \to 0} \frac{1}{\cos x} = 1 \cdot 1 = 1$
Using the L'Hopital rule $\lim_{x \to 0} \frac{\tan x}{x} \stackrel{*}{=} \lim_{x \to 0} \frac{\sec^2x}{1} = \sec^20 = 1$
Using the power series We have $\tan x = x + \frac{x^3}{3} + O(x^5)$, so $(\tan x)/x = 1 + \frac{x^2}{3} + O(x^4)$. Taking the limit at $x = 0$ gives 1.