Integral of the secant function explained

In calculus, the integral of the secant function can be evaluated using a variety of methods and there are multiple ways of expressing the antiderivative, all of which can be shown to be equivalent via trigonometric identities,

\int\sec\thetad\theta=\begin{cases} \dfrac12ln\dfrac{1+\sin\theta}{1-\sin\theta}+C\\[15mu] ln{l|\sec\theta+\tan\thetar|}+C\\[15mu] ln{\left|{\tan}l(\dfrac\theta2+\dfrac\pi4r)\right|}+C \end{cases}

This formula is useful for evaluating various trigonometric integrals. In particular, it can be used to evaluate the integral of the secant cubed, which, though seemingly special, comes up rather frequently in applications.

The definite integral of the secant function starting from

0

is the inverse Gudermannian function, \operatorname^. For numerical applications, all of the above expressions result in loss of significance for some arguments. An alternative expression in terms of the inverse hyperbolic sine is numerically well behaved for real arguments

\operatorname{gd}-1\phi=

\phi
\int
0

\sec\thetad\theta =\operatorname{arsinh}(\tan\phi).

The integral of the secant function was historically one of the first integrals of its type ever evaluated, before most of the development of integral calculus. It is important because it is the vertical coordinate of the Mercator projection, used for marine navigation with constant compass bearing.

Proof that the different antiderivatives are equivalent

Trigonometric forms

Three common expressions for the integral of the secant,

\begin{align} \int\sec\thetad\theta &=\dfrac12ln\dfrac{1+\sin\theta}{1-\sin\theta}+C\\[5mu] &=ln{l|\sec\theta+\tan\thetar|}+C\\[5mu] &=ln{\left|{\tan}l(

\theta2
+
\pi4r)
\right|}

+C, \end{align}

are equivalent because

\sqrt{\dfrac{1+\sin\theta}{1-\sin\theta}} =l|\sec\theta+\tan\thetar| =\left|{\tan}l(

\theta2
+
\pi4r)
\right|.

t=\tan\tfrac12\theta

to each of the three forms, and show them equivalent to the same expression in terms of

t.

Under this substitution

\cos\theta=(1-t2)/(1+t2)

and

\sin\theta=2t/(1+t2).

First,

\begin{align} \sqrt{\dfrac{1+\sin\theta}{1-\sin\theta}} &=\sqrt{

1+\dfrac{2t
1+t2
}}= \sqrt= \sqrt \\[5mu]&= \left|\frac\right|.\end

Second,

\begin{align} l|\sec\theta+\tan\thetar| &=\left|

1{\cos\theta}
+
\sin\theta
\cos\theta

\right| =\left|

1+t2
1-t2

+

2t
1-t2

\right| =\left|

(1+t)2
(1+t)(1-t)

\right|\\[5mu] &=\left|

1+t
1-t

\right|. \end{align}

Third, using the tangent addition identity

\tan(\phi+\psi)=(\tan\phi+\tan\psi)/(1-\tan\phi\tan\psi),

\begin{align} \left|{\tan}l(\theta2
+
\pi4r)\left|
\right| &=
\tan\tfrac12\theta+\tan\tfrac14\pi
1-\tan\tfrac12\theta\tan\tfrac14\pi

\right| =\left|

t+1
1-t ⋅ 1

\right|\\[5mu] &=\left|

1+t
1-t

\right|. \end{align}

So all three expressions describe the same quantity.

The conventional solution for the Mercator projection ordinate may be written without the absolute value signs since the latitude

\varphi

lies between -\tfrac12\pi and \tfrac12\pi,

y=ln{\tan}l(

\varphi2
+
\pi4r).

Hyperbolic forms

Let

\begin{align} \psi&=ln(\sec\theta+\tan\theta),\\[4pt] e\psi&=\sec\theta+\tan\theta,\\[4pt] \sinh\psi&=

e\psi-e-\psi
2

=\tan\theta,\\[4pt] \cosh\psi&=\sqrt{1+\sinh2\psi}=|\sec\theta|,\\[4pt] \tanh\psi&=\sin\theta. \end{align}

Therefore,

\begin{align} \int\sec\thetad\theta&=\operatorname{artanh}\left(\sin\theta\right)+C\\[-2mu] &=sgn(\cos\theta)\operatorname{arsinh}\left(\tan\theta\right)+C\\[7mu]&=sgn(\sin\theta)\operatorname{arcosh}{\left|\sec\theta\right|}+C. \end{align}

History

The integral of the secant function was one of the "outstanding open problems of the mid-seventeenth century", solved in 1668 by James Gregory. He applied his result to a problem concerning nautical tables. In 1599, Edward Wright evaluated the integral by numerical methods – what today we would call Riemann sums. He wanted the solution for the purposes of cartography – specifically for constructing an accurate Mercator projection. In the 1640s, Henry Bond, a teacher of navigation, surveying, and other mathematical topics, compared Wright's numerically computed table of values of the integral of the secant with a table of logarithms of the tangent function, and consequently conjectured that

\varphi
\int
0

\sec\thetad\theta=ln\tan\left(

\varphi
2

+

\pi
4

\right).

This conjecture became widely known, and in 1665, Isaac Newton was aware of it.

Evaluations

By a standard substitution (Gregory's approach)

A standard method of evaluating the secant integral presented in various references involves multiplying the numerator and denominator by and then using the substitution . This substitution can be obtained from the derivatives of secant and tangent added together, which have secant as a common factor.

Starting with

d{d\theta}\sec
\theta

=\sec\theta\tan\thetaand

d{d\theta}\tan
\theta

=\sec2\theta,

adding them gives

\begin{align} d{d\theta}(\sec\theta
+

\tan\theta)&=\sec\theta\tan\theta+\sec2\theta\\ &=\sec\theta(\tan\theta+\sec\theta). \end{align}

The derivative of the sum is thus equal to the sum multiplied by . This enables multiplying by in the numerator and denominator and performing the following substitutions:

\begin{align} u&=\sec\theta+\tan\theta\\ du&=\left(\sec\theta\tan\theta+\sec2\theta\right)d\theta. \end{align}

The integral is evaluated as follows:

\begin{align} \int\sec\thetad\theta&=\int

\sec\theta(\sec\theta+\tan\theta)
\sec\theta+\tan\theta

d\theta\\[6pt] &=\int

\sec2\theta+\sec\theta\tan\theta
\sec\theta+\tan\theta

d\theta&u&=\sec\theta+\tan\theta\\[6pt] &=\int

1
u

du&du&=\left(\sec\theta\tan\theta+\sec2\theta\right)d\theta\\[6pt] &=ln|u|+C\\[4pt] &=ln|\sec\theta+\tan\theta|+C, \end{align}

as claimed. This was the formula discovered by James Gregory.

By partial fractions and a substitution (Barrow's approach)

Although Gregory proved the conjecture in 1668 in his Exercitationes Geometricae, the proof was presented in a form that renders it nearly impossible for modern readers to comprehend; Isaac Barrow, in his Lectiones Geometricae of 1670, gave the first "intelligible" proof, though even that was "couched in the geometric idiom of the day." Barrow's proof of the result was the earliest use of partial fractions in integration. Adapted to modern notation, Barrow's proof began as follows:

\int\sec\thetad\theta =\int

1
\cos\theta

d\theta =\int

\cos\theta
\cos2\theta

d\theta =\int

\cos\theta
1-\sin2\theta

d\theta

Substituting,, reduces the integral to

\begin{align} \int

1
1-u2

du&=\int

1
(1+u)(1-u)

du\\[6pt] &=\int

12
\left(1
1+u

+

1
1-u

\right)du&&partialfractiondecomposition\\[6pt] &=

12
l(

ln\left|1+u\right|-ln\left|1-u\right|r)+C\\[6pt] &=

12
ln\left|1+u
1-u

\right|+C \end{align}

Therefore,

\int\sec\thetad\theta =

1
2

ln

1+\sin\theta
1-\sin\theta

+C,

as expected. Taking the absolute value is not necessary because

1+\sin\theta

and

1-\sin\theta

are always non-negative for real values of

\theta.

By the tangent half-angle substitution

Standard

Under the tangent half-angle substitution t = \tan\tfrac12\theta,

\begin{align} &\sin\theta=

2t
1+t2

, \cos\theta=

1-t2
1+t2

, d\theta=

2
1+t2

dt, \\[10mu] &\tan\theta=

\sin\theta
\cos\theta

=

2t
1-t2

, \sec\theta=

1{\cos\theta}
=
1+t2
1-t2

, \\[10mu] &\sec\theta+\tan\theta=

1+2t+t2
1-t2

=

1+t
1-t

. \end{align}

Therefore the integral of the secant function is

\begin{align} \int\sec\thetad\theta &=\int\left(

1+t2
1-t2

\right)\left(

2
1+t2

\right)dt&&t=\tan

\theta
2

\\[6pt] &=\int

2
(1-t)(1+t)

dt\\[6pt] &=\int\left(

1
1+t

+

1
1-t

\right)dt&&partialfractiondecomposition\\[6pt] &=ln|1+t|-ln|1-t|+C\\[6pt] &=ln\left|

1+t
1-t

\right|+C\\[6pt] &=ln|\sec\theta+\tan\theta|+C, \end{align}

as before.

Non-standard

The integral can also be derived by using a somewhat non-standard version of the tangent half-angle substitution, which is simpler in the case of this particular integral, published in 2013, is as follows:

\begin{align} x&=\tan\left(

\pi
4

+

\theta
2

\right)\\[10pt]

2x
1+x2

&=

2\tan\left(
\pi
4
+
\theta
2
\right)
2
\sec\left(
\pi
4
+
\theta
2
\right)

=2\sin\left(

\pi
4

+

\theta
2

\right)\cos\left(

\pi
4

+

\theta
2

\right)\\[6pt] &=\sin\left(

\pi
2

+\theta\right)=\cos\theta&&by\\[10pt] dx&=

12
\sec

2\left(

\pi+
4
\theta\right)d\theta=
2
12
\left(1+x

2\right)d\theta\\[10pt] d\theta&=

2
1+x2

dx. \end{align}

Substituting:

\begin{align} \int\sec\thetad\theta=\int

1
\cos\theta

d\theta&=\int

1+x2
2x

2
1+x2

dx\\[6pt] &=\int

1
x

dx\\[6pt] &=ln|x|+C\\[6pt] &=ln\left|\tan\left(

\pi
4

+

\theta
2

\right)\right|+C. \end{align}

By two successive substitutions

The integral can also be solved by manipulating the integrand and substituting twice. Using the definition and the identity, the integral can be rewritten as

\int\sec\thetad\theta=\int

1
\cos\theta

d\theta=\int

\cos\theta
\cos2\theta

d\theta=\int

\cos\theta
1-\sin2\theta

d\theta.

Substituting, reduces the integral to

\int

1
1-u2

du.

The reduced integral can be evaluated by substituting,, and then using the identity .

\int

\operatorname{sech
2

t}{1-\tanh2t}dt=\int

\operatorname{sech
2

t}{\operatorname{sech}2t}dt=\intdt.

The integral is now reduced to a simple integral, and back-substituting gives

\begin{align} \intdt&=t+C\\ &=\operatorname{artanh}u+C\\[4pt] &=\operatorname{artanh}(\sin\theta)+C, \end{align}

which is one of the hyperbolic forms of the integral.

A similar strategy can be used to integrate the cosecant, hyperbolic secant, and hyperbolic cosecant functions.

Other hyperbolic forms

It is also possible to find the other two hyperbolic forms directly, by again multiplying and dividing by a convenient term:

\int\sec\thetad\theta=\int

\sec2\theta
\sec\theta

d\theta=\int

\sec2\theta
\pm\sqrt{1+\tan2\theta
} \,d\theta,

where

\pm

stands for

sgn(\cos\theta)

because

\sqrt{1+\tan2\theta}=|\sec\theta|.

Substituting,, reduces to a standard integral:

\begin{align} \int

1
\pm\sqrt{1+u2
} \,du&=\pm\operatorname u+C \\&=\sgn(\cos \theta)\operatorname \left(\tan \theta\right)+C,\end

where is the sign function.

Likewise:

\int\sec\thetad\theta=\int

\sec\theta\tan\theta
\tan\theta

d\theta=\int

\sec\theta\tan\theta
\pm\sqrt{\sec2\theta-1
} \,d\theta.

Substituting,, reduces to a standard integral:

\begin{align} \int

1
\pm\sqrt{u2-1
} \,du &= \pm\operatorname u+C \\&=\sgn(\sin \theta) \operatorname \left| \sec \theta\right|+C.\end

Using complex exponential form

Under the substitution

z=ei\theta,

\begin{align} &\theta=-ilnz, d\theta=

-i
z

dz, \cos\theta=

z+z-1
2, \sin

\theta=

z-z-1
2i

,\\[5mu] &\sec\theta=

2{z
+

z-1

},\quad\tan \theta = -i\frac,\quad \\[5mu]&\sec \theta + \tan \theta = -i\frac= -i\frac= -i\frac\end

So the integral can be solved as:

\begin{align} \int\sec\thetad\theta &=\int

2{z
+

z-1

}\, \fracz dz && z = e^ \\[5mu]&= \int \frac dz \\&= \int \frac - \frac \,dz && \text \\[5mu]&= \ln(z+i)-\ln(z-i) + C \\[5mu]&= \ln\frac + C \\[5mu]&= \ln\bigl(i(\sec \theta + \tan \theta)\bigr) + C \\[5mu]&= \ln(\sec \theta + \tan \theta) + \ln i + C\end

Because the constant of integration can be anything, the additional constant term can be absorbed into it. Finally, if theta is real-valued, we can indicate this with absolute value brackets in order to get the equation into its most familiar form:

\int\sec\thetad\theta=ln\left|\tan\theta+\sec\theta\right|+C

Gudermannian and Lambertian

The integral of the hyperbolic secant function defines the Gudermannian function:

\psi
\int
0

\operatorname{sech}udu =\operatorname{gd}\psi.

The integral of the secant function defines the Lambertian function, which is the inverse of the Gudermannian function:

\varphi
\int
0

\sectdt =\operatorname{lam}\varphi =\operatorname{gd}-1\varphi.

These functions are encountered in the theory of map projections: the Mercator projection of a point on the sphere with longitude and latitude may be written as:

(x,y)=l(λ,\operatorname{lam}\varphir).

See also

References