Integrals

Integral of sec²(x) = tan(x) + C, with Examples

Integral of sec²(x) = tan(x) + C, with Examples

The indefinite integral of sec²(x) with respect to x is tan(x) + C. Here, C is the constant of integration. The derivative of tan(x) equals sec²(x). Therefore, you can calculate the integral of sec²(x). This directly reverses differentiation. As a result, it yields tan(x) + C.

The integral of sec²(x) is a short, fundamental calculus result. However, it is also a vital building block. You will use it for more complex integrals. These include tan²(x) and higher even powers of secant. You also use it for trigonometric substitution and rational trig expressions. Understanding this antiderivative makes solving harder multi-step problems significantly easier.

Why is the integral of sec²(x) equal to tan(x) + C?

Integration is the inverse operation of differentiation. To find the integral of sec²(x), you look for a function whose derivative is sec²(x). That function is tan(x).

Integral of sec^2x: Why is the integral of sec²(x) equal to tan(x) + C?

To prove this directly, write tangent as the quotient of sine and cosine. Then, evaluate the derivative of tan x. Use the quotient rule for this:

$$\begin{aligned}\frac{d}{dx} \left(\frac{\sin x}{\cos x}\right) &= \frac{\cos x \cdot \cos x - \sin x \cdot (-\sin x)}{\cos^2 x} &= \frac{\cos^2 x + \sin^2 x}{\cos^2 x} &= \frac{1}{\cos^2 x} = \sec^2 x\end{aligned}$$

The Pythagorean identity \(\cos^2 x + \sin^2 x = 1\) simplifies the numerator to 1. Reading this derivative equation in reverse gives the integral formula \(\int \sec^2 x \, dx = \tan x + C\). Memorizing both directions together prevents sign confusion during exam problems.

What does sec²(x) represent geometrically?

Because \(\sec^2 x = \frac{1}{\cos^2 x}\), \(\sec^2 x\) is always greater than or equal to 1. Also, \(\cos^2 x \le 1\) for all real numbers. This applies where cosine is defined. Geometrically, \(\sec^2 x\) represents the instantaneous slope of \(y = \tan x\). The graph of \(\tan x\) increases continuously. This occurs on every open interval between its vertical asymptotes. It has a minimum slope of 1 at \(x = 0\). However, the slope grows infinitely steep as \(x\) approaches \(\frac{\pi}{2}\).

Geometric tools including protractor, rulers, and compass on paper

According to the Fundamental Theorem of Calculus, you can find the area under the curve \(y = \sec^2 x\). This area is over an interval $[0, b]$. As a result, it equals the net change in height of the tangent function across that same interval:

$$\int_0^b \sec^2 x \, dx = \tan b - \tan 0 = \tan b$$

Evaluating this definite integral on the interval \(\left[0, \frac{\pi}{4}\right]\) illustrates the relationship:

$$\int_0^{\pi/4} \sec^2 x \, dx = \tan\left(\frac{\pi}{4}\right) - \tan(0) = 1 - 0 = 1$$

On the interval \(\left[0, \frac{\pi}{4}\right]\), the function \(\sec^2 x\) increases smoothly from 1 to 2. The curve’s area equals 1. This occurs over an interval width of approximately 0.785. As a result, this matches geometric expectations.

How do you integrate sec²(x) with inside functions or u-substitution?

When the argument inside secant-squared is a linear function \(ax + b\), you must apply the chain rule in reverse. This requires you to divide by the coefficient \(a\).

$$\int \sec^2(ax + b) \, dx = \frac{\tan(ax + b)}{a} + C$$

For example, integrating \(\sec^2(3x)\) gives:

$$\int \sec^2(3x) \, dx = \frac{\tan(3x)}{3} + C$$

Differentiating \(\tan(3x)\) produces an extra factor of 3. This happens because of the chain rule. So, you can divide by 3 to cancel it. If the inside function is non-linear, you can evaluate the integral. Use u-substitution for this. However, the inner function’s derivative must be present as an outside multiplier.

$$\int x \sec^2(x^2) \, dx$$

Let \(u = x^2\). This means \(du = 2x \, dx\). You can also write this as \(\frac{1}{2} du = x \, dx\). Substituting these terms simplifies the integral.

$$\int x \sec^2(x^2) \, dx = \frac{1}{2} \int \sec^2 u \, du = \frac{1}{2} \tan u + C = \frac{\tan(x^2)}{2} + C$$

How do you integrate tan²(x)?

A common mistake in calculus is trying to apply the power rule to \(\int \tan^2 x \, dx\). Instead, rewrite the integrand using the trigonometric identity \(\tan^2 x = \sec^2 x - 1\):

$$\int \tan^2 x \, dx = \int (\sec^2 x - 1) \, dx = \int \sec^2 x \, dx - \int 1 \, dx = \tan x - x + C$$

Converting \(\tan^2 x\) into secant-squared turns an otherwise difficult expression into a single-step basic antiderivative.

How do you spot sec²(x) hidden in disguise?

You can simplify many trigonometric integrals. First, rewrite the integrand. This isolates \(\sec^2 x\). Also, look for these common algebraic transformations:

How do you spot sec²(x) hidden in disguise?
  • \(\frac{1}{\cos^2 x}\), which is equivalent to \(\sec^2 x\) by definition.
  • \(1 + \tan^2 x\), which equals \(\sec^2 x\) via the Pythagorean identity.
  • Also consider \(\frac{1}{1 + \cos 2x}\) or \(\frac{1}{1 - \sin^2 x}\). These simplify directly to constant multiples of \(\frac{1}{\cos^2 x}\).
  • Products where \(\sec^2 x\) multiplies a power or function of \(\tan x\). Here, \(\sec^2 x \, dx\) serves as \(du\) for the substitution \(u = \tan x\).

Whenever \(\tan x\) appears inside a complex expression, \(\sec^2 x\) may also be present. You can set \(u = \tan x\). This converts the entire integrand into an algebraic polynomial or rational function.

Step-by-step worked examples

Example 1 (Definite interval evaluation). Calculate the definite integral of \(\sec^2 x\) from \(x = \frac{\pi}{6}\) to \(x = \frac{\pi}{3}\):

A person drawing with colored pencils at a desk

$$\int_{\pi/6}^{\pi/3} \sec^2 x \, dx = \left[ \tan x \right]_{\pi/6}^{\pi/3} = \tan\left(\frac{\pi}{3}\right) - \tan\left(\frac{\pi}{6}\right) = \sqrt{3} - \frac{\sqrt{3}}{3} = \frac{2\sqrt{3}}{3} \approx 1.1547$$

Example 2 (Trigonometric identity substitution). Evaluate \(\int \frac{dx}{1 + \cos 2x}\). Use the double-angle identity \(1 + \cos 2x = 2\cos^2 x\). Then, substitute this into the denominator.

$$\int \frac{dx}{1 + \cos 2x} = \int \frac{dx}{2\cos^2 x} = \frac{1}{2} \int \sec^2 x \, dx = \frac{\tan x}{2} + C$$

You can instantly simplify rational trigonometric integrals. First, recognize that a cosine-squared term in the denominator forms a secant-squared term.

Example 3 (Power of tangent with secant-squared). Evaluate \(\int \sec^2 x \tan^3 x \, dx\). First, let \(u = \tan x\). As a result, \(du = \sec^2 x \, dx\).

$$\int \sec^2 x \tan^3 x \, dx = \int u^3 \, du = \frac{u^4}{4} + C = \frac{\tan^4 x}{4} + C$$

Example 4 (Logarithmic antiderivative form). Evaluate \(\int \frac{\sec^2 x}{1 + \tan x} \, dx\). The numerator is the derivative of the denominator. Let \(u = 1 + \tan x\), so \(du\) is the integral of sec^2x, \(dx\):

$$\int \frac{\sec^2 x}{1 + \tan x} \, dx = \int \frac{du}{u} = \ln|u| + C = \ln|1 + \tan x| + C$$

Keep absolute value bars around the logarithm argument because \(1 + \tan x\) takes negative values whenever \(\tan x < -1\).

Integrating sec²(x) e^(tan x)

Example 5 (Exponential function with tangent argument). Evaluate \(\int \sec^2 x , e^{\tan x} \, dx\). You can use \(u = \tan x\). Then \(du = \sec^2 x \, dx\).

$$\int \sec^2 x , e^{\tan x} \, dx = \int e^u \, du = e^u + C = e^{\tan x} + C$$

You can confirm this result by differentiating \(e^{\tan x}\). Use the chain rule. Because of this, \(\frac{d}{dx}\left(e^{\tan x}\right) = e^{\tan x} \cdot \sec^2 x\).

Example 6 (Integration by parts). You can evaluate \(\int x \sec^2 x \, dx\). First, set \(u = x\). Also set \(dv = \sec^2 x \, dx\). This yields \(du = dx\) and \(v = \tan x\). Next, apply the integration by parts formula: \(\int u \, dv = uv - \int v \, du\). This gives you:

$$\int x \sec^2 x \, dx = x \tan x - \int \tan x \, dx$$

The remaining term requires the integral of tan x. It equals \(-\ln|\cos x| + C\). You can also write it as \(\ln|\sec x| + C\).

$$\int x \sec^2 x \, dx = x \tan x + \ln|\cos x| + C$$

Example 7 (Binomial square expansion). Evaluate \(\int (\sec x + \tan x)^2 \, dx\). Expanding the square gives \(\sec^2 x + 2\sec x \tan x + \tan^2 x\). Next, replacing \(\tan^2 x\) with \(\sec^2 x - 1\) combines like terms:

$$\int (\sec x + \tan x)^2 \, dx = \int (2\sec^2 x + 2\sec x \tan x - 1) \, dx = 2\tan x + 2\sec x - x + C$$

You can check worked solutions using an integral calculator.

How does sec²(x) compare to other basic trig integrals?

The table below compares the antiderivative of \(\sec^2 x\) to other standard trigonometric integrals taught in calculus:

Toy figures in a classroom setting with simple math on blackboard
Integral Result
\(\int \sec^2 x \, dx\) \(\tan x + C\)
\(\int \csc^2 x \, dx\) \(-\cot x + C\)
\(\int \sec x \tan x \, dx\) \(\sec x + C\)
\(\int \csc x \cot x \, dx\) \(-\csc x + C\)
\(\int \sec x \, dx\) \(\ln|\sec x + \tan x| + C\)

Integrating \(\sec x\) requires a specific algebraic multiplication trick; see the full breakdown for the integral of sec x.

The csc²(x) twin integral

Cosecant-squared follows the same pattern as secant-squared, but incorporates a negative sign. Because the derivative of \(\cot x\) is \(-\csc^2 x\), reversing the operation yields:

$$\int \csc^2 x \, dx = -\cot x + C$$

A reliable memory rule: every cofunction derivative in calculus (cosine, cotangent, cosecant) produces a negative sign.

What are common mistakes when integrating sec²(x)?

  1. Incorrectly applying the power rule. Writing \(\int \sec^2 x \, dx = \frac{\sec^3 x}{3}\) is wrong. Differentiating \(\frac{\sec^3 x}{3}\) produces \(\sec^3 x \tan x\), not \(\sec^2 x\).
  2. Confusing sec²(x) with sec(x). Plain \(\sec x\) integrates to \(\ln|\sec x + \tan x| + C\), whereas \(\sec^2 x\) integrates directly to \(\tan x + C\).
  3. Forgetting inner linear scaling factors. The integral \(\int \sec^2(4x) \, dx\) is \(\frac{\tan(4x)}{4} + C\), not \(\tan(4x) + C\).
  4. Integrating across vertical asymptotes. Evaluating \(\int_0^{\pi} \sec^2 x \, dx\) by calculating \(\tan \pi - \tan 0 = 0\) is invalid. The function \(\sec^2 x\) has an asymptote at \(x = \frac{\pi}{2}\) where it goes to infinity, so the integral diverges.
  5. Attempting power rule integration on tan²(x). You cannot evaluate \(\int \tan^2 x \, dx\) as \(\frac{\tan^3 x}{3}\) because the derivative of tangent (\(\sec^2 x\)) is missing. Rewrite \(\tan^2 x\) as \(\sec^2 x - 1\) first.
  6. Confusing sec²(x) with sec(x²). The expression \(\sec^2 x\) means \((\sec x)^2\). However, \(\sec(x^2)\) squares the input argument \(x\). The formula \(\tan x + C\) applies only to \(\sec^2 x\).

Where is the integral of sec²(x) used in calculus?

The integral of sec^2x is fundamental for trigonometric substitution. Use the substitution \(x = \tan \theta\) when solving integrals. These integrals contain \(\sqrt{1 + x^2}\) or \(1 + x^2\). This sets \(dx = \sec^2 \theta \, d\theta\). Also, \(1 + x^2 = \sec^2 \theta\). For example, evaluating \(\int \frac{dx}{1 + x^2}\) yields:

A historical photo of a suspension bridge under construction

$$\int \frac{\sec^2 \theta \, d\theta}{\sec^2 \theta} = \int 1 \, d\theta = \theta + C = \arctan x + C$$

It is also essential for integrating higher even powers of secant. For example, consider \(\sec^4 x\) or \(\sec^6 x\). For \(\int \sec^4 x \, dx\), separate one factor of \(\sec^2 x\). This will serve as \(du\). Then, rewrite the remaining \(\sec^2 x\) as \(1 + \tan^2 x\).

$$\int \sec^4 x \, dx = \int (1 + \tan^2 x) \sec^2 x \, dx$$

Let \(u = \tan x\) and \(du = \sec^2 x \, dx\):

$$\int (1 + u^2) \, du = u + \frac{u^3}{3} + C = \tan x + \frac{\tan^3 x}{3} + C$$

Step-by-step solverExact symbolic engine

Interactive Calculus Problem Solver

Derivatives, antiderivatives, definite and improper integrals, and limits. Every answer comes with the rules used, and antiderivatives are verified by differentiating them back.

Try:
Input syntax
  • Powers x^2, roots sqrt(x), cbrt(x), absolute value |x|
  • Implicit multiplication works: 3x sin(2x)
  • sin cos tan sec csc cot, asin acos atan, sinh cosh tanh
  • e^x or exp(x); ln(x) is the natural log. In this solver log(x) also means the natural log (the usual calculus convention); type log10(x) for base 10
  • Constants pi and e; bounds accept inf and -inf
Enter a function and press Solve to see a full worked solution.

Practice problems with step-by-step solutions

  1. \(\int \sec^2(4x) \, dx\)
  2. \(\int_0^{\pi/3} \sec^2 x \, dx\)
  3. \(\int (1 + \tan^2 x) \, dx\)
  4. \(\int \sec^2\left(\frac{x}{2}\right) \, dx\)
  5. \(\int_0^{\pi/12} \sec^2(3x) \, dx\)
  6. \(\int \sec^2 x \tan x \, dx\)

Solutions:

Practice problems with step-by-step solutions
  1. Using linear substitution \(u = 4x\): \(\frac{\tan(4x)}{4} + C\).
  2. Evaluating FTC limits: \(\tan\left(\frac{\pi}{3}\right) - \tan(0) = \sqrt{3} - 0 = \sqrt{3}\).
  3. Applying the identity \(1 + \tan^2 x = \sec^2 x\): \(\int \sec^2 x \, dx = \tan x + C\).
  4. Dividing by the linear factor \(\frac{1}{2}\): \(2\tan\left(\frac{x}{2}\right) + C\).
  5. Evaluating FTC limits: \(\left[ \frac{\tan(3x)}{3} \right]_0^{\pi/12} = \frac{\tan(\pi/4)}{3} - \frac{\tan(0)}{3} = \frac{1}{3} - 0 = \frac{1}{3}\).
  6. Let \(u = \tan x\). Then \(du = \sec^2 x \, dx\). As a result, \(\int u \, du = \frac{u^2}{2} + C = \frac{\tan^2 x}{2} + C\). Alternatively, using \(u = \sec x\) yields \(\frac{\sec^2 x}{2} + C\). This differs only by a constant. Because \(\frac{\sec^2 x}{2} = \frac{\tan^2 x + 1}{2} = \frac{\tan^2 x}{2} + \frac{1}{2}\).

Frequently asked questions

Is the integral of sec²(x) equal to sec³(x)/3?

No, the power rule does not apply to \(\sec^2 x\) alone. This is because the derivative of secant, which is \(\sec x \tan x\), is missing. Differentiating \(\frac{\sec^3 x}{3}\) yields \(\sec^3 x \tan x\). It does not yield the integral of sec^2x.

What is the integral of sec²(x) tan(x)?

Setting \(u = \tan x\) gives \(du = \sec^2 x \, dx\), turning the integral into \(\int u \, du = \frac{\tan^2 x}{2} + C\). However, setting \(u = \sec x\) yields \(\frac{\sec^2 x}{2} + C\).

What is the integral of sec²(x) from 0 to π/2?

The definite integral diverges to infinity. As \(x\) approaches \(\frac{\pi}{2}\) from the left, \(\tan x\) grows without bound. So, the area under the integral of sec^2x is infinite.

Why is there no logarithm in the integral of sec²(x)?

Logarithms appear in antiderivatives when integrating rational functions of the form \(\frac{f'(x)}{f(x)}\). Because \(\sec^2 x\) is already the direct derivative of \(\tan x\), its antiderivative is simply \(\tan x + C\).

Further reading

Calculators for this topic

Get new calculus guides by email

Free worked examples and new calculators, at most once a day. Unsubscribe with one click.

Leave a comment

Your email address will not be published. Required fields are marked *