MatheramaMatherama
← Definite Integration
Definite Integration·Section 5·24 min read

Integration via Substitution

In indefinite integration, substitution is our primary tool for simplifying composite functions by reversing the Chain Rule. When we move to definite integration, substitution becomes even cleaner: instead of converting the antiderivative back into the original variable xx, we transform the limits of integration directly into the new variable tt and evaluate the new integral in a single pass!

At the same time, changing the variable of a definite integral changes the domain over which we are integrating. To avoid subtle algebraic and geometric traps, we must understand why changing limits works, what conditions the substitution must satisfy (continuity and differentiability), and when we must split an interval before substituting.


1. The Substitution Theorem for Definite Integrals§

Type 1: Direct Substitution§

Suppose we want to evaluate an integral of the form:

∫abf(g(x)) g′(x) dx\int_a^b f\big(g(x)\big) \, g'(x) \, dx

Here, we see an inner function t=g(x)t = g(x) together with its differential dt=g′(x) dxdt = g'(x) \, dx. As xx moves from the lower limit x=ax = a to the upper limit x=bx = b, the new variable t=g(x)t = g(x) moves from t=g(a)t = g(a) to t=g(b)t = g(b).

[!IMPORTANT] Theorem (Integration by Substitution — Direct Form): Let g(x)g(x) have a continuous derivative g′(x)g'(x) on the closed interval [a,b][a, b], and let f(t)f(t) be continuous on the range of values taken by t=g(x)t = g(x) for x∈[a,b]x \in [a, b]. Then:

∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(t) dt\int_a^b f\big(g(x)\big) \, g'(x) \, dx = \int_{g(a)}^{g(b)} f(t) \, dt


Proof (Via the Chain Rule and Fundamental Theorem of Calculus)§

Why does replacing g(x)g(x) by tt, g′(x) dxg'(x)\,dx by dtdt, and the limits a,ba, b by g(a),g(b)g(a), g(b) give the exact same number?

Let F(t)F(t) be an antiderivative of the continuous function f(t)f(t), so that:

F′(t)=dFdt=f(t)F'(t) = \frac{dF}{dt} = f(t)

Right-Hand Side: Applying the First Fundamental Theorem of Calculus to the tt-integral from t=g(a)t = g(a) to t=g(b)t = g(b) gives:

∫g(a)g(b)f(t) dt=[F(t)]g(a)g(b)=F(g(b))−F(g(a))\int_{g(a)}^{g(b)} f(t) \, dt = \Big[ F(t) \Big]_{g(a)}^{g(b)} = F\big(g(b)\big) - F\big(g(a)\big)

Left-Hand Side: Now consider the composite function H(x)=F(g(x))H(x) = F\big(g(x)\big) on [a,b][a, b]. Because g(x)g(x) is differentiable on [a,b][a, b] and F(t)F(t) is differentiable on the range of gg, the Chain Rule tells us the derivative of H(x)H(x) with respect to xx:

H′(x)=ddx[F(g(x))]=F′(g(x))⋅g′(x)=f(g(x)) g′(x)H'(x) = \frac{d}{dx} \Big[ F\big(g(x)\big) \Big] = F'\big(g(x)\big) \cdot g'(x) = f\big(g(x)\big) \, g'(x)

Thus, H(x)=F(g(x))H(x) = F\big(g(x)\big) is a continuous antiderivative of f(g(x)) g′(x)f\big(g(x)\big) \, g'(x) on [a,b][a, b]! Applying the First Fundamental Theorem of Calculus from x=ax = a to x=bx = b gives:

∫abf(g(x)) g′(x) dx=[F(g(x))]ab=F(g(b))−F(g(a))\int_a^b f\big(g(x)\big) \, g'(x) \, dx = \Big[ F\big(g(x)\big) \Big]_a^b = F\big(g(b)\big) - F\big(g(a)\big)

Since both sides equal F(g(b))−F(g(a))F\big(g(b)\big) - F\big(g(a)\big), we conclude that:

∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(t) dt\int_a^b f\big(g(x)\big) \, g'(x) \, dx = \int_{g(a)}^{g(b)} f(t) \, dt

Type 2: Inverse Substitution§

Sometimes, instead of setting t=g(x)t = g(x), we substitute xx as a function of tt:

x=ϕ(t)  ⟹  dx=ϕ′(t) dtx = \phi(t) \implies dx = \phi'(t) \, dt

For example, to eliminate a2−x2\sqrt{a^2 - x^2}, we set x=asin⁡θx = a\sin\theta and dx=acos⁡θ dθdx = a\cos\theta \, d\theta.

Here, we must find a lower limit t=αt = \alpha and an upper limit t=βt = \beta such that ϕ(α)=a\phi(\alpha) = a and ϕ(β)=b\phi(\beta) = b:

∫abf(x) dx=∫αβf(ϕ(t)) ϕ′(t) dt\int_a^b f(x) \, dx = \int_\alpha^\beta f\big(\phi(t)\big) \, \phi'(t) \, dt

Does It Matter Which Interval of the New Variable We Choose?

Notice that for a periodic function like x=sin⁡θx = \sin\theta, there are infinitely many angles θ\theta that satisfy sin⁡α=a\sin\alpha = a and sin⁡β=b\sin\beta = b. For example, if xx goes from 00 to 11:

  • On the principal branch [0,π2]\left[0, \frac{\pi}{2}\right], sin⁡0=0\sin 0 = 0 and sin⁡(π2)=1\sin\left(\frac{\pi}{2}\right) = 1.
  • On the second-quadrant branch [π,π2]\left[\pi, \frac{\pi}{2}\right], sin⁡π=0\sin\pi = 0 and sin⁡(π2)=1\sin\left(\frac{\pi}{2}\right) = 1.
  • What if someone chooses α=0\alpha = 0 and β=5π2\beta = \frac{5\pi}{2} (which spans multiple branches), or α=0\alpha = 0 and β=π\beta = \pi?

Let us examine what happens:

When Choosing Any Single Continuous Branch (Provided You Respect Signs!): As long as x=ϕ(t)x = \phi(t) is continuous and differentiable on [α,β][\alpha, \beta] and maps ϕ(α)=a\phi(\alpha) = a, ϕ(β)=b\phi(\beta) = b without leaving the domain of f(x)f(x), the Chain Rule guarantees:

∫αβf(ϕ(t)) ϕ′(t) dt=F(ϕ(β))−F(ϕ(α))=F(b)−F(a)\int_\alpha^\beta f\big(\phi(t)\big) \, \phi'(t) \, dt = F\big(\phi(\beta)\big) - F\big(\phi(\alpha)\big) = F(b) - F(a)

However, if you choose a branch where cos⁡θ<0\cos\theta < 0 (such as the second quadrant), you must write 1−sin⁡2θ=∣cos⁡θ∣=−cos⁡θ\sqrt{1 - \sin^2\theta} = |\cos\theta| = -\cos\theta! The principal one-to-one branch θ∈[−π2,π2]\theta \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right] for x=asin⁡θx = a\sin\theta (or θ∈(−π2,π2)\theta \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) for x=atan⁡θx = a\tan\theta) is universally recommended because cos⁡θ≥0\cos\theta \ge 0 and sec⁡θ>0\sec\theta > 0 there, so ∣cos⁡θ∣=cos⁡θ|\cos\theta| = \cos\theta automatically!

Why Spanning Multiple Branches (Like [0,5π2]\left[0, \frac{5\pi}{2}\right]) Fails in Practice: If you pick α=0\alpha = 0 and β=5π2\beta = \frac{5\pi}{2}, then as θ\theta moves from 00 to 5π2\frac{5\pi}{2}, cos⁡θ\cos\theta changes sign twice! If you carelessly write 1−sin⁡2θ=cos⁡θ\sqrt{1 - \sin^2\theta} = \cos\theta across [0,5π2]\left[0, \frac{5\pi}{2}\right] without absolute value bars, you will get the wrong answer. Furthermore, for x=tan⁡θx = \tan\theta, spanning across θ=π2\theta = \frac{\pi}{2} crosses an infinite discontinuity where tan⁡θ\tan\theta is undefined!

Let us see both of these points clearly through two worked examples.


Inverse Substitution Example A: Choosing Another Branch vs. Spanning Multiple Branches

Evaluate:

∫011−x2 dx\int_0^1 \sqrt{1 - x^2} \, dx

using x=sin⁡θx = \sin\theta, and compare what happens for three different choices of [α,β][\alpha, \beta] where sin⁡α=0\sin\alpha = 0 and sin⁡β=1\sin\beta = 1:

Choice 1: The Principal One-to-One Branch θ∈[0,π2]\theta \in \left[0, \frac{\pi}{2}\right] (Recommended)

Here sin⁡0=0\sin 0 = 0 and sin⁡(π2)=1\sin\left(\frac{\pi}{2}\right) = 1. On [0,π2]\left[0, \frac{\pi}{2}\right], cos⁡θ≥0\cos\theta \ge 0, so:

1−x2=cos⁡2θ=∣cos⁡θ∣=cos⁡θ\sqrt{1 - x^2} = \sqrt{\cos^2\theta} = |\cos\theta| = \cos\theta

Since dx=cos⁡θ dθdx = \cos\theta \, d\theta, the integral is:

∫011−x2 dx=∫0π/2(cos⁡θ)(cos⁡θ dθ)=∫0π/21+cos⁡2θ2 dθ=[θ2+sin⁡2θ4]0π/2=π4\int_0^1 \sqrt{1 - x^2} \, dx = \int_0^{\pi/2} (\cos\theta)(\cos\theta \, d\theta) = \int_0^{\pi/2} \frac{1 + \cos 2\theta}{2} \, d\theta = \left[ \frac{\theta}{2} + \frac{\sin 2\theta}{4} \right]_0^{\pi/2} = \frac{\pi}{4}

Choice 2: A Second-Quadrant Branch θ∈[π,π2]\theta \in \left[\pi, \frac{\pi}{2}\right] (Different Branch, Same Answer!)

What if we choose α=π\alpha = \pi (since sin⁡π=0\sin\pi = 0) and β=π2\beta = \frac{\pi}{2} (since sin⁡π2=1\sin\frac{\pi}{2} = 1)? On the second quadrant [π2,π]\left[\frac{\pi}{2}, \pi\right], cos⁡θ≤0\cos\theta \le 0, so we must be careful with the square root:

1−x2=cos⁡2θ=∣cos⁡θ∣=−cos⁡θ\sqrt{1 - x^2} = \sqrt{\cos^2\theta} = |\cos\theta| = -\cos\theta

Meanwhile, differentiating x=sin⁡θx = \sin\theta still gives dx=cos⁡θ dθdx = \cos\theta \, d\theta. Substituting into the integral:

∫011−x2 dx=∫ππ/2(−cos⁡θ)(cos⁡θ dθ)=−∫ππ/2cos⁡2θ dθ=+∫π/2π1+cos⁡2θ2 dθ\int_0^1 \sqrt{1 - x^2} \, dx = \int_\pi^{\pi/2} (-\cos\theta)(\cos\theta \, d\theta) = -\int_\pi^{\pi/2} \cos^2\theta \, d\theta = +\int_{\pi/2}^\pi \frac{1 + \cos 2\theta}{2} \, d\theta =[θ2+sin⁡2θ4]π/2π=π2−π4=π4= \left[ \frac{\theta}{2} + \frac{\sin 2\theta}{4} \right]_{\pi/2}^\pi = \frac{\pi}{2} - \frac{\pi}{4} = \frac{\pi}{4}

We get the exact same answer π4\frac{\pi}{4}! Notice, however, that if we had forgotten ∣cos⁡θ∣=−cos⁡θ|\cos\theta| = -\cos\theta in the second quadrant, we would have gotten −π4-\frac{\pi}{4} (wrong sign).

Choice 3: Spanning Multiple Branches θ∈[0,5π2]\theta \in \left[0, \frac{5\pi}{2}\right] (The Trap!)

Since sin⁡0=0\sin 0 = 0 and sin⁡(5π2)=1\sin\left(\frac{5\pi}{2}\right) = 1, what happens if someone blindly writes:

∫05π/2cos⁡2θ dθ=[θ2+sin⁡2θ4]05π/2=5π4(WRONG! Five times too large!)\int_0^{5\pi/2} \cos^2\theta \, d\theta = \left[ \frac{\theta}{2} + \frac{\sin 2\theta}{4} \right]_0^{5\pi/2} = \frac{5\pi}{4} \quad \text{(WRONG! Five times too large!)}

Why did this give 5π4\frac{5\pi}{4} instead of π4\frac{\pi}{4}? Because on [π2,3π2]\left[\frac{\pi}{2}, \frac{3\pi}{2}\right], cos⁡θ\cos\theta is negative, so 1−sin⁡2θ=∣cos⁡θ∣=−cos⁡θ\sqrt{1 - \sin^2\theta} = |\cos\theta| = -\cos\theta. Therefore, the true integrand is ∣cos⁡θ∣cos⁡θ|\cos\theta|\cos\theta, which is negative on [π2,3π2]\left[\frac{\pi}{2}, \frac{3\pi}{2}\right]:

∫05π/2∣cos⁡θ∣cos⁡θ dθ=∫0π/2cos⁡2θ dθ⏟+π/4−∫π/23π/2cos⁡2θ dθ⏟−π/2+∫3π/25π/2cos⁡2θ dθ⏟+π/2=π4\int_0^{5\pi/2} |\cos\theta|\cos\theta \, d\theta = \underbrace{\int_0^{\pi/2} \cos^2\theta \, d\theta}_{+\pi/4} - \underbrace{\int_{\pi/2}^{3\pi/2} \cos^2\theta \, d\theta}_{-\pi/2} + \underbrace{\int_{3\pi/2}^{5\pi/2} \cos^2\theta \, d\theta}_{+\pi/2} = \frac{\pi}{4}

By staying inside the single one-to-one branch [−π2,π2]\left[-\frac{\pi}{2}, \frac{\pi}{2}\right], x=sin⁡θx = \sin\theta never folds back and cos⁡θ\cos\theta never changes sign!


Inverse Substitution Example B: Why Tangent Substitutions Must Stay Within a Single Branch

Evaluate:

∫−1111+x2 dx\int_{-1}^1 \frac{1}{1 + x^2} \, dx

using x=tan⁡θx = \tan\theta and dx=sec⁡2θ dθdx = \sec^2\theta \, d\theta.

  • Correct Choice (Single One-to-One Branch θ∈(−π2,π2)\theta \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right)): For x=−1x = -1, we choose α=−π4\alpha = -\frac{\pi}{4}, and for x=1x = 1, we choose β=π4\beta = \frac{\pi}{4}. Both lie inside the continuous one-to-one branch (−π2,π2)\left(-\frac{\pi}{2}, \frac{\pi}{2}\right):
∫−1111+x2 dx=∫−π/4π/4sec⁡2θ dθ1+tan⁡2θ=∫−π/4π/41 dθ=π4−(−π4)=π2\int_{-1}^1 \frac{1}{1 + x^2} \, dx = \int_{-\pi/4}^{\pi/4} \frac{\sec^2\theta \, d\theta}{1 + \tan^2\theta} = \int_{-\pi/4}^{\pi/4} 1 \, d\theta = \frac{\pi}{4} - \left(-\frac{\pi}{4}\right) = \frac{\pi}{2}
  • Wrong Choice (Picking α\alpha and β\beta from Different Branches, e.g., α=3π4\alpha = \frac{3\pi}{4} and β=π4\beta = \frac{\pi}{4}): Notice that tan⁡(3π4)=−1\tan\left(\frac{3\pi}{4}\right) = -1 as well! What if a student picks α=3π4\alpha = \frac{3\pi}{4} for the lower limit and β=π4\beta = \frac{\pi}{4} for the upper limit?
∫3π/4π/41 dθ=π4−3π4=−π2(WRONG!)\int_{3\pi/4}^{\pi/4} 1 \, d\theta = \frac{\pi}{4} - \frac{3\pi}{4} = -\frac{\pi}{2} \quad \text{(WRONG!)}

Why did this fail completely? Because between θ=π4\theta = \frac{\pi}{4} and θ=3π4\theta = \frac{3\pi}{4} lies θ=π2\theta = \frac{\pi}{2}, where x=tan⁡θx = \tan\theta has an infinite discontinuity! As θ\theta moves from 3π4\frac{3\pi}{4} to π4\frac{\pi}{4}, x=tan⁡θx = \tan\theta does not move through [−1,1][-1, 1] at all—instead, it blows up to ±∞\pm\infty at θ=π2\theta = \frac{\pi}{2}!

[!IMPORTANT] Golden Rule for Inverse Substitution (x=ϕ(t)x = \phi(t)): Always choose your new limits α\alpha and β\beta from the standard principal one-to-one branch of the inverse function:

  • For x=asin⁡θx = a\sin\theta: choose α,β∈[−π2,π2]\alpha, \beta \in \left[-\frac{\pi}{2}, \frac{\pi}{2}\right] (where cos⁡θ≥0\cos\theta \ge 0).
  • For x=atan⁡θx = a\tan\theta: choose α,β∈(−π2,π2)\alpha, \beta \in \left(-\frac{\pi}{2}, \frac{\pi}{2}\right) (where tan⁡θ\tan\theta is continuous and sec⁡θ>0\sec\theta > 0).
  • For x=acos⁡θx = a\cos\theta: choose α,β∈[0,π]\alpha, \beta \in [0, \pi] (where sin⁡θ≥0\sin\theta \ge 0).

2. How to Substitute Step by Step (Without Switching Back to the Original Variable)§

When evaluating a definite integral by substitution, follow these four steps:

  1. Choose the Substitution: Identify t=g(x)t = g(x) (or x=ϕ(t)x = \phi(t)) and differentiate to relate the differentials: dt=g′(x) dxdt = g'(x) \, dx (or dx=ϕ′(t) dtdx = \phi'(t) \, dt).
  2. Check Continuity & Differentiability on [a,b][a, b]: Verify that g(x)g(x) and g′(x)g'(x) have no discontinuities or undefined points inside [a,b][a, b]. (If there is a discontinuity at x=cx = c, split the integral at x=cx = c first!)
  3. Change the Limits Immediately:
    • When x=ax = a (lower limit), compute tlower=g(a)t_{\text{lower}} = g(a).
    • When x=bx = b (upper limit), compute tupper=g(b)t_{\text{upper}} = g(b).
  4. Rewrite Completely in tt and Evaluate: Replace the entire integrand, differential, and limits with their tt-equivalents. Never mix xx-limits with a tt-integrand, and once you are in tt, evaluate [F(t)]g(a)g(b)\big[F(t)\big]_{g(a)}^{g(b)} directly—there is no need to substitute xx back!

Example 1§

Evaluate:

∫022x1+x2 dx\int_0^2 \frac{2x}{1 + x^2} \, dx

Solution:

Notice that the numerator 2x dx2x \, dx is the exact differential of the denominator 1+x21 + x^2.

  • Substitution: Let t=1+x2t = 1 + x^2. Then dt=2x dxdt = 2x \, dx. Both g(x)=1+x2g(x) = 1 + x^2 and g′(x)=2xg'(x) = 2x are smooth everywhere on [0,2][0, 2].
  • Change the Limits:
    • When x=0x = 0, t=1+02=1t = 1 + 0^2 = 1.
    • When x=2x = 2, t=1+22=5t = 1 + 2^2 = 5.

Substituting into the definite integral:

∫022x1+x2 dx=∫151t dt\int_0^2 \frac{2x}{1 + x^2} \, dx = \int_1^5 \frac{1}{t} \, dt

Evaluating directly in terms of tt:

∫151t dt=[ln⁡t]15=ln⁡5−ln⁡1=ln⁡5\int_1^5 \frac{1}{t} \, dt = \Big[ \ln t \Big]_1^5 = \ln 5 - \ln 1 = \ln 5

Example 2: When the New Limits Reverse Order§

What happens if our substitution t=g(x)t = g(x) is a decreasing function of xx, so that the new lower limit g(a)g(a) is larger than the new upper limit g(b)g(b)?

Do not panic—and do not swap the limits without changing the sign! Just keep g(a)g(a) at the bottom and g(b)g(b) at the top, or use the property ∫pqf(t) dt=−∫qpf(t) dt\int_p^q f(t) \, dt = -\int_q^p f(t) \, dt. The minus sign from dt=g′(x) dxdt = g'(x) \, dx and the reversed order of limits work together automatically!

Evaluate:

∫0π/2cos⁡3xsin⁡x dx\int_0^{\pi/2} \cos^3 x \sin x \, dx

Solution:

  • Substitution: Let t=cos⁡xt = \cos x. Differentiating gives:
dt=−sin⁡x dx  ⟹  sin⁡x dx=−dtdt = -\sin x \, dx \implies \sin x \, dx = -dt
  • Change the Limits:
    • When x=0x = 0, t=cos⁡0=1t = \cos 0 = 1.
    • When x=π2x = \frac{\pi}{2}, t=cos⁡π2=0t = \cos \frac{\pi}{2} = 0.

Notice that as xx goes from 00 to π2\frac{\pi}{2}, tt decreases from 11 down to 00:

∫0π/2cos⁡3xsin⁡x dx=∫10t3(−dt)=−∫10t3 dt\int_0^{\pi/2} \cos^3 x \sin x \, dx = \int_1^0 t^3 (-dt) = -\int_1^0 t^3 \, dt

Using −∫10t3 dt=+∫01t3 dt-\int_1^0 t^3 \, dt = +\int_0^1 t^3 \, dt:

∫01t3 dt=[t44]01=14−0=14\int_0^1 t^3 \, dt = \left[ \frac{t^4}{4} \right]_0^1 = \frac{1}{4} - 0 = \frac{1}{4}

Example 3: Inverse Trigonometric Substitution§

Evaluate:

∫0ax2a2−x2 dx(a>0)\int_0^a x^2 \sqrt{a^2 - x^2} \, dx \quad (a > 0)

Solution:

To simplify a2−x2\sqrt{a^2 - x^2}, we use the trigonometric substitution:

x=asin⁡θ  ⟹  dx=acos⁡θ dθx = a\sin\theta \implies dx = a\cos\theta \, d\theta
  • Change the Limits:
    • When x=0x = 0, asin⁡θ=0  ⟹  θ=0a\sin\theta = 0 \implies \theta = 0.
    • When x=ax = a, asin⁡θ=a  ⟹  sin⁡θ=1  ⟹  θ=π2a\sin\theta = a \implies \sin\theta = 1 \implies \theta = \frac{\pi}{2}.

For θ∈[0,π2]\theta \in \left[0, \frac{\pi}{2}\right], cos⁡θ≥0\cos\theta \ge 0, so a2−x2=a2(1−sin⁡2θ)=acos⁡θ\sqrt{a^2 - x^2} = \sqrt{a^2(1 - \sin^2\theta)} = a\cos\theta. Substituting everything into the integral:

∫0ax2a2−x2 dx=∫0π/2(a2sin⁡2θ)(acos⁡θ)(acos⁡θ dθ)=a4∫0π/2sin⁡2θcos⁡2θ dθ\int_0^a x^2 \sqrt{a^2 - x^2} \, dx = \int_0^{\pi/2} \big(a^2 \sin^2\theta\big) \big(a\cos\theta\big) \big(a\cos\theta \, d\theta\big) = a^4 \int_0^{\pi/2} \sin^2\theta \cos^2\theta \, d\theta

Using sin⁡θcos⁡θ=12sin⁡2θ\sin\theta\cos\theta = \frac{1}{2}\sin 2\theta, we rewrite the integrand as:

sin⁡2θcos⁡2θ=14sin⁡22θ=18(1−cos⁡4θ)\sin^2\theta \cos^2\theta = \frac{1}{4}\sin^2 2\theta = \frac{1}{8}(1 - \cos 4\theta)

Integrating with respect to θ\theta from 00 to π2\frac{\pi}{2}:

a4∫0π/218(1−cos⁡4θ) dθ=a48[θ−sin⁡4θ4]0π/2=a48(π2−0)=πa416a^4 \int_0^{\pi/2} \frac{1}{8}(1 - \cos 4\theta) \, d\theta = \frac{a^4}{8} \left[ \theta - \frac{\sin 4\theta}{4} \right]_0^{\pi/2} = \frac{a^4}{8} \left( \frac{\pi}{2} - 0 \right) = \frac{\pi a^4}{16}

3. Crucial Traps: Differentiability and Non-Monotonic Substitutions§

Because substitution relies on the Chain Rule and domain mapping, there are two major traps you must watch out for.


Trap 1: Non-Monotonic Substitutions That Fold Back§

Suppose we use a substitution like t=g(x)=x2t = g(x) = x^2 on the symmetric interval [−1,1][-1, 1], or t=sin⁡xt = \sin x on [0,π][0, \pi]. Look at what happens to the limits:

  • At x=−1x = -1, t=(−1)2=1t = (-1)^2 = 1.
  • At x=1x = 1, t=(1)2=1t = (1)^2 = 1.

The lower limit and upper limit in tt become equal (t=1t = 1 to t=1t = 1)! Does this mean the integral is zero, or did something go wrong?

The answer depends entirely on whether the integrand is already in the exact Chain Rule form f(g(x)) g′(x) dxf\big(g(x)\big) \, g'(x) \, dx, or whether you tried to solve for xx in terms of tt!

When a non-monotonic substitution t = x^2 folds back on -1 to 1

Let us compare the two cases side by side:

Case A: When the Derivative Factor Is Already Present (Direct Theorem Applies!)

Consider:

∫−112xcos⁡(x2) dx\int_{-1}^1 2x \cos(x^2) \, dx

Here g(x)=x2g(x) = x^2 and g′(x) dx=2x dxg'(x) \, dx = 2x \, dx is already present in the integrand, and f(t)=cos⁡tf(t) = \cos t is continuous everywhere. By our Substitution Theorem, it is 100% valid to write:

∫−112xcos⁡(x2) dx=∫11cos⁡t dt=0\int_{-1}^1 2x \cos(x^2) \, dx = \int_1^1 \cos t \, dt = 0

Why is this valid? Because as xx goes from −1-1 to 00, t=x2t = x^2 goes from 11 to 00 (giving ∫10cos⁡t dt\int_1^0 \cos t \, dt), and as xx goes from 00 to 11, t=x2t = x^2 goes from 00 back to 11 (giving ∫01cos⁡t dt\int_0^1 \cos t \, dt). The two halves cancel each other out!

Case B: When You Must Solve for the Original Variable in Terms of the New Variable (You MUST Split First!)

Now consider the strictly positive integral:

I=∫−11cos⁡(x2) dx>0orJ=∫0π1+sin⁡x dx>0I = \int_{-1}^1 \cos(x^2) \, dx > 0 \quad \text{or} \quad J = \int_0^\pi \sqrt{1 + \sin x} \, dx > 0

Suppose a student tries to evaluate ∫−11x2 dx\int_{-1}^1 x^2 \, dx by setting t=x2t = x^2. Since x=−1  ⟹  t=1x = -1 \implies t = 1 and x=1  ⟹  t=1x = 1 \implies t = 1, if they blindly write ∫11…dt=0\int_1^1 \dots dt = 0, they get 00 for a strictly positive area!

Why did it fail? Because 2x dx2x \, dx was not in the integrand! To express dxdx in terms of dtdt, you have to solve t=x2t = x^2 for xx:

  • On the left half [−1,0][-1, 0], xx is negative, so x=−tx = -\sqrt{t} and dx=−12t dtdx = -\frac{1}{2\sqrt{t}} \, dt.
  • On the right half [0,1][0, 1], xx is positive, so x=+tx = +\sqrt{t} and dx=+12t dtdx = +\frac{1}{2\sqrt{t}} \, dt.

Because the inverse formula for xx in terms of tt changes sign at the turning point x=0x = 0, you cannot use a single formula across [−1,1][-1, 1]!

[!CAUTION] Rule for Non-Monotonic Substitutions: If your substitution t=g(x)t = g(x) has a turning point x=cx = c inside (a,b)(a, b) (where g′(c)=0g'(c) = 0) and you need to solve for xx or g′(x)g'(x) in terms of tt (using a square root like t\sqrt{t} or cos⁡x=±1−sin⁡2x\cos x = \pm\sqrt{1 - \sin^2 x}), you MUST split the integral at the turning point x=cx = c before substituting!


Example 4: Splitting at a Turning Point Before Substituting

Evaluate:

∫0πsin⁡x1+cos⁡2x dxand compare with∫0πcos⁡x1+sin⁡2x dx\int_0^\pi \frac{\sin x}{1 + \cos^2 x} \, dx \quad \text{and compare with} \quad \int_0^\pi \frac{\cos x}{1 + \sin^2 x} \, dx

Solution:

First Integral: In ∫0πsin⁡x1+cos⁡2x dx\int_0^\pi \frac{\sin x}{1 + \cos^2 x} \, dx, let t=cos⁡xt = \cos x. Then dt=−sin⁡x dxdt = -\sin x \, dx is already present! As xx goes from 00 to π\pi, t=cos⁡xt = \cos x decreases monotonically from cos⁡0=1\cos 0 = 1 to cos⁡π=−1\cos \pi = -1:

∫0πsin⁡x1+cos⁡2x dx=∫1−1−dt1+t2=∫−11dt1+t2=[tan⁡−1t]−11=π4−(−π4)=π2\int_0^\pi \frac{\sin x}{1 + \cos^2 x} \, dx = \int_1^{-1} \frac{-dt}{1 + t^2} = \int_{-1}^1 \frac{dt}{1 + t^2} = \Big[ \tan^{-1} t \Big]_{-1}^1 = \frac{\pi}{4} - \left(-\frac{\pi}{4}\right) = \frac{\pi}{2}

Second Integral: In ∫0πcos⁡x1+sin⁡2x dx\int_0^\pi \frac{\cos x}{1 + \sin^2 x} \, dx, let t=sin⁡xt = \sin x. Again, dt=cos⁡x dxdt = \cos x \, dx is already present in the numerator! Even though t=sin⁡xt = \sin x rises from 00 to 11 (on [0,π/2][0, \pi/2]) and falls back from 11 to 00 (on [π/2,π][\pi/2, \pi]), the Direct Substitution Theorem applies immediately:

∫0πcos⁡x1+sin⁡2x dx=∫sin⁡0sin⁡πdt1+t2=∫00dt1+t2=0\int_0^\pi \frac{\cos x}{1 + \sin^2 x} \, dx = \int_{\sin 0}^{\sin \pi} \frac{dt}{1 + t^2} = \int_0^0 \frac{dt}{1 + t^2} = 0

(Indeed, if you split at x=π2x = \frac{\pi}{2}, the left half ∫0π/2\int_0^{\pi/2} gives ∫01dt1+t2=π4\int_0^1 \frac{dt}{1+t^2} = \frac{\pi}{4} and the right half ∫π/2π\int_{\pi/2}^\pi gives ∫10dt1+t2=−π4\int_1^0 \frac{dt}{1+t^2} = -\frac{\pi}{4}, summing to 00!)


Trap 2: Discontinuous Substitutions Inside the Interval§

Recall that the Substitution Theorem requires t=g(x)t = g(x) to be continuous and differentiable on the entire interval [a,b][a, b].

What if you choose a substitution like t=tan⁡xt = \tan x, t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right), or t=x−1xt = x - \frac{1}{x} across an interval where g(x)g(x) blows up or jumps?

If g(x)g(x) is discontinuous at an interior point x=c∈(a,b)x = c \in (a, b), you cannot substitute across x=cx = c in one piece! Just as we learned in Section 04, you must first split the integral at x=cx = c into [a,c−h][a, c-h] and [c+h,b][c+h, b] as h→0+h \to 0^+, and then apply the substitution on each continuous piece separately.


Example 5: Substituting Across an Interior Point of Discontinuity

Evaluate:

∫0π13+2cos⁡2x dx\int_0^\pi \frac{1}{3 + 2\cos^2 x} \, dx

Solution:

To integrate 13+2cos⁡2x\frac{1}{3 + 2\cos^2 x}, we divide the numerator and denominator by cos⁡2x\cos^2 x:

∫0πsec⁡2x3sec⁡2x+2 dx=∫0πsec⁡2x3(1+tan⁡2x)+2 dx=∫0πsec⁡2x5+3tan⁡2x dx\int_0^\pi \frac{\sec^2 x}{3\sec^2 x + 2} \, dx = \int_0^\pi \frac{\sec^2 x}{3(1 + \tan^2 x) + 2} \, dx = \int_0^\pi \frac{\sec^2 x}{5 + 3\tan^2 x} \, dx

We want to substitute t=tan⁡xt = \tan x and dt=sec⁡2x dxdt = \sec^2 x \, dx.

Check Continuity of t=tan⁡xt = \tan x: On [0,π][0, \pi], the function t=tan⁡xt = \tan x is discontinuous at x=π2x = \frac{\pi}{2}! (If we ignored this and plugged x=0  ⟹  t=0x = 0 \implies t = 0 and x=π  ⟹  t=0x = \pi \implies t = 0, we would get ∫00dt5+3t2=0\int_0^0 \frac{dt}{5 + 3t^2} = 0, which is false!)

Instead, we split [0,π][0, \pi] at x=π2x = \frac{\pi}{2} before changing variables:

∫0π13+2cos⁡2x dx=lim⁡h→0+∫0π2−hsec⁡2x5+3tan⁡2x dx+lim⁡h→0+∫π2+hπsec⁡2x5+3tan⁡2x dx\int_0^\pi \frac{1}{3 + 2\cos^2 x} \, dx = \lim_{h \to 0^+} \int_0^{\frac{\pi}{2}-h} \frac{\sec^2 x}{5 + 3\tan^2 x} \, dx + \lim_{h \to 0^+} \int_{\frac{\pi}{2}+h}^\pi \frac{\sec^2 x}{5 + 3\tan^2 x} \, dx

Now t=tan⁡xt = \tan x is continuous and differentiable on each piece:

  • On [0,π2−h]\left[0, \frac{\pi}{2}-h\right] as h→0+h \to 0^+: As xx goes from 00 to π2−\frac{\pi}{2}^-, t=tan⁡xt = \tan x goes from 00 to +∞+\infty.
  • On [π2+h,π]\left[\frac{\pi}{2}+h, \pi\right] as h→0+h \to 0^+: As xx goes from π2+\frac{\pi}{2}^+ to π\pi, t=tan⁡xt = \tan x goes from −∞-\infty to 00.

Thus, our integral transforms into:

I=∫0+∞dt5+3t2+∫−∞0dt5+3t2I = \int_0^{+\infty} \frac{dt}{5 + 3t^2} + \int_{-\infty}^0 \frac{dt}{5 + 3t^2}

Since ∫dt5+3t2=13∫dt(53)2+t2=115tan⁡−1(t35)\int \frac{dt}{5 + 3t^2} = \frac{1}{3} \int \frac{dt}{\left(\sqrt{\frac{5}{3}}\right)^2 + t^2} = \frac{1}{\sqrt{15}} \tan^{-1}\left(t\sqrt{\frac{3}{5}}\right), evaluating both pieces gives:

I=115[tan⁡−1(+∞)−tan⁡−1(0)]+115[tan⁡−1(0)−tan⁡−1(−∞)]I = \frac{1}{\sqrt{15}} \Big[ \tan^{-1}(+\infty) - \tan^{-1}(0) \Big] + \frac{1}{\sqrt{15}} \Big[ \tan^{-1}(0) - \tan^{-1}(-\infty) \Big] =115(π2−0)+115(0−(−π2))=π15= \frac{1}{\sqrt{15}} \left( \frac{\pi}{2} - 0 \right) + \frac{1}{\sqrt{15}} \left( 0 - \left(-\frac{\pi}{2}\right) \right) = \frac{\pi}{\sqrt{15}}

Miscellaneous Examples§


Example 1§

Evaluate:

∫0π/4sec⁡2x(1+tan⁡x)(2+tan⁡x) dx\int_0^{\pi/4} \frac{\sec^2 x}{(1 + \tan x)(2 + \tan x)} \, dx

Solution:

On the interval [0,π4]\left[0, \frac{\pi}{4}\right], the function t=tan⁡xt = \tan x is continuous and strictly increasing, with dt=sec⁡2x dxdt = \sec^2 x \, dx.

  • Change the Limits:
    • When x=0x = 0, t=tan⁡0=0t = \tan 0 = 0.
    • When x=π4x = \frac{\pi}{4}, t=tan⁡π4=1t = \tan \frac{\pi}{4} = 1.

Substituting t=tan⁡xt = \tan x and dt=sec⁡2x dxdt = \sec^2 x \, dx transforms the trigonometric integral into a rational integral in tt:

∫0π/4sec⁡2x(1+tan⁡x)(2+tan⁡x) dx=∫011(1+t)(2+t) dt\int_0^{\pi/4} \frac{\sec^2 x}{(1 + \tan x)(2 + \tan x)} \, dx = \int_0^1 \frac{1}{(1 + t)(2 + t)} \, dt

Decomposing into partial fractions using 1(1+t)(2+t)=11+t−12+t\frac{1}{(1 + t)(2 + t)} = \frac{1}{1 + t} - \frac{1}{2 + t}:

∫01(11+t−12+t)dt=[ln⁡(1+t2+t)]01\int_0^1 \left( \frac{1}{1 + t} - \frac{1}{2 + t} \right) dt = \left[ \ln \left( \frac{1 + t}{2 + t} \right) \right]_0^1

Evaluating at t=1t = 1 and t=0t = 0:

=ln⁡(23)−ln⁡(12)=ln⁡(23⋅21)=ln⁡(43)= \ln \left( \frac{2}{3} \right) - \ln \left( \frac{1}{2} \right) = \ln \left( \frac{2}{3} \cdot \frac{2}{1} \right) = \ln \left( \frac{4}{3} \right)

Example 2§

Evaluate:

∫0π/2cos⁡x1+sin⁡x+cos⁡x dx\int_0^{\pi/2} \frac{\cos x}{1 + \sin x + \cos x} \, dx

Solution:

On [0,π2]\left[0, \frac{\pi}{2}\right], the half-angle substitution t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right) is completely continuous and differentiable:

t=tan⁡(x2)  ⟹  dx=2 dt1+t2,sin⁡x=2t1+t2,cos⁡x=1−t21+t2t = \tan\left(\frac{x}{2}\right) \implies dx = \frac{2 \, dt}{1 + t^2}, \quad \sin x = \frac{2t}{1 + t^2}, \quad \cos x = \frac{1 - t^2}{1 + t^2}
  • Change the Limits:
    • When x=0x = 0, t=tan⁡0=0t = \tan 0 = 0.
    • When x=π2x = \frac{\pi}{2}, t=tan⁡(π4)=1t = \tan\left(\frac{\pi}{4}\right) = 1.

Substituting into the integrand:

cos⁡x1+sin⁡x+cos⁡x dx=1−t21+t21+2t1+t2+1−t21+t2⋅2 dt1+t2=1−t2(1+t2)+2t+(1−t2)⋅2 dt1+t2\frac{\cos x}{1 + \sin x + \cos x} \, dx = \frac{\frac{1 - t^2}{1 + t^2}}{1 + \frac{2t}{1 + t^2} + \frac{1 - t^2}{1 + t^2}} \cdot \frac{2 \, dt}{1 + t^2} = \frac{1 - t^2}{(1 + t^2) + 2t + (1 - t^2)} \cdot \frac{2 \, dt}{1 + t^2}

Notice how (1+t2)+2t+(1−t2)(1 + t^2) + 2t + (1 - t^2) in the denominator simplifies to 2+2t=2(1+t)2 + 2t = 2(1 + t):

=(1−t)(1+t)2(1+t)⋅2 dt1+t2=1−t1+t2 dt= \frac{(1 - t)(1 + t)}{2(1 + t)} \cdot \frac{2 \, dt}{1 + t^2} = \frac{1 - t}{1 + t^2} \, dt

Therefore, our definite integral becomes:

∫0π/2cos⁡x1+sin⁡x+cos⁡x dx=∫01(11+t2−t1+t2)dt\int_0^{\pi/2} \frac{\cos x}{1 + \sin x + \cos x} \, dx = \int_0^1 \left( \frac{1}{1 + t^2} - \frac{t}{1 + t^2} \right) dt

Integrating term by term:

=[tan⁡−1t−12ln⁡(1+t2)]01=(π4−12ln⁡2)−(0−0)=π4−12ln⁡2= \left[ \tan^{-1} t - \frac{1}{2}\ln(1 + t^2) \right]_0^1 = \left( \frac{\pi}{4} - \frac{1}{2}\ln 2 \right) - (0 - 0) = \frac{\pi}{4} - \frac{1}{2}\ln 2

Example 3§

Evaluate:

∫131x21+x2 dx\int_1^{\sqrt{3}} \frac{1}{x^2 \sqrt{1 + x^2}} \, dx

Solution:

For integrals containing xk1+x2x^k \sqrt{1 + x^2} in the denominator on an interval where x>0x > 0, the reciprocal substitution x=1tx = \frac{1}{t} works remarkably well!

  • Substitution: Let x=1tx = \frac{1}{t}, so dx=−1t2 dtdx = -\frac{1}{t^2} \, dt.
  • Change the Limits:
    • When x=1x = 1, t=1t = 1.
    • When x=3x = \sqrt{3}, t=13t = \frac{1}{\sqrt{3}}.

Since t>0t > 0 on [13,1]\left[\frac{1}{\sqrt{3}}, 1\right], we have 1+x2=1+1t2=t2+1t\sqrt{1 + x^2} = \sqrt{1 + \frac{1}{t^2}} = \frac{\sqrt{t^2 + 1}}{t}. Substituting into the integral:

∫131x21+x2 dx=∫11/311t2⋅t2+1t(−1t2 dt)\int_1^{\sqrt{3}} \frac{1}{x^2 \sqrt{1 + x^2}} \, dx = \int_1^{1/\sqrt{3}} \frac{1}{\frac{1}{t^2} \cdot \frac{\sqrt{t^2 + 1}}{t}} \left( -\frac{1}{t^2} \, dt \right)

Notice that 1t2\frac{1}{t^2} cancels completely, and flipping the limits absorbs the minus sign:

=∫1/31tt2+1 dt= \int_{1/\sqrt{3}}^1 \frac{t}{\sqrt{t^2 + 1}} \, dt

Now let u=t2+1u = t^2 + 1, so du=2t dt  ⟹  t dt=12 dudu = 2t \, dt \implies t \, dt = \frac{1}{2} \, du:

  • When t=13t = \frac{1}{\sqrt{3}}, u=13+1=43u = \frac{1}{3} + 1 = \frac{4}{3}.
  • When t=1t = 1, u=1+1=2u = 1 + 1 = 2.

Evaluating the uu-integral:

12∫4/32u−1/2 du=[u]4/32=2−43=2−23\frac{1}{2} \int_{4/3}^2 u^{-1/2} \, du = \Big[ \sqrt{u} \Big]_{4/3}^2 = \sqrt{2} - \sqrt{\frac{4}{3}} = \sqrt{2} - \frac{2}{\sqrt{3}}

Example 4§

Evaluate:

∫121(x+1)x2−1 dx\int_1^2 \frac{1}{(x + 1)\sqrt{x^2 - 1}} \, dx

Solution:

When a linear factor (x+1)(x + 1) multiplies a quadratic radical x2−1\sqrt{x^2 - 1}, the standard substitution is to set the linear factor equal to 1t\frac{1}{t}:

x+1=1t  ⟹  x=1t−1=1−ttanddx=−1t2 dtx + 1 = \frac{1}{t} \implies x = \frac{1}{t} - 1 = \frac{1 - t}{t} \quad \text{and} \quad dx = -\frac{1}{t^2} \, dt
  • Change the Limits:
    • When x=1x = 1, t=11+1=12t = \frac{1}{1 + 1} = \frac{1}{2}.
    • When x=2x = 2, t=12+1=13t = \frac{1}{2 + 1} = \frac{1}{3}.

Let us express x2−1\sqrt{x^2 - 1} in terms of tt (noting that t∈[13,12]t \in \left[\frac{1}{3}, \frac{1}{2}\right] is positive):

x2−1=(1−tt)2−1=(1−2t+t2)−t2t2=1−2tt2  ⟹  x2−1=1−2ttx^2 - 1 = \left(\frac{1 - t}{t}\right)^2 - 1 = \frac{(1 - 2t + t^2) - t^2}{t^2} = \frac{1 - 2t}{t^2} \implies \sqrt{x^2 - 1} = \frac{\sqrt{1 - 2t}}{t}

Substituting everything into the definite integral:

∫121(x+1)x2−1 dx=∫1/21/311t⋅1−2tt(−1t2 dt)\int_1^2 \frac{1}{(x + 1)\sqrt{x^2 - 1}} \, dx = \int_{1/2}^{1/3} \frac{1}{\frac{1}{t} \cdot \frac{\sqrt{1 - 2t}}{t}} \left( -\frac{1}{t^2} \, dt \right)

The 1t2\frac{1}{t^2} factors cancel out, and reversing the limits from [12,13]\left[\frac{1}{2}, \frac{1}{3}\right] to [13,12]\left[\frac{1}{3}, \frac{1}{2}\right] absorbs the minus sign:

=∫1/31/211−2t dt= \int_{1/3}^{1/2} \frac{1}{\sqrt{1 - 2t}} \, dt

Since ∫(1−2t)−1/2 dt=−1−2t\int (1 - 2t)^{-1/2} \, dt = -\sqrt{1 - 2t}, we obtain:

=[−1−2t]1/31/2=(−1−1)−(−1−23)=0+13=13= \Big[ -\sqrt{1 - 2t} \Big]_{1/3}^{1/2} = \left( -\sqrt{1 - 1} \right) - \left( -\sqrt{1 - \frac{2}{3}} \right) = 0 + \frac{1}{\sqrt{3}} = \frac{1}{\sqrt{3}}

Example 5§

Evaluate:

∫ln⁡2ln⁡3xsin⁡(x2)sin⁡(x2)+cos⁡(x2) dx\int_{\sqrt{\ln 2}}^{\sqrt{\ln 3}} \frac{x \sin(x^2)}{\sin(x^2) + \cos(x^2)} \, dx

Solution:

Look at the outer factor x dxx \, dx and the argument x2x^2 inside the trigonometric functions. This immediately suggests substituting t=x2t = x^2:

  • Substitution: Let t=x2t = x^2. Then dt=2x dx  ⟹  x dx=12 dtdt = 2x \, dx \implies x \, dx = \frac{1}{2} \, dt.
  • Change the Limits:
    • When x=ln⁡2x = \sqrt{\ln 2}, t=ln⁡2t = \ln 2.
    • When x=ln⁡3x = \sqrt{\ln 3}, t=ln⁡3t = \ln 3.

The integral transforms into:

I=12∫ln⁡2ln⁡3sin⁡tsin⁡t+cos⁡t dtI = \frac{1}{2} \int_{\ln 2}^{\ln 3} \frac{\sin t}{\sin t + \cos t} \, dt

To integrate sin⁡tsin⁡t+cos⁡t\frac{\sin t}{\sin t + \cos t}, we write the numerator sin⁡t\sin t as a linear combination of the denominator (sin⁡t+cos⁡t)(\sin t + \cos t) and its derivative (cos⁡t−sin⁡t)(\cos t - \sin t):

sin⁡t=12(sin⁡t+cos⁡t)−12(cos⁡t−sin⁡t)\sin t = \frac{1}{2}(\sin t + \cos t) - \frac{1}{2}(\cos t - \sin t)

Dividing both sides by sin⁡t+cos⁡t\sin t + \cos t gives:

sin⁡tsin⁡t+cos⁡t=12−12⋅cos⁡t−sin⁡tsin⁡t+cos⁡t\frac{\sin t}{\sin t + \cos t} = \frac{1}{2} - \frac{1}{2} \cdot \frac{\cos t - \sin t}{\sin t + \cos t}

Since cos⁡t−sin⁡t\cos t - \sin t is the exact derivative of sin⁡t+cos⁡t\sin t + \cos t, our integral in tt becomes:

I=14∫ln⁡2ln⁡3(1−cos⁡t−sin⁡tsin⁡t+cos⁡t)dtI = \frac{1}{4} \int_{\ln 2}^{\ln 3} \left( 1 - \frac{\cos t - \sin t}{\sin t + \cos t} \right) dt =14[t−ln⁡(sin⁡t+cos⁡t)]ln⁡2ln⁡3=14ln⁡(32)−14ln⁡(sin⁡(ln⁡3)+cos⁡(ln⁡3)sin⁡(ln⁡2)+cos⁡(ln⁡2))= \frac{1}{4} \Big[ t - \ln(\sin t + \cos t) \Big]_{\ln 2}^{\ln 3} = \frac{1}{4} \ln\left(\frac{3}{2}\right) - \frac{1}{4} \ln\left( \frac{\sin(\ln 3) + \cos(\ln 3)}{\sin(\ln 2) + \cos(\ln 2)} \right)

Example 6§

Evaluate:

∫0π/2sin⁡xcos⁡xcos⁡2x+3cos⁡x+2 dx\int_0^{\pi/2} \frac{\sin x \cos x}{\cos^2 x + 3\cos x + 2} \, dx

Solution:

The integrand contains a rational function of cos⁡x\cos x multiplied by sin⁡x dx\sin x \, dx.

  • Substitution: Let t=cos⁡xt = \cos x. Then dt=−sin⁡x dx  ⟹  sin⁡x dx=−dtdt = -\sin x \, dx \implies \sin x \, dx = -dt.
  • Change the Limits:
    • When x=0x = 0, t=cos⁡0=1t = \cos 0 = 1.
    • When x=π2x = \frac{\pi}{2}, t=cos⁡π2=0t = \cos \frac{\pi}{2} = 0.

Substituting into the definite integral and flipping the limits to absorb the minus sign:

∫0π/2cos⁡x(sin⁡x dx)cos⁡2x+3cos⁡x+2=∫10t(−dt)t2+3t+2=∫01t(t+1)(t+2) dt\int_0^{\pi/2} \frac{\cos x (\sin x \, dx)}{\cos^2 x + 3\cos x + 2} = \int_1^0 \frac{t (-dt)}{t^2 + 3t + 2} = \int_0^1 \frac{t}{(t + 1)(t + 2)} \, dt

Decomposing t(t+1)(t+2)\frac{t}{(t + 1)(t + 2)} into partial fractions:

t(t+1)(t+2)=2t+2−1t+1\frac{t}{(t + 1)(t + 2)} = \frac{2}{t + 2} - \frac{1}{t + 1}

Integrating from t=0t = 0 to t=1t = 1:

∫01(2t+2−1t+1)dt=[2ln⁡(t+2)−ln⁡(t+1)]01=[ln⁡((t+2)2t+1)]01\int_0^1 \left( \frac{2}{t + 2} - \frac{1}{t + 1} \right) dt = \Big[ 2\ln(t + 2) - \ln(t + 1) \Big]_0^1 = \left[ \ln \left( \frac{(t + 2)^2}{t + 1} \right) \right]_0^1

Evaluating at t=1t = 1 and t=0t = 0:

=ln⁡(322)−ln⁡(221)=ln⁡(92)−ln⁡(4)=ln⁡(98)= \ln \left( \frac{3^2}{2} \right) - \ln \left( \frac{2^2}{1} \right) = \ln \left( \frac{9}{2} \right) - \ln(4) = \ln \left( \frac{9}{8} \right)

Example 7§

Evaluate:

∫01x1−x21+x2 dx\int_0^1 x \sqrt{\frac{1 - x^2}{1 + x^2}} \, dx

Solution:

Observe that xx appears only as x2x^2 inside the square root, and we have x dxx \, dx outside!

  • Substitution: Let t=x2t = x^2. Then dt=2x dx  ⟹  x dx=12 dtdt = 2x \, dx \implies x \, dx = \frac{1}{2} \, dt.
  • Change the Limits:
    • When x=0x = 0, t=02=0t = 0^2 = 0.
    • When x=1x = 1, t=12=1t = 1^2 = 1.

Substituting into the integral gives:

I=12∫011−t1+t dtI = \frac{1}{2} \int_0^1 \sqrt{\frac{1 - t}{1 + t}} \, dt

To integrate 1−t1+t\sqrt{\frac{1 - t}{1 + t}}, we rationalize the numerator by multiplying inside the radical by 1−t1−t\frac{1 - t}{1 - t} (since 1−t≥01 - t \ge 0 on [0,1][0, 1]):

1−t1+t=(1−t)21−t2=1−t1−t2=11−t2−t1−t2\sqrt{\frac{1 - t}{1 + t}} = \sqrt{\frac{(1 - t)^2}{1 - t^2}} = \frac{1 - t}{\sqrt{1 - t^2}} = \frac{1}{\sqrt{1 - t^2}} - \frac{t}{\sqrt{1 - t^2}}

Splitting into two standard integrals on [0,1][0, 1]:

I=12∫0111−t2 dt−12∫01t1−t2 dtI = \frac{1}{2} \int_0^1 \frac{1}{\sqrt{1 - t^2}} \, dt - \frac{1}{2} \int_0^1 \frac{t}{\sqrt{1 - t^2}} \, dt

Since ∫11−t2 dt=sin⁡−1t\int \frac{1}{\sqrt{1 - t^2}} \, dt = \sin^{-1} t and ∫−t1−t2 dt=1−t2\int \frac{-t}{\sqrt{1 - t^2}} \, dt = \sqrt{1 - t^2}, we obtain:

I=12[sin⁡−1t+1−t2]01=12[(π2+0)−(0+1)]=π−24I = \frac{1}{2} \Big[ \sin^{-1} t + \sqrt{1 - t^2} \Big]_0^1 = \frac{1}{2} \left[ \left( \frac{\pi}{2} + 0 \right) - (0 + 1) \right] = \frac{\pi - 2}{4}

Example 8§

Evaluate:

∫121xx4−1 dx\int_1^2 \frac{1}{x \sqrt{x^4 - 1}} \, dx

Solution:

Notice the expression x4−1=(x2)2−1x^4 - 1 = (x^2)^2 - 1 inside the radical. If we multiply both the numerator and the denominator by xx, we create x dxx \, dx in the numerator and x2x^2 in the denominator:

∫12x dxx2(x2)2−1\int_1^2 \frac{x \, dx}{x^2 \sqrt{(x^2)^2 - 1}}
  • Substitution: Let t=x2t = x^2. Then dt=2x dx  ⟹  x dx=12 dtdt = 2x \, dx \implies x \, dx = \frac{1}{2} \, dt.
  • Change the Limits:
    • When x=1x = 1, t=12=1t = 1^2 = 1.
    • When x=2x = 2, t=22=4t = 2^2 = 4.

The integral transforms into:

12∫141tt2−1 dt\frac{1}{2} \int_1^4 \frac{1}{t \sqrt{t^2 - 1}} \, dt

Recall that ddt(sec⁡−1t)=1tt2−1\frac{d}{dt}(\sec^{-1} t) = \frac{1}{t\sqrt{t^2 - 1}} for t≥1t \ge 1 (or you may set t=sec⁡θt = \sec\theta, dt=sec⁡θtan⁡θ dθdt = \sec\theta\tan\theta \, d\theta). Evaluating directly:

12[sec⁡−1t]14=12(sec⁡−14−sec⁡−11)=12(cos⁡−1(14)−0)=12cos⁡−1(14)\frac{1}{2} \Big[ \sec^{-1} t \Big]_1^4 = \frac{1}{2} \big( \sec^{-1} 4 - \sec^{-1} 1 \big) = \frac{1}{2} \left( \cos^{-1}\left(\frac{1}{4}\right) - 0 \right) = \frac{1}{2} \cos^{-1}\left(\frac{1}{4}\right)

Example 9§

Evaluate:

∫0π/2sin⁡2xsin⁡4x+cos⁡4x dx\int_0^{\pi/2} \frac{\sin 2x}{\sin^4 x + \cos^4 x} \, dx

Solution:

Recall that sin⁡2x=2sin⁡xcos⁡x\sin 2x = 2\sin x \cos x. Also, we can express sin⁡4x+cos⁡4x\sin^4 x + \cos^4 x purely in terms of sin⁡2x\sin^2 x (or cos⁡2x\cos 2x):

sin⁡4x+cos⁡4x=(sin⁡2x)2+(1−sin⁡2x)2\sin^4 x + \cos^4 x = (\sin^2 x)^2 + (1 - \sin^2 x)^2
  • Substitution: Let t=sin⁡2xt = \sin^2 x. Differentiating gives:
dt=2sin⁡xcos⁡x dx=sin⁡2x dxdt = 2\sin x \cos x \, dx = \sin 2x \, dx
  • Change the Limits:
    • When x=0x = 0, t=sin⁡20=0t = \sin^2 0 = 0.
    • When x=π2x = \frac{\pi}{2}, t=sin⁡2π2=1t = \sin^2 \frac{\pi}{2} = 1.

Substituting t=sin⁡2xt = \sin^2 x and dt=sin⁡2x dxdt = \sin 2x \, dx into the integral gives:

∫0π/2sin⁡2xsin⁡4x+cos⁡4x dx=∫01dtt2+(1−t)2=∫01dt2t2−2t+1\int_0^{\pi/2} \frac{\sin 2x}{\sin^4 x + \cos^4 x} \, dx = \int_0^1 \frac{dt}{t^2 + (1 - t)^2} = \int_0^1 \frac{dt}{2t^2 - 2t + 1}

Completing the square in the denominator:

2t2−2t+1=12(4t2−4t+2)=12[(2t−1)2+12]2t^2 - 2t + 1 = \frac{1}{2}\Big( 4t^2 - 4t + 2 \Big) = \frac{1}{2}\Big[ (2t - 1)^2 + 1^2 \Big]

Thus:

∫012 dt(2t−1)2+12=[tan⁡−1(2t−1)]01=tan⁡−1(1)−tan⁡−1(−1)=π4−(−π4)=π2\int_0^1 \frac{2 \, dt}{(2t - 1)^2 + 1^2} = \Big[ \tan^{-1}(2t - 1) \Big]_0^1 = \tan^{-1}(1) - \tan^{-1}(-1) = \frac{\pi}{4} - \left(-\frac{\pi}{4}\right) = \frac{\pi}{2}

Example 10§

Evaluate:

∫0π15+4cos⁡x dx\int_0^\pi \frac{1}{5 + 4\cos x} \, dx

Solution:

For an integrand of the form 1a+bcos⁡x\frac{1}{a + b\cos x}, the universal trigonometric substitution is t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right).

Let us check the continuity of t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right) on [0,π][0, \pi]:

  • As xx varies from 00 to π\pi, the half-angle x2\frac{x}{2} varies from 00 to π2\frac{\pi}{2}.
  • On [0,π2)\left[0, \frac{\pi}{2}\right), t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right) is continuous and strictly increasing, and as x→π−x \to \pi^- (i.e., x2→π2−\frac{x}{2} \to \frac{\pi}{2}^-), t→+∞t \to +\infty!
  • Note that x2=π2\frac{x}{2} = \frac{\pi}{2} occurs right at the upper endpoint x=πx = \pi (not inside (0,π)(0, \pi)), so there is no interior jump discontinuity.

Using t=tan⁡(x2)t = \tan\left(\frac{x}{2}\right), we have:

dx=2 dt1+t2andcos⁡x=1−t21+t2dx = \frac{2 \, dt}{1 + t^2} \quad \text{and} \quad \cos x = \frac{1 - t^2}{1 + t^2}
  • Change the Limits:
    • When x=0x = 0, t=tan⁡0=0t = \tan 0 = 0.
    • As x→π−x \to \pi^-, t=tan⁡(π2−)→+∞t = \tan\left(\frac{\pi}{2}^-\right) \to +\infty.

Substituting into the definite integral:

∫0π15+4cos⁡x dx=∫0+∞15+4(1−t21+t2)⋅2 dt1+t2=∫0+∞2 dt5(1+t2)+4(1−t2)\int_0^\pi \frac{1}{5 + 4\cos x} \, dx = \int_0^{+\infty} \frac{1}{5 + 4\left(\frac{1 - t^2}{1 + t^2}\right)} \cdot \frac{2 \, dt}{1 + t^2} = \int_0^{+\infty} \frac{2 \, dt}{5(1 + t^2) + 4(1 - t^2)}

Simplifying the denominator 5+5t2+4−4t2=9+t2=32+t25 + 5t^2 + 4 - 4t^2 = 9 + t^2 = 3^2 + t^2:

=2∫0+∞dt32+t2=2[13tan⁡−1(t3)]0+∞=23(π2−0)=π3= 2 \int_0^{+\infty} \frac{dt}{3^2 + t^2} = 2 \left[ \frac{1}{3} \tan^{-1}\left(\frac{t}{3}\right) \right]_0^{+\infty} = \frac{2}{3} \left( \frac{\pi}{2} - 0 \right) = \frac{\pi}{3}

Summary§

Concept Rule / Formula Key Takeaway
Direct Substitution ∫abf(g(x)) g′(x) dx=∫g(a)g(b)f(t) dt\int_a^b f(g(x)) \, g'(x) \, dx = \int_{g(a)}^{g(b)} f(t) \, dt Transform the limits immediately (x=a→t=g(a)x = a \to t = g(a), x=b→t=g(b)x = b \to t = g(b)) and never switch back to xx.
Inverse Substitution ∫abf(x) dx=∫αβf(ϕ(t)) ϕ′(t) dt\int_a^b f(x) \, dx = \int_\alpha^\beta f(\phi(t)) \, \phi'(t) \, dt Choose [α,β][\alpha, \beta] on a single one-to-one branch where ϕ(α)=a\phi(\alpha) = a and ϕ(β)=b\phi(\beta) = b.
Reversed Limits (g(a)>g(b)g(a) > g(b)) −∫g(a)g(b)f(t) dt=+∫g(b)g(a)f(t) dt-\int_{g(a)}^{g(b)} f(t) \, dt = +\int_{g(b)}^{g(a)} f(t) \, dt Decreasing substitutions reverse the order of limits; flipping them cancels the minus sign from dtdt.
Non-Monotonic Substitution If t=g(x)t = g(x) has a turning point c∈(a,b)c \in (a, b) and you must solve for xx in terms of tt, split at x=cx = c first. Prevents sign errors when taking square roots like x=±tx = \pm\sqrt{t} or cos⁡x=±1−sin⁡2x\cos x = \pm\sqrt{1 - \sin^2 x}.
Discontinuous Substitution If t=g(x)t = g(x) (such as tan⁡x\tan x) is undefined at c∈(a,b)c \in (a, b), split into [a,c−h][a, c-h] and [c+h,b][c+h, b] before substituting. Substituting across an interior asymptote of g(x)g(x) misses the jump and produces false results.
Section 5 of 15 · Definite Integration

Mark this section complete when you have worked through its proofs.