Derivative of tan

Learn about derivative of tan, formula, proof, solution and how to differentiate tan with chain and product rules.

Alan Walker-

Published on 2023-06-11

Introduction to the derivative of tan

Derivatives have a wide range of applications in almost every field of engineering and science. All derivatives of trigonometric functions can be found by following the derivative of sin x and cos x. Or, we can directly find the tan derivative by applying the first principle of differentiation. In this article, you will learn what the differentiation of tanx is and how to calculate the differentiation of tanx by using different approaches.

What is the derivative of tan?

The tan x derivative with respect to the variable ‘x’ is equal to sec2x. It is denoted by d/dx(tanx). The tangent, in actuality, is the slope of a line at the point of change in the function. In a triangle, it is the ratio of opposite to adjacent sides. It is written as;

tan x = sinx/cosx

differentiation of tan x formula

The formula to differentiate tanx is equal to the square of secant x, that is;

d/dx (tanx) = sec2x

How do you prove the derivative of tan?

There are numerous ways to derive derivatives of tan x. Therefore, we can prove the derivative tan x by using;

  1. First Principle

  2. Chain Rule

  3. Quotient Rule

  4. Product Rule

Differentiation of tan x by first principle

The derivative of a function by first principle refers to finding a general expression for the slope of a curve by using algebra. It is also known as the delta method. The derivative is a measure of the instantaneous rate of change, which is equal to,

f'(x) = f (x+h) - f(x) / h

Proof of tanx derivative by first principle

To prove the tan derivative by using first principle, replace f(x) by tan x.

f'(x) = tan (x+h) - tan x / h

If we have to calculate the derivative of tan3x, we just to have to replace tan x by tan(3x) here.

Now, by using trigonometric ratio tan x = sin x / cos x , so,

f'(x) = sin (x + h) / cos (x + h) - sin x / cos x / h


f'(x) = sin (x+h)cos x - cos (x+h) sin x / hcos (x+h) cos x


sin (x+y) = sin x cos y - cos x sin y

It is the expansion of the sin x function. Therefore, we can write the above equation as;

f'(x) = sin (x + h - x) / hcos (x + h) cos x

Again simplifying to get,

f'(x) = sin h / hcos (x + h) cos x

f'(x) = [1 / cos (x+h) cos x X sin h / h]

Separating limits,

f'(x) = [1 / cos (x+h) cos x] x [sin h / h]

As h approaches to zero, [sin h / h] becomes 1. So,

f'(x) = [1 / cos (x+h) cos x]

Evaluating limit,

f'(x) = 1 / cos (x+0) cos x = 1 / cos x cos x

Since the reciprocal of cosine is equal to secant. Therefore,

f'(x) = 1 / cos2x = sec2x

Hence we have verified the differentiation of tan x. The tan2x formula can also be verified by using first principle. Also, use our derivative definition calculator online which provides you a step-by-step method of differentiation. 

Differential of tanx by chain rule

The tan derivative formula can be calculated by using chain rule because tangent function can be written as the combination of two functions. For a function y=f(g(x)), the chain rule of derivatives is defined as;

dy/dx = dy/du x du/dx

Where, u=g(x), y=f(u), dy/du is the derivative of f(u) with respect to u and du/dx is the derivative of g(x) with respect to x.

Proof of derivative of tanx by chain rule

To prove tan x derivative by using the chain rule formula, consider that,

u = cot x = 1 / tan x

We have,

d/dx (tan x) = d/dx (1/cot x)

d/dx (tan x) = d/dx (1/u)

By chain rule,

d/dx (tan x) = d/du (1/u) . du/dx


du/dx = -cosec2x

d/dx(tan x) = -1/u2 x (-cosec2 x)

Now using the value of u,

d/dx(tan x) = sin2x / cos2 x (1 / sin2x)

We get,

d/dx(tan x) = 1 / cos2x = sec2x


Hence the differentiation of tanx is equal to the square of sec x.

You can calculate derivative by using chain rule derivative calculator on this website.

Derivative of tan(x) using quotient rule

Since the tangent is the ratio of two trigonometric ratios sine and cosine. Therefore, the tan derivative can also be calculated by using the quotient rule. The quotient rule is defined as;

d/dx (f(x) / g(x)) = f(x).g'(x) - g(x).f'(x) / (g(x))2

Proof of derivative of tanx by quotient rule

We have,

tan x = sin x cos x

Now by applying a derivative with respect to x on the above equation.

d/dx(tan x) = d/dx (sin x / cos x)

By using quotient rule to differentiate tan x,

d/dx(tan x) = (cos x.(cos x)-sin x.(-sin x) / x)

ddx(tan x) = x + x / x


cos2x + sin2x = 1


d/dx(tan x) = 1/cos2x = sec2x

You can also use quotient of two functions calculator which helps you in calculating derivative of two functions.

Derivative of tan x using product rule

The product rule in derivatives is used when we have to calculate derivatives of two functions at a time. The product rule for two functions says that;

d/dx (f(x).g(x)) = f'(x)g(x) + f(x).g'(x)

Proof of derivative tan by product rule

The tangent can be written as;

tan x = sin x / cos x = sin x 1 / cos x


tan x = sin x.sec x

Applying derivative with respect to x,

d/dx(tan x) = d/dx (sin x.sec x )

Applying product rule formula,

d/dx(tan x) = sin x (sec x tan x ) + sec x.(cos x)

d/dx(tan x) = sin x . (1 / cos x ) . sin x / cos x + (1 / cos x) cos x

More simplification,

d/dx(tan x) = sin2x / cos2x + 1 = cos2x + sin2x / cos2x


cos2x + sin2 x = 1


d/dx(tan x) = 1/cos2x = sec2x

Hence the tan x derivative is always equal to the square of secant x.

Use product rule differentiation calculator for learning and practice online.

How to find the derivative tan x with a calculator?

The most easy way to differentiate tanx is by using an online tool. You can use our derivative calculator for this. Here, we provide you a step-by-step way to calculate derivatives by using this tool.

  1. Write the function as tan x in the “enter function” box. In this step, you need to provide input value as a function as you have to calculate the tan differentiation x.

  2. Now, select the variable by which you want to differentiate tan x. Here you have to choose ‘x’.

  3. Select how many times you want to differentiate tan. In this step, you can choose 2 for second, 3 for third derivative and so on.

  4. Click on the calculate button. After this step, you will get the d/dx tanx within a few seconds.

    Since the tan cube x formula is difficult to find because of higher power. You can use our derivative calculator to calculate derivative of any function.

Frequently Asked Questions

Where is tan x not differentiable?

The trigonometric function tan x is differentiable in its domain. But it is not differentiable at (2n+1)90. In other words, when the angle is 90 degrees, tan x is not differentiable. It is because sin x becomes undefined at 90 degrees.

What has a derivative of tan?

The derivative of a function calculates its rate of change. So, the d/dx tanx is equal to the square of secant function. In mathematically form it is written as;

d/dx(tan x) =sec2x

What is the first derivative of tangent?

The slope of the tangent line for each point on a function equals its first derivative. As a result, it indicates when the function is rising, decreasing, or has a horizontal tangent.

What is the derivative of tangent squared?

The derivative of y=tan2x is;

dy/dx = 2 tanx . sec2x

Or, we can calculate it by using chain rule also.


Also Read

Copyright © 2022 2023