Processing math: 100%

Substitution Rule

The Substitution Rule is another technique for integrating complex functions and is the corresponding process of integration as the chain rule is to differentiation.

The Substitution Rule is applicable to a wide variety of integrals, but is most performant when the integral in question is of the form:

F(g(x))g(x) dx

Which is similar in form to the Chain Rule:

ddx[F(x)]=F(g(x))g(x)

Expressing the function g(x) more compactly as u=g(x), we make a 'substitution', which gives:

F(g(x))g(x) dx=F(g(x))+C=F(u)+C=F(u) du

Or,

f(u) u dx=f(u) du

We can also write the substitution by replacing F=f:

f(g(x))g(x) dx=f(u) du

Concisely stated, the Substitution Rule for Indefinite Integrals can be defined as:

If u=g(x) is a differentiable function on an interval [a,b] and f is continutous on that interval, then:

f(g(x))g(x) dx=f(u) du

The Substitution Rule for Definite Integrals

The Substitution Rule for Definite Integrals is similar to the case of indefinite integrals; however, we make sure to specify that f must be a continuous function on the range of u. The definition for the definite integral case is thus a slight restatement of the indefinite integral case:

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

baf(g(x))g dx=g(b)g(a)f(u) du

Substitution Rule for Simplifying Symmetric Integrals

Another interesting use for the Substitution Rule for Definite Integrals is the simplification of even and odd functions. Even functions are defined as:

f(x)=f(x)

While odd functions are defined as:

f(x)=f(x)

The integrals of definite even and odd functions can be simplified based onthe following definitions. Assuming the function f is continuous on an interval [a,a]:

  • If f is even, then aa f(x) dx=2a0f(x) dx
  • If f is odd, then aa f(x) dx=0

Examples

In [4]:
from sympy import symbols, limit, diff, sin, cos, log, tan, sqrt, init_printing, plot, integrate, sinh, simplify
from mpmath import ln, e, pi

init_printing()
x = symbols('x')
y = symbols('y')

Example 1: Compute the indefinite integral xsinx2 dx

We choose the substitution u=x2, therefore:

du=2x dxdx=12dux

We then proceed to substitute u into the original integral and solve:

xsinu dx(xsinu)(12dux)

Factor out the 12 and cancel the x:

12sinu du

Integrating sinu with respect to u yields cosu. Lastly, replace u with x2 and add the constant of integration:

12cosx2+C

We can verify our solution using SymPy's integrate() function.

In [2]:
integrate(x * sin(x ** 2), x)
Out[2]:
12cos(x2)

Example 2: Integrate the indefinite integral (3x2)20 dx

This would be quite the chore of an integral to solve without the Substitution Rule! Start by choosing to substitute u=3x2. Thus,

u=3x2,du=3 dx,dx=13du

As before, we replace dx back into the integral:

(u)20(13du)

Factor out 13 and compute the integral:

13u20(13)(121u21)

Then cleaning up the terms and replacing 3x2 back into the integral gives:

163u21163(3x2)21+C

Unfortunately, SymPy isn't much help in verifying this answer as it expands the polynomial and performs the integration.

In [9]:
simplify(integrate((3 * x - 2) ** 20, x))
Out[9]:
x7(1162261467x2016271660538x19+108477736920x18458017111440x17+1374051334320x163114516357792x15+5536917969408x147909882813440x13+9228196615680x128886411555840x11+7109129244672x104739419496448x9+2633010831360x81215235768320x7+462946959360x6144027942912x5+36006985728x47060193280x3+1045954560x2110100480x+7340032)

Luckily, as we know Integration by Substitution is the corresponding procedure for integration as the Chain Rule is for differentiation. Thus, we should arrive at the original function by performing the Chain Rule on the integrated function:

dydx=dydududxu=3x2,dudx=3,dydu=2163u20=13u20F(x)=(13(3x2)20)(3)=(3x2)20

Example 3: (x+1)2x+x2 dx

Choose u=2x+x2. Therefore,

du=2+2x dx,dx=du2+2x

Factor out the 12 and find the integral:

12u du=23u32

Then,

(12)(23u32)13(2x+x2)32

Or, rewritten with an x term factored:

13(x(x+2))32
In [8]:
simplify(integrate((x + 1) * sqrt(2 * x + x ** 2), x))
Out[8]:
13(x(x+2))32

Example 4: Integrate sinπx dx

We choose the substitution u=πx.

du=π dx,dx=duπsinu du=cosu(cosu)(duπ)1πcosπx
In [12]:
integrate(sin(pi * x), x)
Out[12]:
0.318309886183791cos(3.14159265358979x)

Example 5: Integrate ex1+ex dx

Start by substituting u=1+ex.

du=ex dx,dx=duexu=23u32(ex)(u) dx(ex)(u) duexu du23u3223(1+ex)32
In [13]:
integrate(e ** x * sqrt(1 + e ** x), x)
Out[13]:
0.6666666666666672.71828182845905x2.71828182845905x+1+0.6666666666666672.71828182845905x+1

References

Related Posts