The product in the integrand simplifies to below its upper endpoint. With the integration by substitution , the limits become and zero and . Therefore
Although the tangent function itself is undefined at the upper endpoint, the product has a zero limit there, so its continuous extension, or its improper integral, gives this same result.
To obtain directly from a Riemann sum, divide into equal pieces of width and use right endpoints . The sum is
The integrand is continuous, so the limit of these Riemann sums is its definite integral, namely , agreeing with the antiderivative calculation.
For , the first two derivatives are and . Since ,
The first three terms of the Taylor expansion, with , therefore give
For a check on accuracy, is positive and decreasing on . The Taylor remainder is consequently positive and less than . The approximation is a slight underestimate.
The finite form of Taylor's theorem with the first terms is
where lies strictly between and for . A sufficient hypothesis is that has continuous derivatives through order on the interval joining the endpoints and an th derivative in its interior. The displayed polynomial has degree at most ; its Taylor remainder uses the th derivative, not the st. At the remainder is zero. This is a finite Taylor polynomial identity and does not require an infinite Taylor series to converge.
The gradient is orthogonal to each regular level set and points towards increasing . Near either minimum, the linear approximation is , so arrows point away from the point. Near the maximum at the origin it is , so arrows point inwards. Near either saddle point it is : arrows point towards the vertical axis horizontally and away from the saddle vertically.
On the horizontal axis the gradient is . Its arrows point left on , right on , left on , and right on . On the vertical axis it is
Consequently its arrows point down on , up on , down on , and up on . These directions, and representative arrows near each stationary point, appear in the right-hand panel. The gradient itself is zero at all five stationary points.
The contour plot is symmetric under either or , because depends only on their squares. Denote the three critical heights by , and , where .
For , the level set consists of separate closed curves around the two minima. At the branches meet at the two saddle points. For , there is an inner closed curve surrounding the local maximum and an outer closed curve surrounding all five stationary points. At the inner curve shrinks to the origin; for only the outer closed curve remains. At each saddle point the critical level set crosses in the two directions determined by
The figure plots representative level sets, including the critical saddle height; its second panel adds the gradient directions requested below.
Figure 1.
Contour topology and gradient directions around two minima, a maximum and two saddles
. Details.
The Hessian matrix has entries
At each stationary point the mixed entry vanishes, so the signs of the diagonal entries directly classify the local quadratic change:
In particular the two local minima are also global minima: the squared term is nonnegative and , with equality in both bounds exactly at . The local maximum at the origin is not a global maximum, since grows without bound as . The opposite diagonal signs at the other two points establish their saddle point character.

There are unlisted articles, also show them or only show them.