Topic · Calculus

Techniques of Integration

Differentiation runs on autopilot: a handful of rules — power, product, quotient, chain — apply mechanically to any combination of elementary functions. Integration does not. Every integrand has a personality, and the skill is learning to recognize which technique unlocks which shape.

What you'll leave with

  • Why integration is fundamentally harder than differentiation — and what to do about it.
  • u-substitution: the chain rule run backwards, for compositions $f(g(x))\,g'(x)$.
  • Integration by parts: the product rule run backwards, plus the LIATE rule for choosing $u$.
  • Partial fractions: the standard move for proper rational functions $P(x)/Q(x)$.
  • What to do when no technique works — and which integrals provably have no elementary antiderivative.

1. The problem with integration

Differentiation is closed and mechanical. Hand a student any expression built out of polynomials, exponentials, logarithms, and trig functions, and they can produce its derivative by routinely applying the chain, product, and quotient rules. The answer is always another elementary function.

Integration breaks that pattern in two ways. First, there is no single universal rule. The integral of a product is not the product of the integrals — and there is no neat formula that replaces this fact. Second, the antiderivative of a perfectly tame-looking elementary function might not be elementary at all. The functions

$$ \int e^{-x^2}\,dx, \qquad \int \frac{\sin x}{x}\,dx, \qquad \int \frac{1}{\ln x}\,dx $$

all exist and are perfectly well-defined, but none of them can be written as a finite combination of polynomials, exponentials, logarithms, and trig functions. This isn't a failure of cleverness — it's a theorem (Liouville, 1830s).

The practical consequence

You will not learn integration the way you learned differentiation, by mastering one general procedure. You learn it by collecting a toolbox of techniques — substitution, parts, partial fractions, trig identities — and learning to read an integrand for clues about which tool to reach for. The first move in any integral is always recognition, not computation.

The next three sections cover the three workhorse techniques. Together they handle the overwhelming majority of integrals you'll encounter in a first calculus course.

2. Substitution (u-substitution)

If differentiation has one rule that does more heavy lifting than any other, it's the chain rule:

$$ \frac{d}{dx}\,F(g(x)) = F'(g(x))\cdot g'(x). $$

Run that backwards. If you see an integrand that looks like $f(g(x))\cdot g'(x)$ — a composition multiplied by the derivative of the inner function — then its antiderivative is $F(g(x))$, where $F$ is any antiderivative of $f$.

Substitution rule

Let $u = g(x)$, so that $du = g'(x)\,dx$. Then

$$ \int f(g(x))\,g'(x)\,dx \;=\; \int f(u)\,du. $$

The point of the substitution is to change variables so the integral is expressed entirely in $u$, with no $x$ left behind.

The recipe

  1. Spot a composition $f(g(x))$ inside the integrand.
  2. Let $u = g(x)$ and compute $du = g'(x)\,dx$.
  3. Check that $g'(x)\,dx$ actually appears (up to a constant) — that's the make-or-break step.
  4. Rewrite the entire integral in terms of $u$ and $du$. Every $x$ and every $dx$ must go.
  5. Integrate in $u$, then substitute back to express the answer in $x$.

A worked example

Consider

$$ \int 2x \cos(x^2)\,dx. $$

The inner function $x^2$ has derivative $2x$, and look — $2x\,dx$ is sitting right there in the integrand. Let $u = x^2$, so $du = 2x\,dx$. The integral becomes

$$ \int \cos(u)\,du \;=\; \sin(u) + C \;=\; \sin(x^2) + C. $$

Differentiate $\sin(x^2)$ to verify: by the chain rule, $\cos(x^2)\cdot 2x$. Exactly the integrand we started with.

How to spot the move

Look for a function-inside-a-function (the candidate $u$) whose derivative also appears in the integrand — typically as the "other" factor. Powers next to their derivatives, $\cos$ next to $\sin$'s derivative, exponentials next to their exponents' derivatives. Once you see the pairing, substitution is almost mechanical.

Definite integrals

For a definite integral, you have two equally valid choices: substitute back to $x$ at the end and evaluate at the original limits, or convert the limits to $u$ at the same time you change variables. The second is usually cleaner:

$$ \int_0^{\sqrt{\pi}} 2x \cos(x^2)\,dx \;=\; \int_0^{\pi} \cos(u)\,du \;=\; \sin(\pi) - \sin(0) \;=\; 0. $$

Note how the limits changed: when $x = 0$, $u = 0$; when $x = \sqrt{\pi}$, $u = \pi$.

3. Integration by parts

If substitution is the chain rule in reverse, integration by parts is the product rule in reverse. Start from

$$ \frac{d}{dx}\bigl(u(x)\,v(x)\bigr) \;=\; u'(x)\,v(x) + u(x)\,v'(x). $$

Integrate both sides, rearrange, and write $du = u'(x)\,dx$, $dv = v'(x)\,dx$:

Integration by parts
$$ \int u\,dv \;=\; uv - \int v\,du. $$

You trade the integral $\int u\,dv$ for the integral $\int v\,du$. The trade is only worthwhile if $\int v\,du$ is easier to evaluate than the one you started with.

The whole game is in choosing $u$ and $dv$. The right choice makes the new integral simpler; the wrong choice makes it worse (sometimes much worse). The standard heuristic is the LIATE rule.

LIATE: pick $u$ in this order

OrderClassExamples
1 (highest priority for $u$)Logarithmic$\ln x$, $\log x$
2Inverse trig$\arctan x$, $\arcsin x$
3Algebraic$x$, $x^2$, polynomials
4Trigonometric$\sin x$, $\cos x$
5 (lowest priority for $u$)Exponential$e^x$, $a^x$

Walk down the list and pick the first class that appears in the integrand as your $u$. Everything else (along with the $dx$) becomes $dv$. The intuition: things higher on the list simplify when differentiated (a log becomes $1/x$, a polynomial drops a degree), while things lower on the list don't get worse when integrated (an exponential stays an exponential).

A worked example

Evaluate

$$ \int x e^x\,dx. $$

Algebraic ($x$) beats Exponential ($e^x$) on LIATE, so let $u = x$ and $dv = e^x\,dx$. Then $du = dx$ and $v = e^x$. Plug in:

$$ \int x e^x\,dx \;=\; x e^x - \int e^x\,dx \;=\; x e^x - e^x + C \;=\; (x - 1)e^x + C. $$

Verify by differentiating $(x-1)e^x$ with the product rule: $(1)e^x + (x-1)e^x = xe^x$. ✓

Why LIATE works

The choice that helps is the one where differentiating $u$ makes things simpler. Logs and inverse trig functions famously become algebraic when differentiated. Polynomials lose a degree each time. So if there's a log in the integrand, that's the $u$; if not, look for inverse trig; if neither, look for a polynomial. By the time you reach trig or exponential, you're picking $u$ from a tie — and either choice often works.

Repeated application

For integrals like $\int x^2 e^x\,dx$, you apply integration by parts twice: each pass drops the polynomial's degree by one until the remaining integral is trivial. This is the standard pattern whenever an integrand multiplies a polynomial by something that survives differentiation.

4. Trigonometric integrals

Products and powers of sines, cosines, tangents, and secants come up often enough — and yield to such a small set of moves — that they deserve their own playbook. The strategy in every case is to use a trig identity to reshape the integrand into something a single u-substitution can finish off.

Powers of sine and cosine

For $\displaystyle\int \sin^m x \cos^n x\,dx$, look at the parities of $m$ and $n$:

  • If $n$ (the cosine power) is odd, peel off one $\cos x$ to pair with $dx$, then convert the remaining even power of cosine using $\cos^2 x = 1 - \sin^2 x$. Let $u = \sin x$.
  • If $m$ (the sine power) is odd, peel off one $\sin x$, convert the rest with $\sin^2 x = 1 - \cos^2 x$, and let $u = \cos x$.
  • If both are even, no substitution finishes the job directly. Use the power-reduction identities $\sin^2 x = \tfrac{1 - \cos 2x}{2}$ and $\cos^2 x = \tfrac{1 + \cos 2x}{2}$ to drop the degree, then repeat.

For example, $\displaystyle\int \sin^3 x \cos^2 x\,dx$: $m = 3$ is odd, so peel off one $\sin x$ and write $\sin^2 x = 1 - \cos^2 x$:

$$ \int (1 - \cos^2 x)\cos^2 x \cdot \sin x\,dx. $$

With $u = \cos x$ and $du = -\sin x\,dx$ this becomes $-\int (1 - u^2)u^2\,du = -\tfrac{u^3}{3} + \tfrac{u^5}{5} + C$, i.e., $\tfrac{\cos^5 x}{5} - \tfrac{\cos^3 x}{3} + C$.

Powers of tangent and secant

For $\displaystyle\int \tan^m x \sec^n x\,dx$, the analogous parities apply:

  • If $n$ is even, peel off $\sec^2 x$ (which pairs with $dx$ as $du$), convert the rest with $\sec^2 x = 1 + \tan^2 x$, and let $u = \tan x$.
  • If $m$ is odd, peel off a $\sec x \tan x$ factor (which pairs with $dx$ as $du$), convert the remaining tangents with $\tan^2 x = \sec^2 x - 1$, and let $u = \sec x$.

The pairings $\tfrac{d}{dx}\tan x = \sec^2 x$ and $\tfrac{d}{dx}\sec x = \sec x \tan x$ are what make these substitutions work — the rest is identity-juggling to set them up.

Why the parity rules work

Each rule isolates one factor whose derivative is the rest of the integrand. Once you can write the integral as $\int (\text{stuff in } u)\,du$, you're back to a power-of-$u$ problem. The identities $\sin^2 + \cos^2 = 1$ and $1 + \tan^2 = \sec^2$ are the only tools you need to convert between sine/cosine and tangent/secant in the leftover even powers.

5. Trigonometric substitution

When an integrand contains $\sqrt{a^2 - x^2}$, $\sqrt{a^2 + x^2}$, or $\sqrt{x^2 - a^2}$ — and no algebraic substitution clears it — a trig substitution trades $x$ for a trig function so the radical collapses by a Pythagorean identity.

RadicalSubstitutionIdentity that clears it
$\sqrt{a^2 - x^2}$$x = a\sin\theta$$1 - \sin^2\theta = \cos^2\theta$
$\sqrt{a^2 + x^2}$$x = a\tan\theta$$1 + \tan^2\theta = \sec^2\theta$
$\sqrt{x^2 - a^2}$$x = a\sec\theta$$\sec^2\theta - 1 = \tan^2\theta$

After substituting, the radical disappears and you're left with a trig integral — handled by section 4. At the end you convert back to $x$ using a right triangle: if $x = a\sin\theta$, then $\sin\theta = x/a$ and $\cos\theta = \sqrt{a^2 - x^2}/a$, and so on for the other cases.

A worked sketch. Consider

$$ \int \frac{dx}{\sqrt{4 - x^2}}. $$

Let $x = 2\sin\theta$, so $dx = 2\cos\theta\,d\theta$ and $\sqrt{4 - x^2} = 2\cos\theta$. The integral becomes $\displaystyle\int \frac{2\cos\theta\,d\theta}{2\cos\theta} = \int d\theta = \theta + C = \arcsin(x/2) + C$.

Choose your range of $\theta$

To make $\sqrt{a^2 - x^2} = a\cos\theta$ (without an absolute value) we restrict $\theta \in [-\pi/2, \pi/2]$, where $\cos\theta \geq 0$. Similar restrictions apply for the tan and sec substitutions. Skipping this step occasionally produces sign errors that are very hard to spot afterward.

6. Partial fractions

The other big technique handles rational integrands — quotients of polynomials, $P(x)/Q(x)$. The idea: any proper rational function can be rewritten as a sum of simpler fractions, each of which integrates to a log or arctan. Then you integrate term by term.

Partial fraction decomposition

If $\deg P < \deg Q$ and $Q(x)$ factors into distinct linear factors $(x - r_1)(x - r_2)\cdots(x - r_n)$, then

$$ \frac{P(x)}{Q(x)} \;=\; \frac{A_1}{x - r_1} + \frac{A_2}{x - r_2} + \cdots + \frac{A_n}{x - r_n} $$

for constants $A_1, \dots, A_n$ determined by matching coefficients.

A small example makes the move concrete. Decompose

$$ \frac{1}{(x-1)(x+2)} \;=\; \frac{A}{x-1} + \frac{B}{x+2}. $$

Multiplying through by the denominator,

$$ 1 \;=\; A(x+2) + B(x-1). $$

Plug in $x = 1$: $1 = 3A$, so $A = 1/3$. Plug in $x = -2$: $1 = -3B$, so $B = -1/3$. The integral now splits cleanly:

$$ \int \frac{1}{(x-1)(x+2)}\,dx \;=\; \tfrac{1}{3}\ln|x - 1| - \tfrac{1}{3}\ln|x + 2| + C. $$

The technique extends to repeated linear factors (each $(x-r)^k$ contributes terms $\tfrac{A_1}{x-r} + \tfrac{A_2}{(x-r)^2} + \cdots$) and to irreducible quadratic factors (each contributes a $\tfrac{Ax + B}{x^2 + bx + c}$ term, which integrates via a log and an arctan). The bookkeeping grows, but the underlying move is always the same: decompose, then integrate term by term.

Proper rationals only

Partial fractions requires $\deg P < \deg Q$. If the numerator's degree is greater or equal, do polynomial long division first to write $P/Q = (\text{polynomial}) + (\text{proper rational})$, and apply partial fractions to the remainder. Skipping this step is a classic source of nonsense answers.

For the full algorithm — including the cover-up method, repeated factors, and irreducible quadratics — the sources at the bottom of the page have worked treatments that go deeper than this overview.

7. Improper integrals

Every integral covered so far has been over a bounded interval $[a, b]$ with an integrand that stays finite on that interval. Improper integrals break one or both of those assumptions — and the technique is to handle the breakage with a limit.

Type 1: infinite interval
$$ \int_a^\infty f(x)\,dx \;=\; \lim_{b \to \infty} \int_a^b f(x)\,dx, $$

and similarly for $\int_{-\infty}^b$ and $\int_{-\infty}^{\infty}$ (which is split at any convenient point and evaluated as two separate limits). If the limit is a finite number, the integral converges; if it's infinite or doesn't exist, it diverges.

Type 2: unbounded integrand

If $f$ has a vertical asymptote at $x = c \in [a, b]$, replace the offending endpoint with a one-sided limit. For a singularity at the right endpoint $b$:

$$ \int_a^b f(x)\,dx \;=\; \lim_{t \to b^-} \int_a^t f(x)\,dx. $$

If the singularity is interior, split the interval at it and evaluate each piece as its own improper integral. Each piece must converge on its own for the whole to converge.

A pair of canonical examples shows the flavor of each type.

Type 1. $\displaystyle\int_1^\infty \frac{1}{x^2}\,dx = \lim_{b \to \infty}\left[-\tfrac{1}{x}\right]_1^b = \lim_{b\to\infty}\left(1 - \tfrac{1}{b}\right) = 1$. Converges. By contrast $\displaystyle\int_1^\infty \tfrac{1}{x}\,dx = \lim_{b\to\infty}\ln b = \infty$. Diverges — the harmonic-like tail is just heavy enough to blow up.

Type 2. $\displaystyle\int_0^1 \tfrac{1}{\sqrt{x}}\,dx = \lim_{t \to 0^+}\left[2\sqrt{x}\right]_t^1 = 2$. Converges, even though the integrand blows up at $x = 0$. But $\displaystyle\int_0^1 \tfrac{1}{x}\,dx = \lim_{t \to 0^+}\bigl(-\ln t\bigr) = \infty$. Diverges.

The pattern visible in both examples is the $p$-integral test:

$$ \int_1^\infty \frac{dx}{x^p} \text{ converges iff } p > 1, \qquad \int_0^1 \frac{dx}{x^p} \text{ converges iff } p < 1. $$

These two facts cover an enormous share of the improper integrals you'll encounter, and they're worth memorizing.

Interior singularities must be split

$\displaystyle\int_{-1}^{1} \tfrac{1}{x}\,dx$ looks like zero by symmetry, but it's an improper integral with a Type-2 singularity at $x = 0$. Splitting it gives $\int_{-1}^{0} \tfrac{1}{x}\,dx + \int_{0}^{1} \tfrac{1}{x}\,dx$ — and both halves diverge, so the whole integral diverges. Skipping the split and "evaluating" it as $\ln|x|\big|_{-1}^{1} = 0$ is a famous wrong answer.

For integrals you can't evaluate in closed form, the comparison test lets you settle convergence by comparing the integrand to one you already know. If $0 \leq f(x) \leq g(x)$ on $[a, \infty)$ and $\int_a^\infty g$ converges, so does $\int_a^\infty f$. If $0 \leq g(x) \leq f(x)$ and $\int g$ diverges, so does $\int f$. The $p$-integrals are the standard yardsticks.

8. Strategy: picking a technique

The hardest part of integration isn't executing a technique — it's choosing one. A reasonable triage order, applied in this order to the integrand in front of you:

  1. Simplify first. Cancel, combine fractions, multiply out, apply a trig identity. Many "hard" integrals are easy ones in disguise.
  2. Look for a basic antiderivative. If the integrand matches a known form (power, exponential, $\sin$, $\cos$, $1/x$, $1/(1+x^2)$, etc.), just write the answer.
  3. Try substitution. Hunt for an inner function whose derivative is also present (up to a constant). When it works, it's the cheapest move and should always be tried first.
  4. Look at the structure.
    • Product of unlike functions (polynomial × $e^x$, $x \ln x$, $x \sin x$) → integration by parts.
    • Only sines and cosines (or tangents and secants) → trig integral parity rules.
    • $\sqrt{a^2 \pm x^2}$ or $\sqrt{x^2 - a^2}$ → trig substitution.
    • Rational function $P(x)/Q(x)$ → partial fractions (after long division if improper).
  5. Check the bounds. Infinite limits or interior asymptotes mean you're in improper-integral territory — evaluate via a limit.
  6. If nothing works, the integral may not have an elementary antiderivative. Switch to a numerical method or accept a special function (see section 9).
When two techniques both apply

It's common for an integrand to fit more than one pattern. Substitution and trig substitution sometimes overlap; integration by parts can occasionally replace a trig integral. Pick the one that promises the simpler intermediate steps — and don't be afraid to abandon a path that's getting worse and restart with a different technique.

9. When all else fails

Sometimes nothing works. The integrand has no obvious substitution, parts produces an integral worse than the one you started with, and there's no rational structure to decompose. Two responses, depending on what you actually need.

You need a number, not a formula

If the integral is definite — you want the area under a curve between two specific bounds — and a closed form isn't available, use a numerical method:

  • Trapezoidal rule. Approximate the area under $f$ on $[a, b]$ by trapezoids. With $n$ equal subintervals of width $h = (b-a)/n$, $$ \int_a^b f(x)\,dx \approx \tfrac{h}{2}\bigl[f(x_0) + 2f(x_1) + \cdots + 2f(x_{n-1}) + f(x_n)\bigr]. $$ Error shrinks as $O(h^2)$ — halving the step size cuts the error by roughly four.
  • Simpson's rule. Fit a parabola through every three consecutive points and integrate the parabolas. With $n$ even, $$ \int_a^b f(x)\,dx \approx \tfrac{h}{3}\bigl[f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + \cdots + f(x_n)\bigr]. $$ Error shrinks as $O(h^4)$ — dramatically more accurate than the trapezoidal rule for smooth integrands.
  • Computer algebra systems. Wolfram Alpha, SymPy, Mathematica, and Maple will hand you a closed form when one exists and numerical answers when it doesn't. They're not cheating; they're using exactly the techniques on this page (and a lot more), driven by pattern-matching engines built up over decades.

The integral genuinely has no elementary antiderivative

Some integrals are provably not expressible as a finite combination of elementary functions. The most famous example:

$$ \int e^{-x^2}\,dx $$

is the engine of the normal distribution. It exists — the function $e^{-x^2}$ is perfectly continuous — but no amount of algebraic manipulation will ever produce a closed form. Mathematicians simply gave the antiderivative a name: the error function, $\operatorname{erf}(x) = \tfrac{2}{\sqrt{\pi}}\int_0^x e^{-t^2}\,dt$. Other famous examples include $\int \tfrac{\sin x}{x}\,dx$ (the sine integral $\operatorname{Si}$) and $\int \tfrac{1}{\ln x}\,dx$ (the logarithmic integral $\operatorname{li}$).

Reframe the goal

"This has no elementary antiderivative" is not a failure — it's information. It tells you that the right move is either a numerical approximation, a series expansion, or simply working with the special function on its own terms. The world doesn't owe every integral a tidy answer.

10. Common pitfalls

Forgetting to convert $dx$ to $du$

The most common substitution error: changing every $x$ in the integrand to $u$, but leaving the $dx$ untouched. Every substitution requires you to express $dx$ in terms of $du$ — typically $dx = du/g'(x)$ — and that conversion must show up. If your final integral still has a stray $dx$ next to a $u$, you've dropped a factor.

Choosing the wrong $u$ in integration by parts

If parts produces an integral that's worse than the one you started with — a higher-degree polynomial, a more tangled product — you almost certainly picked the wrong $u$. Swap the roles of $u$ and $dv$ and try again. LIATE is a guideline, not a law, but it gets the choice right the overwhelming majority of the time.

Partial fractions on an improper rational

Partial fraction decomposition only works when $\deg P < \deg Q$. Apply it directly to $\tfrac{x^3}{x^2 - 1}$ and you'll get an inconsistent system of equations — or worse, a plausible-looking but wrong decomposition. Always check the degrees first; if the numerator wins or ties, do polynomial long division first.

Dropping the $+C$

An indefinite integral is a family of antiderivatives, not a single function. The $+C$ isn't decoration — it represents the entire one-parameter family of solutions. Definite integrals don't need it (the constants cancel), but every indefinite integral does.

11. Worked examples

Each example walks the full path from recognition to verification. Try to commit to a technique before opening the solution — the recognition step is the one you most need to practice.

Example 1 · Basic substitution: $\displaystyle\int 3x^2 (x^3 + 1)^5\,dx$

Recognize. The inner function $x^3 + 1$ has derivative $3x^2$, and $3x^2\,dx$ appears in the integrand. This is textbook u-substitution.

Substitute. Let $u = x^3 + 1$, so $du = 3x^2\,dx$.

$$ \int 3x^2 (x^3 + 1)^5\,dx \;=\; \int u^5\,du \;=\; \tfrac{u^6}{6} + C. $$

Back-substitute.

$$ = \tfrac{(x^3 + 1)^6}{6} + C. $$

Verify. Differentiate: $\tfrac{1}{6}\cdot 6(x^3+1)^5\cdot 3x^2 = 3x^2(x^3+1)^5$. ✓

Example 2 · Substitution with trig: $\displaystyle\int \sin(x)\,\cos^4(x)\,dx$

Recognize. $\cos x$ is the inner function, and $-\sin x$ is its derivative — sitting in the integrand up to a sign.

Substitute. Let $u = \cos x$, so $du = -\sin x\,dx$, i.e., $\sin x\,dx = -du$.

$$ \int \sin(x)\,\cos^4(x)\,dx \;=\; \int u^4\,(-du) \;=\; -\tfrac{u^5}{5} + C. $$

Back-substitute.

$$ = -\tfrac{\cos^5 x}{5} + C. $$

Verify. Differentiate: $-\tfrac{1}{5}\cdot 5\cos^4 x \cdot (-\sin x) = \sin x \cos^4 x$. ✓

Example 3 · Integration by parts: $\displaystyle\int x \ln x\,dx$

Recognize. LIATE: Logarithmic beats Algebraic, so $u = \ln x$ and $dv = x\,dx$.

Compute the pieces.

$$ u = \ln x \quad\Longrightarrow\quad du = \tfrac{1}{x}\,dx, \qquad dv = x\,dx \quad\Longrightarrow\quad v = \tfrac{x^2}{2}. $$

Apply the formula.

$$ \int x \ln x\,dx \;=\; \tfrac{x^2}{2}\ln x - \int \tfrac{x^2}{2}\cdot\tfrac{1}{x}\,dx \;=\; \tfrac{x^2}{2}\ln x - \int \tfrac{x}{2}\,dx. $$

Finish.

$$ = \tfrac{x^2}{2}\ln x - \tfrac{x^2}{4} + C. $$

Verify. Differentiate with the product rule: $x\ln x + \tfrac{x^2}{2}\cdot\tfrac{1}{x} - \tfrac{x}{2} = x\ln x + \tfrac{x}{2} - \tfrac{x}{2} = x\ln x$. ✓

Example 4 · Integration by parts: $\displaystyle\int x e^x\,dx$

Recognize. LIATE: Algebraic ($x$) beats Exponential ($e^x$), so $u = x$ and $dv = e^x\,dx$.

Compute the pieces.

$$ u = x \quad\Longrightarrow\quad du = dx, \qquad dv = e^x\,dx \quad\Longrightarrow\quad v = e^x. $$

Apply the formula.

$$ \int x e^x\,dx \;=\; x e^x - \int e^x\,dx \;=\; x e^x - e^x + C \;=\; (x - 1)e^x + C. $$

Verify. Differentiate with the product rule: $e^x + (x-1)e^x = xe^x$. ✓

Example 5 · Trig integral: $\displaystyle\int \sin^2 x\,dx$

Recognize. Both powers are even, so substitution alone won't finish — use the power-reduction identity $\sin^2 x = \tfrac{1 - \cos 2x}{2}$.

Rewrite and integrate.

$$ \int \sin^2 x\,dx \;=\; \int \tfrac{1 - \cos 2x}{2}\,dx \;=\; \tfrac{x}{2} - \tfrac{\sin 2x}{4} + C. $$

Verify. Differentiate: $\tfrac{1}{2} - \tfrac{1}{4}\cdot 2\cos 2x = \tfrac{1 - \cos 2x}{2} = \sin^2 x$. ✓

Example 6 · Trig substitution: $\displaystyle\int \frac{dx}{\sqrt{9 - x^2}}$

Recognize. $\sqrt{a^2 - x^2}$ with $a = 3$ — use $x = 3\sin\theta$.

Substitute. $dx = 3\cos\theta\,d\theta$ and $\sqrt{9 - x^2} = 3\cos\theta$.

$$ \int \frac{3\cos\theta\,d\theta}{3\cos\theta} \;=\; \int d\theta \;=\; \theta + C. $$

Back-substitute. $\theta = \arcsin(x/3)$, so the answer is $\arcsin(x/3) + C$.

Verify. Differentiate: $\tfrac{1}{\sqrt{1 - (x/3)^2}}\cdot\tfrac{1}{3} = \tfrac{1}{\sqrt{9 - x^2}}$. ✓

Example 7 · Partial fractions: $\displaystyle\int \frac{5x - 4}{x^2 - x - 2}\,dx$

Factor the denominator. $x^2 - x - 2 = (x - 2)(x + 1)$, and the numerator has degree $1 < 2$, so the rational is proper.

Decompose.

$$ \frac{5x - 4}{(x-2)(x+1)} \;=\; \frac{A}{x-2} + \frac{B}{x+1}. $$

Multiply through: $5x - 4 = A(x+1) + B(x-2)$.

Plug $x = 2$: $\;10 - 4 = 3A \Longrightarrow A = 2$.

Plug $x = -1$: $\;-5 - 4 = -3B \Longrightarrow B = 3$.

Integrate.

$$ \int \frac{5x - 4}{x^2 - x - 2}\,dx \;=\; \int \frac{2}{x-2}\,dx + \int \frac{3}{x+1}\,dx \;=\; 2\ln|x-2| + 3\ln|x+1| + C. $$

Verify. Differentiate: $\tfrac{2}{x-2} + \tfrac{3}{x+1} = \tfrac{2(x+1) + 3(x-2)}{(x-2)(x+1)} = \tfrac{5x - 4}{x^2 - x - 2}$. ✓

Example 8 · Improper integral (Type 1): $\displaystyle\int_1^\infty \frac{dx}{x^3}$

Recognize. Infinite upper limit — replace it with a limit.

$$ \int_1^\infty \frac{dx}{x^3} \;=\; \lim_{b \to \infty} \int_1^b x^{-3}\,dx \;=\; \lim_{b\to\infty}\left[-\tfrac{1}{2x^2}\right]_1^b. $$

Evaluate the limit.

$$ = \lim_{b\to\infty}\left(-\tfrac{1}{2b^2} + \tfrac{1}{2}\right) \;=\; \tfrac{1}{2}. $$

Sanity check. This is $p = 3 > 1$, so the $p$-integral test predicts convergence — agrees with the finite value.

Example 9 · Improper integral (Type 2): $\displaystyle\int_0^1 \frac{dx}{\sqrt{x}}$

Recognize. Integrand blows up at $x = 0$ — replace the bad endpoint with a limit.

$$ \int_0^1 \frac{dx}{\sqrt{x}} \;=\; \lim_{t \to 0^+} \int_t^1 x^{-1/2}\,dx \;=\; \lim_{t\to 0^+}\left[2\sqrt{x}\right]_t^1. $$

Evaluate the limit.

$$ = \lim_{t\to 0^+}\bigl(2 - 2\sqrt{t}\bigr) \;=\; 2. $$

Sanity check. This is $p = 1/2 < 1$, so $\int_0^1 x^{-p}\,dx$ converges — agrees.

Sources & further reading

The techniques above are standard across every first-year calculus curriculum. The references below are the ones to reach for when you want fuller derivations, more worked examples, or the theory behind why these moves work.

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 25
0 correct