Integration by Substitution

Integration by substitution is a powerful technique used to simplify integrals that are not immediately solvable using basic integration rules. It's essentially the reverse of the chain rule in differentiation. The core idea is to transform a complex integral into a simpler one by introducing a new variable.

The Method

Let's say you have an integral of the form $\int f(g(x)) g'(x) dx$. The key is to recognize that the integrand contains a composite function $f(g(x))$ and the derivative of the inner function, $g'(x)$.

  1. Identify the substitution: Choose a part of the integrand to represent by a new variable, say $u$. The best choice for $u$ is often the inner function of a composite function or a part of the expression whose derivative is also present (or can be made present) in the integrand.
  2. Differentiate the substitution: Find the differential of $u$ with respect to $x$. If $u = g(x)$, then $\frac{du}{dx} = g'(x)$.
  3. Rewrite the differential: Rearrange the differential to express $dx$ in terms of $du$. From $\frac{du}{dx} = g'(x)$, we get $du = g'(x) dx$.
  4. Substitute into the integral: Replace $g(x)$ with $u$ and $g'(x) dx$ with $du$ in the original integral. The integral should now be entirely in terms of $u$.
  5. Integrate with respect to u: Solve the new, simpler integral with respect to $u$.
  6. Substitute back: Replace $u$ with its original expression in terms of $x$ to get the final answer.

Examples

Example 1: Evaluate $\int 2x \cos(x^2) dx$.

  1. Let $u = x^2$.
  2. Differentiate: $\frac{du}{dx} = 2x$.
  3. Rewrite differential: $du = 2x dx$.
  4. Substitute: The integral becomes $\int \cos(u) du$.
  5. Integrate: $\int \cos(u) du = \sin(u) + C$.
  6. Substitute back: $\sin(x^2) + C$.

Example 2: Evaluate $\int \frac{\log x}{x} dx$.

  1. Let $u = \log x$.
  2. Differentiate: $\frac{du}{dx} = \frac{1}{x}$.
  3. Rewrite differential: $du = \frac{1}{x} dx$.
  4. Substitute: The integral becomes $\int u du$.
  5. Integrate: $\int u du = \frac{u^2}{2} + C$.
  6. Substitute back: $\frac{(\log x)^2}{2} + C$.

When to Use Substitution

This method is particularly useful when:

  • The integrand is a composite function $f(g(x))$ and the derivative of the inner function $g'(x)$ is also present as a factor.
  • The integrand involves expressions like $(ax+b)^n$, $\sqrt{ax+b}$, $e^{ax+b}$, $\sin(ax+b)$, $\cos(ax+b)$, $\frac{1}{ax+b}$, or similar forms where a linear substitution $u = ax+b$ can simplify the integral.
  • Trigonometric substitutions are required for integrals involving $\sqrt{a^2-x^2}$, $\sqrt{a^2+x^2}$, or $\sqrt{x^2-a^2}$.
Shortcut for linear substitutions: If $\int f(x) dx = F(x) + C$, then $\int f(ax+b) dx = \frac{1}{a} F(ax+b) + C$. For example, $\int (2x+3)^5 dx$. Here, $f(y) = y^5$, so $F(y) = \frac{y^6}{6}$. With $a=2, b=3$, the integral is $\frac{1}{2} \frac{(2x+3)^6}{6} + C = \frac{(2x+3)^6}{12} + C$.

Integration by Parts

Integration by parts is a technique derived from the product rule for differentiation. It's used to integrate the product of two functions. The formula allows us to transform an integral of a product into a new integral that might be easier to solve.

The Formula

The product rule for differentiation states: $\frac{d}{dx}(uv) = u \frac{dv}{dx} + v \frac{du}{dx}$.

Integrating both sides with respect to $x$:

$\int \frac{d}{dx}(uv) dx = \int u \frac{dv}{dx} dx + \int v \frac{du}{dx} dx$

Since $\int \frac{d}{dx}(uv) dx = uv$, we have:

$uv = \int u dv + \int v du$

Rearranging this gives the integration by parts formula:

$\int u dv = uv - \int v du$

Alternatively, if we let $u$ and $v$ be functions of $x$, then $du = u'(x) dx$ and $dv = v'(x) dx$. The formula can also be written as:

$\int u(x) v'(x) dx = u(x) v(x) - \int u'(x) v(x) dx$

The Method

  1. Identify u and dv: Given an integral of the form $\int f(x) g(x) dx$, you need to decide which function will be $u$ and which part (including $dx$) will be $dv$.
  2. Differentiate u and integrate dv: Calculate $du$ by differentiating $u$, and find $v$ by integrating $dv$.
  3. Apply the formula: Substitute $u$, $v$, and $du$ into the integration by parts formula: $\int u dv = uv - \int v du$.
  4. Solve the new integral: The integral $\int v du$ should be simpler than the original integral. If it's still complex, you might need to apply integration by parts again.

Choosing u and dv (The LIATE Rule)

A common mnemonic to help choose which function to set as $u$ is LIATE:

  • L - Logarithmic functions (e.g., $\log x$, $\ln x$)
  • I - Inverse trigonometric functions (e.g., $\arctan x$, $\arcsin x$)
  • A - Algebraic functions (e.g., $x^2$, $3x+1$)
  • T - Trigonometric functions (e.g., $\sin x$, $\cos x$)
  • E - Exponential functions (e.g., $e^x$, $2^x$)

The function that appears first in this list is generally a good choice for $u$. This is because their derivatives often simplify, and their integrals are usually straightforward.

Examples

Example 1: Evaluate $\int x \cos x dx$.

  1. Using LIATE, $u = x$ (Algebraic) and $dv = \cos x dx$ (Trigonometric).
  2. Differentiate $u$: $du = dx$.
  3. Integrate $dv$: $v = \int \cos x dx = \sin x$.
  4. Apply formula: $\int x \cos x dx = x (\sin x) - \int (\sin x) dx$.
  5. Solve new integral: $\int \sin x dx = -\cos x$.
  6. Final answer: $x \sin x - (-\cos x) + C = x \sin x + \cos x + C$.

Example 2: Evaluate $\int \ln x dx$.

This looks like a single function, but we can treat it as a product: $\int (\ln x) \cdot 1 dx$.

  1. Using LIATE, $u = \ln x$ (Logarithmic) and $dv = 1 dx$ (Algebraic, implicitly).
  2. Differentiate $u$: $du = \frac{1}{x} dx$.
  3. Integrate $dv$: $v = \int 1 dx = x$.
  4. Apply formula: $\int \ln x dx = (\ln x)(x) - \int x \left(\frac{1}{x} dx\right)$.
  5. Simplify and solve new integral: $\int x \left(\frac{1}{x} dx\right) = \int 1 dx = x$.
  6. Final answer: $x \ln x - x + C$.

Example 3: Evaluate $\int e^x \sin x dx$.

This integral requires applying integration by parts twice. Let's choose $u = \sin x$ and $dv = e^x dx$.

  1. First application: $u = \sin x \implies du = \cos x dx$; $dv = e^x dx \implies v = e^x$. $\int e^x \sin x dx = e^x \sin x - \int e^x \cos x dx$.
  2. Second application for $\int e^x \cos x dx$: Let $u = \cos x$ and $dv = e^x dx$. $du = -\sin x dx$; $v = e^x$. $\int e^x \cos x dx = e^x \cos x - \int e^x (-\sin x) dx = e^x \cos x + \int e^x \sin x dx$.
  3. Substitute the second result back into the first: $\int e^x \sin x dx = e^x \sin x - (e^x \cos x + \int e^x \sin x dx)$.
  4. Let $I = \int e^x \sin x dx$. The equation becomes $I = e^x \sin x - e^x \cos x - I$.
  5. Solve for $I$: $2I = e^x \sin x - e^x \cos x \implies I = \frac{e^x (\sin x - \cos x)}{2} + C$.
Trick for $e^{ax} \sin(bx)$ or $e^{ax} \cos(bx)$: The integral is always of the form $\frac{e^{ax}(a \sin(bx) - b \cos(bx))}{a^2+b^2}$ for $\sin(bx)$ and $\frac{e^{ax}(a \cos(bx) + b \sin(bx))}{a^2+b^2}$ for $\cos(bx)$. For $\int e^x \sin x dx$, $a=1, b=1$, so $\frac{e^x(1 \sin x - 1 \cos x)}{1^2+1^2} = \frac{e^x(\sin x - \cos x)}{2}$.

Integration by Partial Fractions

The method of partial fractions is used to integrate rational functions, which are ratios of two polynomials, $P(x)/Q(x)$. If the degree of the numerator $P(x)$ is less than the degree of the denominator $Q(x)$, and $Q(x)$ can be factored into linear and/or irreducible quadratic factors, we can decompose the rational function into a sum of simpler fractions whose denominators are the factors of $Q(x)$.

The Basic Idea

Consider a rational function $\frac{P(x)}{Q(x)}$. If $Q(x)$ can be factored, we express $\frac{P(x)}{Q(x)}$ as a sum of simpler fractions. For example, if $Q(x) = (x-a)(x-b)$, then $\frac{P(x)}{(x-a)(x-b)} = \frac{A}{x-a} + \frac{B}{x-b}$, where A and B are constants to be determined.

Types of Factors and Corresponding Partial Fractions

Let the rational function be $\frac{P(x)}{Q(x)}$. Assume degree of $P(x)$ < degree of $Q(x)$.

  1. Distinct Linear Factors: If $Q(x)$ has distinct linear factors $(x-a_1)(x-a_2)...(x-a_n)$, then $$ \frac{P(x)}{Q(x)} = \frac{A_1}{x-a_1} + \frac{A_2}{x-a_2} + \dots + \frac{A_n}{x-a_n} $$
  2. Repeated Linear Factors: If $Q(x)$ has a repeated linear factor $(x-a)^n$, then the corresponding terms are: $$ \frac{A_1}{x-a} + \frac{A_2}{(x-a)^2} + \dots + \frac{A_n}{(x-a)^n} $$
  3. Irreducible Quadratic Factors: An irreducible quadratic factor is a quadratic $ax^2+bx+c$ that cannot be factored into real linear factors (its discriminant $b^2-4ac < 0$). If $Q(x)$ has a distinct irreducible quadratic factor $ax^2+bx+c$, the corresponding term is: $$ \frac{Ax+B}{ax^2+bx+c} $$
  4. Repeated Irreducible Quadratic Factors: If $Q(x)$ has a repeated irreducible quadratic factor $(ax^2+bx+c)^n$, the corresponding terms are: $$ \frac{A_1x+B_1}{ax^2+bx+c} + \frac{A_2x+B_2}{(ax^2+bx+c)^2} + \dots + \frac{A_nx+B_n}{(ax^2+bx+c)^n} $$

Steps to Find Partial Fractions

  1. Proper Fraction: Ensure the rational function is a proper fraction (degree of numerator < degree of denominator). If not, perform polynomial long division first.
  2. Factor the Denominator: Factor the denominator $Q(x)$ completely into linear and irreducible quadratic factors.
  3. Set up the Decomposition: Write the rational function as a sum of partial fractions according to the types of factors found in step 2. Assign unknown constants (A, B, C, etc.) to the numerators.
  4. Solve for Constants: Clear the denominators by multiplying both sides of the equation by $Q(x)$. This results in a polynomial identity. Solve for the unknown constants by either:
    • Substituting strategic values of $x$ (roots of the denominator are often good choices).
    • Equating coefficients of like powers of $x$ on both sides of the identity.
  5. Integrate the Partial Fractions: Once the constants are found, integrate each of the simpler partial fractions. Common integrals include:
    • $\int \frac{A}{x-a} dx = A \ln|x-a| + C$
    • $\int \frac{A}{(x-a)^n} dx = \frac{A}{(1-n)(x-a)^{n-1}} + C$ (for $n \neq 1$)
    • $\int \frac{Ax+B}{ax^2+bx+c} dx$. This often requires completing the square in the denominator and using substitution or trigonometric substitution.

Examples

Example 1: Evaluate $\int \frac{1}{(x-1)(x+2)} dx$.

  1. The fraction is proper.
  2. Denominator is factored into distinct linear factors.
  3. Decomposition: $\frac{1}{(x-1)(x+2)} = \frac{A}{x-1} + \frac{B}{x+2}$.
  4. Solve for constants: Multiply by $(x-1)(x+2)$: $1 = A(x+2) + B(x-1)$.
    • Let $x=1$: $1 = A(1+2) + B(1-1) \implies 1 = 3A \implies A = \frac{1}{3}$.
    • Let $x=-2$: $1 = A(-2+2) + B(-2-1) \implies 1 = -3B \implies B = -\frac{1}{3}$.
  5. Integrate: $\int \left( \frac{1/3}{x-1} - \frac{1/3}{x+2} \right) dx = \frac{1}{3} \int \frac{1}{x-1} dx - \frac{1}{3} \int \frac{1}{x+2} dx$ $= \frac{1}{3} \ln|x-1| - \frac{1}{3} \ln|x+2| + C = \frac{1}{3} \ln\left|\frac{x-1}{x+2}\right| + C$.

Example 2: Evaluate $\int \frac{x+1}{x^2(x-3)} dx$.

  1. Proper fraction.
  2. Denominator has a repeated linear factor ($x^2$) and a distinct linear factor ($x-3$).
  3. Decomposition: $\frac{x+1}{x^2(x-3)} = \frac{A}{x} + \frac{B}{x^2} + \frac{C}{x-3}$.
  4. Solve for constants: Multiply by $x^2(x-3)$: $x+1 = Ax(x-3) + B(x-3) + Cx^2$.
    • Let $x=3$: $3+1 = A(3)(0) + B(3-3) + C(3^2) \implies 4 = 9C \implies C = \frac{4}{9}$.
    • Let $x=0$: $0+1 = A(0)(0-3) + B(0-3) + C(0)^2 \implies 1 = -3B \implies B = -\frac{1}{3}$.
    • To find A, equate coefficients of $x^2$: $0 = A + C \implies A = -C = -\frac{4}{9}$.
  5. Integrate: $\int \left( \frac{-4/9}{x} + \frac{-1/3}{x^2} + \frac{4/9}{x-3} \right) dx$ $= -\frac{4}{9} \int \frac{1}{x} dx - \frac{1}{3} \int \frac{1}{x^2} dx + \frac{4}{9} \int \frac{1}{x-3} dx$ $= -\frac{4}{9} \ln|x| - \frac{1}{3} \left(-\frac{1}{x}\right) + \frac{4}{9} \ln|x-3| + C$ $= -\frac{4}{9} \ln|x| + \frac{1}{3x} + \frac{4}{9} \ln|x-3| + C$.

Example 3: Evaluate $\int \frac{2x-1}{x^2+1} dx$.

  1. Proper fraction.
  2. Denominator $x^2+1$ is an irreducible quadratic factor.
  3. Decomposition: $\frac{2x-1}{x^2+1} = \frac{Ax+B}{x^2+1}$. In this case, it's already in the correct form.
  4. We can split this into two integrals: $\int \frac{2x}{x^2+1} dx - \int \frac{1}{x^2+1} dx$.
  5. Integrate:
    • For $\int \frac{2x}{x^2+1} dx$: Use substitution $u = x^2+1$, $du = 2x dx$. This becomes $\int \frac{1}{u} du = \ln|u| = \ln(x^2+1)$ (since $x^2+1$ is always positive).
    • For $\int \frac{1}{x^2+1} dx$: This is a standard integral, $\arctan x$.
    The final answer is $\ln(x^2+1) - \arctan x + C$.
Integration of $\frac{Ax+B}{ax^2+bx+c}$: If $ax^2+bx+c$ is irreducible, split the fraction into $\int \frac{Ax}{ax^2+bx+c} dx + \int \frac{B}{ax^2+bx+c} dx$. The first part usually becomes a logarithm (by substitution $u=ax^2+bx+c$), and the second part often becomes an arctangent (after completing the square in the denominator and using substitution).