# Integral of Tan x

Last Updated : 06 Mar, 2024

Integral of tan x is ln |sec x| + C. Integral of tan x refers to finding the integration of the trigonometric function tan x with respect to x which can be mathematically formulated as âˆ«tan x dx. The tangent function, tan x, is an integrable trigonometric function that is defined as the ratio of the sine and cosine functions.

This article discusses the formula for the integral of tan x along with derivation, definite integral of tan x, and integral of tan inverse x. We will also discuss some solved examples based on the integral of tan x along with Practice Questions and FAQs.

## What is Integral of Tan x?

Integration of tan x is ln |sec x| + C or -ln |cos x| + C. There can be both indefinite and definite integrals of tan x with respect to x. The Indefinite Integral is represented as âˆ«tan x dx and the definite integral of tan x is given as [Tex]\int_a^btan\ x\ dx [/Tex] Tan x is an integrable function. Tan is one of the six trigonometric functions in maths. The domain of tan x is all real numbers except odd multiples of Ï€/2 and the range of tan x is all real numbers. Hence, tan x is continuous at all values of Real numbers except Ï€/2. Hence, the trigonometric function tan x is integrable in its domain only which consists of all the Real Numbers except odd Multiples of Ï€/2.

## Integral of Tan x Formula

Let’s have a look at the formula for the integral of tan x with respect to x is shown below.

âˆ« tan x dx = ln |sec x| + C

or

âˆ« tan x dx = -ln |cos x| + C

In order to understand the process of Integration of tan x dx we need to have some requisite knowledge which can be gained from the following article: Integration By Parts Method.

## How to do Integration of tan x dx?

Let’s have a look at the proof for the above formula for the indefinite integration of tan x. Here, the Integration by Substitution Method and Logarithmic Properties are used.

I = âˆ« tan x dx

We know that tan X = sin X / cos X

Thus, âˆ« tan x dx = âˆ« (sin x /cos x) dx

I = âˆ« (1/cos x) sin x dx

Letâ€™s apply the substitution method of integration.

Let t = cos x

now differentiating above equation with respect to x.

â‡’ dt/dx = â€“ sin x

â‡’ sin x dx = -dt

So, âˆ« tan x dx = âˆ«(1 /cos x) sin x dx

= âˆ« (1/t) (-dt) = â€“ âˆ« (1/t) dt

I = â€“ ln |t| + C âˆ´ (C is added due to indefinite integral)

Substituting the value of t back in the equation.

I = -ln |cos x| + C {Using Logarithmic Properties}

I = ln |1/cos x| + CI = ln |sec x| + C

Therefore, âˆ« tan x dx = -ln |cos x| + C = ln |sec x| + C

So, by using above steps, we have proved the formula for the Indefinite Integration of tan x with respect to x.

## Definite Integral of Tan x

We know that, by the fundamentals properties of definite integrals, we can calculate the definite integral of tan x within any two time intervals limits.

Definite Integral of f(x) = [Tex]\int_a^b f(x)\ dx~=~F(b) – F(a)[/Tex]

Definite Integral of f(x) within ‘a’ to ‘b’ interval = [Tex]\int_a^b tan\ x\ dx~=~|ln\ sec \ x|_a^b~=~|ln\ sec \ b|~-~|ln\ sec \ a| [/Tex]

Using the above property to calculate the definite integral of tan x. Let’s take an example of definite integral of tan x between the time interval Ï€/4 and Ï€/3.

we know that, [Tex]\int tan x dx = ln |sec x| + C[/Tex]

Then ,[Tex]\int_{\pi/4}^{\pi/3} tan\ x\ dx = ln|sec \ \pi/3| – ln|sec\\pi /4|[/Tex]

we know that,

• sec Ï€/ 3 = 2
• sec Ï€/ 4 = âˆš(2)

so, [Tex]\int_{\pi /4}^{\pi / 3} tan\ x\ dx~=~ln |2| – ln|\sqrt{2|}[/Tex]

we know that, ln|a| – ln|b| = ln|a/b|

so, [Tex]\int_{\pi /4}^{\pi /3} tan\ x\ dx~=~ln |2/\sqrt{2}|~=~0.3465735902799727[/Tex]

## Integration of Tan Inverse x

The indefinite integration of tan inverse x with respect to x can be calculated using the integration by parts method. The formula for the integration of tan inverse x with respect to x is given as

âˆ« tan-1x dx = x tan-1x – (1/2) ln |1 + x2| + C

(Note: Derivation for the above formula can be seen further in the Solved Example 4.)

Also, Check

## Solved Examples on Integral of Tan x

Example 1: Calculate the integral of cot x with respect to x.

Solution:

âˆ« cot x dx = âˆ« cos x / sin x dx

Substitute sin x = t.

Differentiating with respect to x.

Then cos x dx = dt.

Then the above integral becomes

= âˆ« (1/t) dt

= ln |t| + C (Because âˆ« 1/x dx = ln|x| + C)

Substitute back t = sin x back here,

= ln |sin x| + C

Thus, âˆ« cot x dx = ln |sin x| + C.

Example 2: Calculate the integral of sec x tan x with respect to x.

Solution:

We can write sec x = 1/cos x and tan x = sin x/cos x.

We have, âˆ«sec x tan x dx = âˆ«(1/cos x)(sin x/cos x) dx

= âˆ«(sin x/cos2x) dx

Now, assume cos x = t.

Differentiating both sides

-sin x dx = dt

â‡’ sin x dx = dt

Substituting back these values

We have, âˆ«sec x tan x dx = âˆ«(-1/t2) dt

= (1/t) + C

Substitute back t = sin x back here,

= 1/cos x + C

= sec x + C

Thus, âˆ« sec x tan x dx = sec x + C

Example 3: Calculate the integral of tan2x with respect to x.

Solution:

Let us find the integral of (tan2 x) with respect to x.

= âˆ« tan2 x dx

Using the identity sec2 X â€“ tan2 X = 1,

âˆ« tan2 x dx = âˆ« (sec2 x â€“ 1) dx

= âˆ« sec2 x dx â€“ âˆ« 1 dx

Using the standard integration formulas, âˆ«sec2 x dx = tan x + C and âˆ« 1 dx = x + C,

we get, tan x â€“ x + C

Hence, âˆ« tan2 x dx = tan x â€“ x + C.

Example 4: Calculate the integral of tan-1 x with respect to x.

Solution:

We know that,

Formula for integration by parts is âˆ«f(x)g(x)dx = f(x) âˆ«g(x)dx – âˆ«[d(f(x))/dx Ã— âˆ«g(x) dx] dx.

âˆ«tan-1x dx = âˆ«tan-1x.1 dx

= tan-1x âˆ«1dx – âˆ«[d(tan-1x)/dx Ã— âˆ«1 dx] dx

= x tan-1x – âˆ«[1/(1 + x2) Ã— x] dx

= x tan-1x – âˆ«x/(1 + x2) dx

[Multiplying and dividing by 2]

= x tan-1x – (1/2) âˆ«2x/(1 + x2) dx

{Using formula âˆ«f'(x)/f(x) dx = ln |f(x)| + C}

= x tan-1x – (1/2) ln |1 + x2| + C

Hence, the integral of tan inverse x is x tan-1x – (1/2) ln |1 + x2| + C.

Example 5: Calculate the integral of sec x with respect to x.

Solution:

Firstly, we multiply and divide the integrand with (sec x + tan x).

âˆ« sec x dx = âˆ« sec x Â· (sec x + tan x) / (sec x + tan x) dx

= âˆ« (sec2x + sec x tan x) / (sec x + tan x) dx

Now assume that sec x + tan x = t.

Differentiating with respect to x.

Then (sec x tan x + sec2x) dx = dt.

Substituting these values in the above integral,

âˆ« sec x dx = âˆ« dt / t = ln |t| + C

Substituting t = sec x + tan x back here,

Hence, âˆ« sec x dx = ln |sec x + tan x| + C.

## Practice Questions on Integral of Tan x

Q1. Find the integral of cosec x with respect to x.

Q2. Find the integral of tan(âˆšx) with respect to x.

Q3. Find the definite integral of (tan2 x – 1) between the interval Ï€/3 to Ï€/2.

Q4. Calculate the integral of 1/(1 + tan x) with respect to x.

Q5. Calculate the integral of tan2 (2x – 7) with respect to x.

## FAQs on Integral of Tan x

### What is Integration of tan x?

The integral of tan x is : ln |sec x| + C or -ln |cos x| + C

### What is Integration? Name its types.

Integration is the inverse process of differentiation. We are given with the derivative of a function and we are asked to find the original function, such process is called as Integration. In integrals, we find the area enclosed between the curve and the axis.

There are two types of integrals in calculus:

• Definite Integral (Integral within limits)
• Indefinite Integral (Integral without limits)

### Why do we add an Constant C in Indefinite Integrals?

We know that the derivative of any constant is 0, so while integration when we are willing to get the original function, we are unable to obtain the constant term the original function might had. Hence, we add a constant C to represent the constant term of the original function, which could not be obtained through this anti-derivative process.

### What is the Integral of sec x tan x?

The integral of sec x tan x is sec x + C

### What is the Derivative of tan x?

The derivative of tan x is sec2x

### What is the Integral of arc tan x?

The integral of arc tan x is âˆ« tan-1x dx = x tan-1x – (1/2) ln |1 + x2| + C

Previous
Next