# What is the derivative of tanx? Differentiation of tanf(x)

The derivate of tanx is sec²x. More importantly, if:

y = tanf(x) then

dy/dx = f`(x)sec²f(x)

Let’s take a look at some examples that involve the derivative of tanf(x)

Example 1

If y = tan7x, work out dy/dx.

Here, f(x) = 7x so f`(x) = 7, and tanx derives to sec²x:

dy/dx = 7sec²(7x)

Example 2

If y = tan(5x + 2), work out dy/dx.

Here, f(x) = 5x+2 so f`(x) = 5, and tanx derives to sec²x:

dy/dx = 5sec²(5x+2)

Example 3

Calculate dy/dx if y = tan(7x²)

Here, f(x) = 7x² so f`(x) = 14x, and tanx derives to sec²x:

dy/dx = 14xsec²(7x²)

Example 4

Calculate dy/dx if y = tan(5x² + 4x + 1)

Here, f(x) = 5x² + 4x + 1 so f`(x) = 10x + 4, and tanx derives to sec²x:

dy/dx = (10x+4)sec²(5x² + 4x + 1)

Example 5

A curve has an equation y = tan3x, work out the equation of the tangent to the curve at x = 20⁰.

First you need to work out the derivative of y = tan3x.

Here, f(x) = 3x so f`(x) = 3, and tanx derives to sec²x:

dy/dx = 3sec²(3x)

Now it you substitute x = 20 into dy/dx you will get the gradient of the tangent at x = 20.

dy/dx = 3sec²(3x)

m = 3sec²(3 × 20)

m = 3sec²(60)

m = 3 × [1/cos²(60)]

m = 3 × [1/(1/2)²]

m = 3 × 4

m = 12

So the equation of the tangent is:

y = 12x + c

So all you need to do know is to find the value of the intercept, but you will need to calculate the y coordinate before you can do this. The y coordinate can be found by substituting x = 20 into y = tan3x:

y = tan 60

y = √3

So subbing x = 20 and y = √3 into y = 12x +c you get:

y = 12x + c

√3 = 12 × 20 + c

√3 = 240 + c

c = √3 -240.

So the equation of the tangent is:

y = 12x + √3 -240