Calculus · Chapter 5 · Integrals

Calculus · Chapter 5

Integrals

Where differential calculus grew from the tangent and velocity problems, integral calculus grows from the area and distance problems. Both lead to the same kind of limit — and the Fundamental Theorem of Calculus reveals that integration and differentiation are inverse operations.

This chapter develops the definite integral from approximating sums, defines it precisely, proves the two parts of the Fundamental Theorem, and finishes with two practical tools for evaluating integrals: the Net Change Theorem and the Substitution Rule.

This chapter is the conceptual backbone for everything in mechanical engineering that involves accumulation — work done by a force, fluid pressure on a surface, heat transfer, center of mass. Don't rush past 5.1. If you can explain why a Riemann sum converges to an area, the integral notation in later courses will feel obvious instead of memorized.

5.1Areas and Distances


Two seemingly unrelated questions — how much area lies under a curve, and how far a moving object travels — turn out to require the same special kind of limit. That shared limit is the seed of the integral.

The Area Problem

For a rectangle, triangle, or any polygon, area is easy: multiply, halve, or cut into triangles and add. A region with a curved boundary has no such formula. The strategy is the one used for tangents: approximate, then take a limit.

The Area Problem

Find the area of the region S bounded above by the graph of a continuous function \(y=f(x)\ge 0\), below by the \(x\)-axis, and on the sides by the vertical lines \(x=a\) and \(x=b\). The challenge is to turn our intuitive sense of "area" into an exact definition.

0 a b y = f(x) S x
Figure 5.1.1 — The region S under a continuous curve between \(x=a\) and \(x=b\). (Original illustration.)

Approximating with Rectangles

Slice S into thin vertical strips and replace each strip with a rectangle. Using the right endpoint of each subinterval for the height gives an overestimate \(R_n\); using the left endpoint gives an underestimate \(L_n\). The true area is trapped between them, and the gap shrinks as the number of rectangles \(n\) grows.

EXAMPLE 1 Estimating the area under \(y=x^2\)
Estimate the area under the parabola \(y=x^2\) from \(0\) to \(1\) using rectangles.
Solution
With four right-endpoint rectangles of width \(\tfrac14\), the heights are \((\tfrac14)^2,(\tfrac12)^2,(\tfrac34)^2,1^2\), giving \(R_4=\tfrac{15}{32}=0.46875\) — an overestimate.
The matching left-endpoint sum is \(L_4=\tfrac{7}{32}=0.21875\) — an underestimate. So \(0.21875 < A < 0.46875\).
Refining to eight strips narrows it to \(0.2734375 < A < 0.3984375\). With \(1000\) strips the bounds close to \(0.3328 < A < 0.3338\), suggesting \(A\approx \tfrac13\).
Right endpoints — R₄ Left endpoints — L₄
Figure 5.1.2 — Right-endpoint rectangles overshoot the curve; left-endpoint rectangles undershoot it. The true area lies between the two sums. (Original illustration.)
EXAMPLE 2 The limit of the right-endpoint sums
Show that for \(y=x^2\) on \([0,1]\), the right-endpoint sums \(R_n\) approach \(\tfrac13\).
Solution
Each of the \(n\) rectangles has width \(1/n\) and height \((i/n)^2\), so \(R_n=\dfrac{1}{n^3}\bigl(1^2+2^2+\cdots+n^2\bigr)\).
Apply the sum-of-squares formula \(\displaystyle\sum_{i=1}^{n}i^2=\frac{n(n+1)(2n+1)}{6}\): \[ R_n=\frac{(n+1)(2n+1)}{6n^2}=\frac16\Bigl(1+\frac1n\Bigr)\Bigl(2+\frac1n\Bigr). \]
Taking \(n\to\infty\): \(\displaystyle\lim_{n\to\infty}R_n=\frac16\cdot 1\cdot 2=\frac13.\) The left sums converge to the same value, confirming \(A=\tfrac13\).

Defining the Area

For a general region, divide \([a,b]\) into \(n\) subintervals each of width \(\Delta x=(b-a)/n\). The right endpoints are \(x_i=a+i\,\Delta x\). Summing rectangle areas and letting \(n\to\infty\) gives the definition.

DEFINITION
Area under a curve

The area \(A\) of the region \(S\) under the graph of a continuous function \(f\) is the limit of the sums of approximating rectangles:

\[ A=\lim_{n\to\infty}R_n=\lim_{n\to\infty}\bigl[f(x_1)\,\Delta x+f(x_2)\,\Delta x+\cdots+f(x_n)\,\Delta x\bigr]. \]

This limit always exists for continuous \(f\), and gives the same value whether heights are taken at left endpoints, right endpoints, or any sample points \(x_i^{*}\) in each subinterval.

Width of each subinterval and right endpoints
\[ \Delta x=\frac{b-a}{n},\qquad x_i=a+i\,\Delta x. \]

Sigma Notation

Sums with many terms are written compactly with the Greek capital sigma. The index below tells you where to start, the value above where to end.

Area expressed with sigma notation
\[ A=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i)\,\Delta x=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i^{*})\,\Delta x. \]

Memorize the three power-sum formulas (for \(\sum i\), \(\sum i^2\), \(\sum i^3\)) now. They're the only algebra that makes the "limit of a Riemann sum" computable by hand, and they show up again in moment-of-inertia derivations.

The Distance Problem

If velocity is constant, distance is simply velocity times time. When velocity varies, split the trip into short intervals, assume velocity is roughly constant on each, and add up the pieces — exactly the rectangle idea again.

EXAMPLE 3 Distance from speedometer readings
A car's velocity is recorded every 5 seconds over 30 seconds. Estimate the distance traveled.
Time (s)051015202530
v (ft/s)25313543474641
Solution
Using the velocity at the start of each interval (left endpoints): \((25+31+35+43+47+46)\times 5 = 1135\) ft.
Using the velocity at the end of each interval (right endpoints): \((31+35+43+47+46+41)\times 5 = 1215\) ft.
More frequent readings tighten the estimate. The exact distance is the limiting sum.
Exact distance as a limit of sums
\[ d=\lim_{n\to\infty}\sum_{i=1}^{n}f(t_i)\,\Delta t. \]
The common thread: The distance traveled equals the area under the velocity–time graph. The same limit of sums computes both — and later, work, fluid force, and cardiac output too.

5.2The Definite Integral


The limit of sums that appeared in both the area and distance problems shows up everywhere — even when \(f\) is not positive. It deserves its own name and notation: the definite integral.

Definition of the Definite Integral

DEFINITION
The definite integral of \(f\) from \(a\) to \(b\)

For \(f\) defined on \([a,b]\), divide the interval into \(n\) subintervals of equal width \(\Delta x=(b-a)/n\) with sample points \(x_i^{*}\). The definite integral is

\[ \int_a^b f(x)\,dx=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i^{*})\,\Delta x, \]

provided the limit exists, in which case \(f\) is integrable on \([a,b]\).

Reading the notation

The sign \(\int\) — an elongated S chosen by Leibniz — recalls "sum." Here \(f(x)\) is the integrand, \(a\) and \(b\) are the limits of integration (lower and upper), and \(dx\) marks \(x\) as the variable. The whole symbol is one object; \(dx\) has no independent meaning. The integral is a number and does not depend on the variable name: \(\int_a^b f(x)\,dx=\int_a^b f(t)\,dt\).

Riemann Sums and Net Area

The approximating sum \(\sum f(x_i^{*})\,\Delta x\) is a Riemann sum, named for Bernhard Riemann (1826–1866). When \(f\) is positive it is a sum of rectangle areas. When \(f\) takes both signs, areas below the axis count as negative.

The integral as net area
\[ \int_a^b f(x)\,dx=A_1-A_2, \]

where \(A_1\) is the area above the \(x\)-axis and below the curve, and \(A_2\) is the area below the axis and above the curve.

+ − A₁ A₂ a b
Figure 5.2.1 — When \(f\) changes sign, the definite integral is the net area: area above the axis (\(A_1\)) minus area below it (\(A_2\)). (Original illustration.)
THEOREM
Integrability of continuous functions

If \(f\) is continuous on \([a,b]\), or has only finitely many jump discontinuities there, then \(f\) is integrable on \([a,b]\) — the definite integral exists.

THEOREM
Integral via right endpoints

If \(f\) is integrable on \([a,b]\), the integral may be computed with right endpoints:

\[ \int_a^b f(x)\,dx=\lim_{n\to\infty}\sum_{i=1}^{n}f(x_i)\,\Delta x,\quad \Delta x=\frac{b-a}{n},\ x_i=a+i\,\Delta x. \]
EXAMPLE 4 Recognizing a limit as an integral
Express \(\displaystyle\lim_{n\to\infty}\sum_{i=1}^{n}\bigl(x_i^{3}+x_i\sin x_i\bigr)\,\Delta x\) as an integral on \([0,\pi]\).
Solution
Match the form against the theorem: here \(f(x)=x^3+x\sin x\), with \(a=0\) and \(b=\pi\).
Therefore \(\displaystyle\lim_{n\to\infty}\sum_{i=1}^{n}\bigl(x_i^{3}+x_i\sin x_i\bigr)\,\Delta x=\int_0^{\pi}\bigl(x^3+x\sin x\bigr)\,dx.\)
In general, replace \(\lim\sum\) by \(\int\), \(x_i^{*}\) by \(x\), and \(\Delta x\) by \(dx\).
EXAMPLE 5 Evaluating from the definition
Evaluate \(\displaystyle\int_0^3 (x^3-6x)\,dx\) directly from the definition.
Solution
With \(\Delta x=3/n\) and \(x_i=3i/n\), the right Riemann sum is \(\displaystyle\frac3n\sum_{i=1}^{n}\Bigl[\frac{27}{n^3}i^3-\frac{18}{n}i\Bigr]\).
Using \(\sum i^3=\bigl[\tfrac{n(n+1)}{2}\bigr]^2\) and \(\sum i=\tfrac{n(n+1)}{2}\), the sum simplifies to \(\dfrac{81}{4}\Bigl(1+\tfrac1n\Bigr)^2-27\Bigl(1+\tfrac1n\Bigr)\).
Taking \(n\to\infty\): \(\displaystyle\int_0^3 (x^3-6x)\,dx=\frac{81}{4}-27=-\frac{27}{4}=-6.75.\) Negative, because more area lies below the axis than above.

The Midpoint Rule

Right endpoints are convenient for limits, but for numerical approximation the midpoint of each subinterval usually gives a much better estimate.

The Midpoint Rule
\[ \int_a^b f(x)\,dx\approx \Delta x\bigl[f(\bar x_1)+f(\bar x_2)+\cdots+f(\bar x_n)\bigr],\quad \bar x_i=\tfrac12(x_{i-1}+x_i). \]
EXAMPLE 6 Midpoint Rule with \(n=5\)
Approximate \(\displaystyle\int_1^2 \frac{1}{x}\,dx\) with five subintervals.
Solution
Width \(\Delta x=\tfrac15\); midpoints are \(1.1,1.3,1.5,1.7,1.9\).
\[ \int_1^2\frac1x\,dx\approx \frac15\Bigl(\frac{1}{1.1}+\frac{1}{1.3}+\frac{1}{1.5}+\frac{1}{1.7}+\frac{1}{1.9}\Bigr)\approx 0.691908. \]

Properties of the Definite Integral

Reversing the limits flips the sign, and a zero-width interval gives zero:

Orientation
\[ \int_b^a f(x)\,dx=-\int_a^b f(x)\,dx,\qquad \int_a^a f(x)\,dx=0. \]
Linearity and additivity (constants \(c\); functions \(f,g\))
\[ \int_a^b c\,dx=c(b-a) \] \[ \int_a^b\!\bigl[f(x)\pm g(x)\bigr]dx=\int_a^b\! f(x)\,dx\pm\int_a^b\! g(x)\,dx \] \[ \int_a^b c\,f(x)\,dx=c\int_a^b f(x)\,dx \] \[ \int_a^c f(x)\,dx+\int_c^b f(x)\,dx=\int_a^b f(x)\,dx \]
PROPERTY
Comparison properties (for \(a\le b\))

If \(f(x)\ge 0\) on \([a,b]\), then \(\displaystyle\int_a^b f(x)\,dx\ge 0\).

If \(f(x)\ge g(x)\) on \([a,b]\), then \(\displaystyle\int_a^b f(x)\,dx\ge\int_a^b g(x)\,dx\).

If \(m\le f(x)\le M\) on \([a,b]\), then \(\displaystyle m(b-a)\le\int_a^b f(x)\,dx\le M(b-a)\).

EXAMPLE 7 Estimating an integral with Property 8
Estimate \(\displaystyle\int_0^1 e^{-x^2}\,dx\) without evaluating it.
Solution
On \([0,1]\), \(f(x)=e^{-x^2}\) is decreasing, so its maximum is \(M=f(0)=1\) and minimum is \(m=f(1)=e^{-1}\).
By the bounding property: \(\displaystyle e^{-1}\le\int_0^1 e^{-x^2}\,dx\le 1\), i.e. roughly \(0.367\le\int_0^1 e^{-x^2}\,dx\le 1\).

The bounding property (Property 8) is your fastest sanity check on any numerical answer. Before trusting a computed integral, ask: does it sit between \(m(b-a)\) and \(M(b-a)\)? If not, you have a sign or setup error.

5.3The Fundamental Theorem of Calculus


Differential calculus came from the tangent problem; integral calculus from the area problem. Isaac Barrow saw they were connected; Newton and Leibniz turned that connection into a method. The Fundamental Theorem makes the link precise: differentiation and integration undo each other.

FTC, Part 1 — Integrals Define Antiderivatives

Define a new function as an integral with a variable upper limit, \(g(x)=\int_a^x f(t)\,dt\) — think of it as the "area so far." Its derivative recovers the original integrand.

THEOREM · FTC PART 1
The derivative of an accumulation function

If \(f\) is continuous on \([a,b]\), then the function

\[ g(x)=\int_a^x f(t)\,dt,\qquad a\le x\le b, \]

is continuous on \([a,b]\), differentiable on \((a,b)\), and

\[ g'(x)=f(x). \]

In Leibniz notation: \(\displaystyle \frac{d}{dx}\int_a^x f(t)\,dt=f(x).\) Differentiating an integral with respect to its upper limit returns the integrand evaluated there.

a x g(x) y = f(t)
Figure 5.3.1 — The accumulation function \(g(x)\) measures the signed area under \(f\) from \(a\) to the moving boundary \(x\). (Original illustration.)
EXAMPLE 8 Differentiating an integral
Find \(g'(x)\) for \(g(x)=\displaystyle\int_0^x \sqrt{1+t^2}\,dt\), and find \(\dfrac{d}{dx}\displaystyle\int_1^{x^4}\sec t\,dt\).
Solution
By FTC Part 1, \(g'(x)=\sqrt{1+x^2}\) — just substitute the upper limit into the integrand.
For a variable expression in the limit, combine FTC1 with the Chain Rule. Let \(u=x^4\): \[ \frac{d}{dx}\int_1^{x^4}\sec t\,dt=\sec(u)\cdot\frac{du}{dx}=\sec(x^4)\cdot 4x^3. \]

FTC, Part 2 — Evaluating with Antiderivatives

The second part is the workhorse: instead of computing a limit of Riemann sums, find any antiderivative and subtract its values at the endpoints.

THEOREM · FTC PART 2
Evaluation via an antiderivative

If \(f\) is continuous on \([a,b]\), then

\[ \int_a^b f(x)\,dx=F(b)-F(a), \]

where \(F\) is any antiderivative of \(f\) (a function with \(F'=f\)). Any single antiderivative will do — the constant cancels in the subtraction.

EXAMPLE 9 FTC2 in action
Evaluate \(\displaystyle\int_1^3 e^x\,dx\) and find the area under \(y=x^2\) from \(0\) to \(1\).
Solution
An antiderivative of \(e^x\) is \(e^x\), so \(\displaystyle\int_1^3 e^x\,dx=e^3-e^1=e^3-e\).
An antiderivative of \(x^2\) is \(\tfrac13 x^3\), so the area is \(\displaystyle\int_0^1 x^2\,dx=\Bigl[\tfrac13 x^3\Bigr]_0^1=\tfrac13\) — matching Example 2, in one line.
EXAMPLE 10 When FTC2 does not apply
What is wrong with writing \(\displaystyle\int_{-1}^{3}\frac{1}{x^2}\,dx=\Bigl[-\tfrac1x\Bigr]_{-1}^{3}=-\tfrac43\)?
Solution
The integrand \(1/x^2\) is never negative, so any genuine integral of it must be \(\ge 0\) — a negative answer is impossible.
FTC2 requires a continuous integrand. But \(1/x^2\) has an infinite discontinuity at \(x=0\), which lies inside \([-1,3]\). The theorem does not apply, and in fact \(\int_{-1}^3 \tfrac{1}{x^2}\,dx\) does not exist.

Differentiation and Integration as Inverse Processes

THEOREM · THE FUNDAMENTAL THEOREM
Both parts together

Suppose \(f\) is continuous on \([a,b]\).

1. If \(g(x)=\displaystyle\int_a^x f(t)\,dt\), then \(g'(x)=f(x)\).

2. \(\displaystyle\int_a^b f(x)\,dx=F(b)-F(a)\), where \(F\) is any antiderivative of \(f\).

The two operations cancel. Integrate \(f\) then differentiate, and you return to \(f\): \(\frac{d}{dx}\int_a^x f(t)\,dt=f(x)\). Differentiate \(F\) then integrate, and you return to \(F\) (up to its endpoint values): \(\int_a^b F'(x)\,dx=F(b)-F(a)\).

This is the single most important result in the course. Before FTC, finding an area meant a brutal limit of sums (Roberval needed real ingenuity for \(\int_0^{\pi/2}\cos x\,dx\) in 1635). After FTC, it is one subtraction. When you reach for an antiderivative in dynamics or thermodynamics, you are using Part 2 — make sure the integrand is actually continuous on the interval first.

5.4Indefinite Integrals and the Net Change Theorem


Because FTC2 depends on antiderivatives, we need a clean notation for them and a ready supply of formulas. We also reframe FTC2 so it speaks directly to science and engineering: the integral of a rate of change is the net change.

Indefinite Integrals

Indefinite integral

The notation \(\int f(x)\,dx\) denotes an antiderivative of \(f\): \(\int f(x)\,dx=F(x)\) means \(F'(x)=f(x)\). It represents an entire family of functions differing by a constant \(C\). Distinguish it sharply from a definite integral: \(\int_a^b f(x)\,dx\) is a number, while \(\int f(x)\,dx\) is a function.

Connection between the two integrals
\[ \int_a^b f(x)\,dx=\Bigl[\int f(x)\,dx\Bigr]_a^b. \]

Table of Indefinite Integrals

Each formula is valid on an interval where the integrand is defined, and can be checked by differentiating the right side.

Algebraic and exponential forms
\[ \int c\,f(x)\,dx=c\int f(x)\,dx,\qquad \int\bigl[f(x)+g(x)\bigr]dx=\int f\,dx+\int g\,dx \] \[ \int k\,dx=kx+C,\qquad \int x^{n}\,dx=\frac{x^{n+1}}{n+1}+C\ \ (n\neq -1) \] \[ \int \frac1x\,dx=\ln|x|+C,\qquad \int e^{x}\,dx=e^{x}+C,\qquad \int a^{x}\,dx=\frac{a^{x}}{\ln a}+C \]
Trigonometric and inverse forms
\[ \int \sin x\,dx=-\cos x+C,\qquad \int \cos x\,dx=\sin x+C \] \[ \int \sec^2 x\,dx=\tan x+C,\qquad \int \csc^2 x\,dx=-\cot x+C \] \[ \int \sec x\tan x\,dx=\sec x+C,\qquad \int \csc x\cot x\,dx=-\csc x+C \] \[ \int \frac{1}{x^2+1}\,dx=\tan^{-1}x+C,\qquad \int \frac{1}{\sqrt{1-x^2}}\,dx=\sin^{-1}x+C \]
EXAMPLE 11 A general indefinite integral
Find \(\displaystyle\int\bigl(10x^4-2\sec^2 x\bigr)\,dx\).
Solution
Apply linearity, then the power and trig rules: \[ \int\bigl(10x^4-2\sec^2 x\bigr)\,dx=10\cdot\frac{x^5}{5}-2\tan x+C=2x^5-2\tan x+C. \]
Check by differentiating: \(\frac{d}{dx}(2x^5-2\tan x)=10x^4-2\sec^2 x.\) ✓
EXAMPLE 12 Evaluating a definite integral with FTC2
Evaluate \(\displaystyle\int_0^2\Bigl(2x^3-6x+\frac{3}{x^2+1}\Bigr)\,dx\).
Solution
Antidifferentiate term by term: \(\tfrac12 x^4-3x^2+3\tan^{-1}x\).
Evaluate at the endpoints: \(\bigl[\tfrac12(2^4)-3(2^2)+3\tan^{-1}2\bigr]-0=8-12+3\tan^{-1}2=-4+3\tan^{-1}2\approx -0.679.\)

The Net Change Theorem

Since \(F'=f\), FTC2 can be read as a statement about rates: integrating a rate of change over an interval gives the total (net) change in the quantity.

THEOREM · NET CHANGE
The integral of a rate of change is the net change
\[ \int_a^b F'(x)\,dx=F(b)-F(a). \]

If \(F'\) varies in sign, \(F(b)-F(a)\) is the net change — increases and decreases counted together.

Reading net change in context

The same theorem describes many engineering quantities: if \(V'(t)\) is flow rate, \(\int_{t_1}^{t_2}V'(t)\,dt\) is the change in volume; if \(\rho(x)=m'(x)\) is linear density, \(\int_a^b\rho(x)\,dx\) is the mass of a rod segment; if \(C'(x)\) is marginal cost, \(\int_{x_1}^{x_2}C'(x)\,dx\) is the added cost of producing more units.

Displacement vs. distance. For a particle with velocity \(v(t)\): displacement is \(\int_{t_1}^{t_2}v(t)\,dt\) (net, signed), while total distance traveled is \(\int_{t_1}^{t_2}|v(t)|\,dt\) (always positive). The distinction is the whole point of the Net Change Theorem.
EXAMPLE 13 Displacement and distance
A particle has velocity \(v(t)=t^2-t-6\) m/s. Over \(1\le t\le 4\), find (a) displacement and (b) distance traveled.
Solution
(a) Displacement: \(\displaystyle\int_1^4 (t^2-t-6)\,dt=\Bigl[\tfrac{t^3}{3}-\tfrac{t^2}{2}-6t\Bigr]_1^4=-\tfrac92\) — the particle ends 4.5 m to the left of its start.
(b) Factor \(v(t)=(t-3)(t+2)\): negative on \([1,3]\), positive on \([3,4]\). Split the integral of \(|v|\): \[ \int_1^4|v(t)|\,dt=\int_1^3\!\!-v\,dt+\int_3^4\! v\,dt=\frac{61}{6}\approx 10.17\text{ m}. \]

The displacement-versus-distance trap catches students every term. Whenever a problem says "how far did it travel," reach for \(\int|v|\,dt\) and find the sign changes first. If it says "where does it end up," plain \(\int v\,dt\) is enough. Units follow the same rule as the integrand: \(\int_a^b f\,dx\) carries the units of \(f\) times the units of \(x\) (e.g., megawatts × hours = megawatt-hours).

5.5The Substitution Rule


The antidifferentiation table covers basic forms, but not integrals like \(\int 2x\sqrt{1+x^2}\,dx\). The Substitution Rule — the integral counterpart of the Chain Rule — handles these by introducing a new variable.

The Substitution Rule

THEOREM · SUBSTITUTION RULE
Change of variable for indefinite integrals

If \(u=g(x)\) is differentiable with range an interval \(I\), and \(f\) is continuous on \(I\), then

\[ \int f\bigl(g(x)\bigr)g'(x)\,dx=\int f(u)\,du. \]

Since \(du=g'(x)\,dx\), the rule says you may treat \(dx\) and \(du\) as differentials and operate on them after the integral sign.

Choosing the substitution

Pick \(u\) to be an inner function whose derivative also appears in the integrand (up to a constant factor). If the first guess doesn't simplify things, try another — finding the right \(u\) is part skill, part experiment.

EXAMPLE 14 A first substitution
Find \(\displaystyle\int x^3\cos(x^4+2)\,dx\).
Solution
Let \(u=x^4+2\); then \(du=4x^3\,dx\), so \(x^3\,dx=\tfrac14\,du\).
\[ \int x^3\cos(x^4+2)\,dx=\tfrac14\int\cos u\,du=\tfrac14\sin u+C=\tfrac14\sin(x^4+2)+C. \]
Always return to the original variable \(x\) at the end.
EXAMPLE 15 Tangent via substitution
Calculate \(\displaystyle\int\tan x\,dx\).
Solution
Write \(\tan x=\dfrac{\sin x}{\cos x}\) and let \(u=\cos x\), so \(du=-\sin x\,dx\).
\[ \int\tan x\,dx=-\int\frac{du}{u}=-\ln|u|+C=-\ln|\cos x|+C=\ln|\sec x|+C. \]

Substitution in Definite Integrals

For a definite integral, the cleaner method is to change the limits of integration along with the variable — then there is no need to convert back.

THEOREM · SUBSTITUTION (DEFINITE)
Change of variable with new limits

If \(g'\) is continuous on \([a,b]\) and \(f\) is continuous on the range of \(u=g(x)\), then

\[ \int_a^b f\bigl(g(x)\bigr)g'(x)\,dx=\int_{g(a)}^{g(b)}f(u)\,du. \]

Substitute the new variable everywhere — including the limits — and evaluate in \(u\) directly.

EXAMPLE 16 Definite integral by changing limits
Evaluate \(\displaystyle\int_0^4\sqrt{2x+1}\,dx\).
Solution
Let \(u=2x+1\), \(du=2\,dx\). New limits: \(x=0\Rightarrow u=1\) and \(x=4\Rightarrow u=9\).
\[ \int_0^4\sqrt{2x+1}\,dx=\frac12\int_1^9\sqrt{u}\,du=\frac12\cdot\frac23\Bigl[u^{3/2}\Bigr]_1^9=\frac13(27-1)=\frac{26}{3}. \]

Symmetry

When a function is even or odd, symmetry simplifies integrals over intervals centered at the origin.

THEOREM · SYMMETRY
Integrals of symmetric functions on \([-a,a]\)

If \(f\) is even \(\bigl(f(-x)=f(x)\bigr)\): \(\displaystyle\int_{-a}^{a}f(x)\,dx=2\int_0^{a}f(x)\,dx.\)

If \(f\) is odd \(\bigl(f(-x)=-f(x)\bigr)\): \(\displaystyle\int_{-a}^{a}f(x)\,dx=0.\)

−a a even — areas add −a a odd — areas cancel
Figure 5.5.1 — For an even function the two halves contribute equally; for an odd function they cancel, giving zero. (Original illustration.)
EXAMPLE 17 Using symmetry
Evaluate \(\displaystyle\int_{-2}^{2}(x^6+1)\,dx\) and \(\displaystyle\int_{-1}^{1}\frac{\tan x}{1+x^2+x^4}\,dx\).
Solution
\(x^6+1\) is even, so \(\displaystyle\int_{-2}^{2}(x^6+1)\,dx=2\int_0^2(x^6+1)\,dx=2\Bigl[\tfrac17 x^7+x\Bigr]_0^2=\frac{284}{7}.\)
The second integrand is odd, so \(\displaystyle\int_{-1}^{1}\frac{\tan x}{1+x^2+x^4}\,dx=0\) — no antiderivative needed.

Always scan for symmetry before grinding through a substitution. Spotting an odd integrand on a symmetric interval turns a hard problem into "the answer is zero." This habit saves real time on exams and in Fourier-series work later.