Integration by parts is one of the common methods for computing integrals. Using this method, you rewrite the original integral in terms of an expression containing a simpler integral. Integration by parts for indefinite integrals uses the definition:

.

For definite integrals, integration by parts is defined as follows:

.

Internally, MuPAD^{®} uses integration by parts along with
other integration methods. To use this method explicitly, call the `intlib::byparts`

function.
If you want to integrate an expression by parts, keep the original
integral unevaluated. By default, `int`

returns evaluated integrals. Use
the `hold`

or `freeze`

commands to prevent
evaluation of the integral:

f := freeze(int)(exp(a*x)*cos(I*x*b), x)

Call `intlib::byparts`

and
specify the part of an expression you want to integrate. For example,
specify
:

f_int := intlib::byparts(f, exp(a*x))

To evaluate the resulting integral, use the `eval`

command:

eval(f_int)

If the resulting expression is too long, try using the `simplify`

or `Simplify`

function:

Simplify(%)

Change of variable is also one of the common methods for computing
integrals. For explicit use of this method, MuPAD provides the `intlib::changevar`

function.
When changing an integration variable, you need to keep the integral
unevaluated. By default, `int`

returns
evaluated integrals. Use the `hold`

or `freeze`

commands to prevent
evaluation of the integral:

f := intlib::changevar(hold(int)(sin(exp(x)), x), t = exp(x), t)

To evaluate the resulting integral, use the `eval`

command:

eval(f)

The change of variable method also works for computing definite integrals:

f := intlib::changevar(hold(int)(x/sqrt(1 - x^2), x = a..b), t = x^2, t)

Was this topic helpful?